#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

#enable hardening
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
	^\./\.git/.*|\./debian/.*|.*mcp|\./examples/source/henon\.cw|\./tutorial/maxmsp/.*\.pat$

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-sdkdir=/usr/include/pd \
		--with-stkdir=/usr/include/stk \
		--with-sndobjdir=/usr/include/SndObj \
		--enable-cmem \
		$(empty)

override_dh_auto_build-indep:
	doxygen

override_dh_auto_clean:
	rm -rf doc/
	dh_auto_clean
	-rm -f pd-flext.pc

licensecheck:
	licensecheck -i "$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)" --deb-machine -r . \
		> debian/copyright_newhints
	cmp debian/copyright_hints debian/copyright_newhints \
		&& rm debian/copyright_newhints
