#!/usr/bin/make -f

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	DEBUG += --enable-debug
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--includedir="\$${prefix}/include/$(DEB_HOST_MULTIARCH)" \
		$(DEBUG)

override_dh_auto_build:
	# build manpages (needs pandoc); these are included in tarballs
	dev-bin/make-man-pages.pl
	dh_auto_build

override_dh_auto_clean:
	dh_auto_clean
	rm -rf man/

override_dh_installchangelogs:
	dh_installchangelogs Changes.md
