#!/usr/bin/make -f

DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow,+fortify

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --enable-doxygen-docs

override_dh_installdocs:
	dh_installdocs -plibfakekey-dev
	dh_installdocs --doc-main-package=libfakekey0 -plibfakekey-doc
	dh_installdocs -plibfakekey0

execute_after_dh_clean:
	-rm -f aclocal.m4 config.guess config.h.in config.sub configure debcomp doc/Doxyfile doc/Makefile doc/Makefile.in fakekey/Makefile fakekey/Makefile.in install-sh libfakekey.pc libtool ltmain.sh Makefile Makefile.in missing src/Makefile src/Makefile.in tests/Makefile tests/Makefile.in srv/.deps src/Makefile stamp-h1 tests/.deps tests/Makefile
	-rm doc/man/man3mb/*.3mb
	-rm -rf libfakekey-0.1
