#!/usr/bin/make -f

#export DEB_BUILD_MAINT_OPTIONS = optimize=+lto

%:
	dh $@ --without=autoreconf

override_dh_auto_configure:
	# Strip the following unused file from the tree to prevent it from being
	# used as the license is incompatible with lib/util/getoptx.*
	rm -fv tools/turbocharger/mod_gzip.c
	dh_auto_configure -- \
		--disable-libwww-client \
		--disable-wininet-client

override_dh_auto_build:
	dh_auto_build -- BUILDTOOL_CC=gcc 'BUILDTOOL_CCLD=$$(BUILDTOOL_CC)'
	$(MAKE) -C tools

override_dh_auto_clean:
	# Add here commands to clean up after the build process.
	# xxx upstream build process still breaks on distclean...
	[ ! -f Makefile ] || [ ! -f config.status ] || dh_auto_clean || true

override_dh_compress:
	dh_compress -Xusr/share/doc/libxmlrpc-core-c3-dev/examples/
