#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#DH_VERBOSE = 1

# Hardening flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@  

override_dh_auto_configure:
	dh_auto_configure -- \
		-DLIB_SUFFIX="/$(DEB_TARGET_MULTIARCH)"
		-DINSTALL_DOCS=ON

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd obj-* && [ -x unitTest ] && ./unitTest
endif

override_dh_install-indep:
	dh_install --indep
	dh_doxygen --indep

override_dh_installexamples-indep:
	dh_installexamples --indep --exclude=SCon*

override_dh_compress-indep:
	dh_compress --indep --exclude=examples
