#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/architecture.mk

%:
	dh $@

# We are not building the DFT library.
# https://github.com/shibatch/sleef/issues/214#issuecomment-413746187
override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
        -DBUILD_SHARED_LIBS=ON \
		-DBUILD_DFT=OFF \
		-DSLEEF_TEST_ALL_IUT=ON \
		-DCMAKE_C_COMPILER=clang \
		-DCMAKE_CXX_COMPILER=clang++

ifneq (,$(filter $(DEB_HOST_ARCH), arm64))
override_dh_auto_test:
	-dh_auto_test
endif

# noop dwz because some architectures would fail.
override_dh_dwz:
	true
