#!/usr/bin/make -f
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

%:
	dh $@ --with quilt --with autoreconf --with ppp

override_dh_auto_configure:
	find . -name *_vala.stamp | xargs rm -f
	dh_auto_configure -- --enable-libgsm0710mux --enable-ppp-support \
	--enable-modem-nokia-isi --disable-modem-qualcomm-palm \
	--enable-vala --disable-silent-rules

override_dh_strip:
	dh_strip --dbg-package=fso-gsmd-dbg

override_dh_installdocs:
	dh_installdocs --link-doc=fso-gsmd

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_makeshlibs:
	dh_makeshlibs --exclude=/usr/lib/$(DEB_HOST_MULTIARCH)/cornucopia/modules/

override_dh_ppp:
	dh_ppp --breaks
