#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND += -Wl,-z,defs -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

.PHONY: build
build:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--disable-samples \
		--enable-reuseaddr \
		--without-documentation

override_dh_auto_build-indep:
	mkdir -p docs/doxygen
	doxygen Doxyfile

# Tests disabled because they access the network.
override_dh_auto_test:

override_dh_install:
	dh_install -X.md5 -X.map
