#!/usr/bin/make -f

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

# If building for kfreebsd-i386, disable OpenMP.
# On this architecture, if OpenMP is enabled the map2alm_iter2 function
# fails to converge, so the check_alm2mapalm unit test runs indefinitely.
ifeq ($(DEB_HOST_ARCH),kfreebsd-i386)
EXTRA_CONFIGURE_ARGS=--disable-openmp
else
EXTRA_CONFIGURE_ARGS=
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(EXTRA_CONFIGURE_ARGS)

override_dh_strip:
	dh_strip --dbg-package=libhealpix-cxx0-dbg
