#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

override_dh_auto_configure:
	dh_auto_configure -- --with-gmp --enable-shared \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_installexamples:
	dh_installexamples -XMakefile -XMakefile.am -XMakefile.in

override_dh_auto_build-indep:
	#mkdir -p docs/givaro-dev-html
	#$(MAKE) -C docs docs_dev
	$(MAKE) docs
	rm -f docs/givaro-*html/COPYING
	rm -f docs/givaro-*html/INSTALL

override_dh_auto_test:
	dh_auto_test --max-parallel=1

dhopts :=

%:
	dh $@ --with autoreconf $(dhopts)
