#!/usr/bin/make -f
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

LDFLAGS += -Wl,--as-needed
CFLAGS += $(CPPFLAGS)

%:
	dh $@ --with autoreconf --parallel --builddirectory build

override_dh_auto_configure:
	dh_auto_configure -- \
        --disable-static \
        --disable-rpath \
        --with-initscript=none \
        --with-gpp-default-behavior=REMOTE_FIRST

override_dh_auto_install:
	dh_auto_install
	rm -r `find . -name '*.la'`
	rm -r `find . -type d -name log`

override_dh_auto_test:
	cd build && $(MAKE) test_proxymech

override_dh_clean:
	dh_clean
	rm -rf m4
	rm -f ABOUT-NLS config.rpath ltmain.sh
	rm -f po/Make* po/Rules-quot po/*.header po/*.sed po/*.sin
