#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

export ACLOCAL_PATH=/usr/share/gnulib/m4

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_HOST_MULTIARCH

ifneq (,$(filter $(DEB_HOST_MULTIARCH), mipsel-linux-gnu))
DEB_PKG_EANTIC_OPENMP=no
else
DEB_PKG_EANTIC_OPENMP=yes
endif

default:
	@uscan --no-conf --dehs --report || true

%:
	dh $@ --builddirectory=_BUILD

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-openmp=$(DEB_PKG_EANTIC_OPENMP) \
		--with-version-script \
		--without-benchmark \
		--without-byexample \
		--without-pyeantic \
		--without-doc

override_dh_auto_install:
	dh_auto_install
	find debian/tmp/ -name "*.la" -delete
