#!/usr/bin/make -f

export DEB_CXXFLAGS_MAINT_APPEND = -fvisibility-inlines-hidden

%:
	dh $@ --parallel --with autoreconf


override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- --disable-silent-rules
override_dh_install:
	dh_install --fail-missing -X.la -X.a

override_dh_auto_build-indep:
	$(MAKE) -C doc docs

override_dh_auto_clean:
	rm -rf doc/html doc/latex doc/man
	dh_auto_clean

override_dh_strip:
	set -e; \
	for pkg in $(patsubst %-dbg,%,$(filter %-dbg,$(shell dh_listpackages))); do \
		dh_strip -p$${pkg} --dbg-package=$${pkg}-dbg; \
	done
	dh_strip -s --remaining-packages

