#!/usr/bin/make -f

export DH_VERBOSE=1

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# Upstream's makefiles will respect PREFIX, and this means we avoid a patch
export PREFIX=/usr

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C contrib/pzstd/ pzstd

override_dh_install:
	# Call d-shlibmove to comply with library packaging guide
	dh_install

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) -C contrib/pzstd clean

