#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export CFLAGS   := $(shell dpkg-buildflags --get CFLAGS)
export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS)

%:
	dh $@ --list-missing

override_dh_auto_configure:
	dh_auto_configure -- \
		--disable-static \
		--htmldir=/usr/share/doc/openconnect/html \
		--with-vpnc-script=/usr/share/vpnc-scripts/vpnc-script
	# Do not let version.c get rebuilt from our git repo
	touch version.c

override_dh_installchangelogs:
	dh_installchangelogs www/changelog.html

override_dh_compress:
	dh_compress -Xhtml/changelog.html
