#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
export DH_VERBOSE = 1

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# configure script detects optimization and debbuging flags automatically
export DEB_CFLAGS_MAINT_STRIP = -O2 -g

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

# main packaging script based on dh7 syntax
%:
	dh $@  --with autoreconf


override_dh_autoreconf:
	dh_autoreconf ./bootstrap

override_dh_auto_configure:
	dh_auto_configure -- --enable-mlucas-default-path

override_dh_auto_test:
ifeq ($(DEB_HOST_ARCH), arm64)
	dh_auto_test || true
else
	dh_auto_test
endif
