#!/usr/bin/make -f export DH_VERBOSE=1 DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) TARGET ?= $(shell dpkg-architecture -qDEB_TARGET_GNU_TYPE) INSTDIR:=debian/libgridtools-dev LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH) CMAKEDIR:=$(INSTDIR)/$(LIBDIR)/cmake NO_NATIVE_ARCHS := powerpc ppc64el ppc64 riscv64 sh4 s390x hppa m68k mipsel #NATIVE := $(if $(filter $(DEB_TARGET_ARCH), $(NO_NATIVE_ARCHS)), \ # -DGT_ENABLE_BACKEND_X86=Off -DGT_ENABLE_BACKEND_NAIVE=Off ) BUILD_FLAGS = \ -DCMAKE_MODULE_PATH=/usr/share/ecbuild/cmake \ -DFETCHCONTENT_FULLY_DISCONNECTED=On \ -DFETCHCONTENT_SOURCE_DIR_GOOGLETEST=$(CURDIR)/_deps/googletest-src \ -DFETCHCONTENT_SOURCE_DIR_CPP_BINDGEN=$(CURDIR)/_deps/cpp_bindgen-src \ -DFETCHCONTENT_SOURCE_DIR_PYBIND11=$(CURDIR)/_deps/pybind11-src \ -DFETCHCONTENT_SOURCE_DIR_NANOBIND=$(CURDIR)/_deps/nanobind-src \ -DFETCHCONTENT_QUIET=Off \ -DGT_TESTS_ENABLE_PYTHON_TESTS=Off \ -DGT_INSTALL_EXAMPLES_PATH=/usr/share/doc/libgridtools-dev/examples \ $(NATIVE) # Test suite requires 4 processors. Fake it on OpenMPI export OMPI_MCA_rmaps_base_oversubscribe=1 %: dh $@ --buildsystem=ecbuild --no-parallel override_dh_auto_configure: dh_auto_configure -- ${BUILD_FLAGS} override_dh_auto_test: @echo "Bypass tests in current builds" override_dh_auto_install: dh_auto_install # Shuffle to correct locations mkdir -p $(CMAKEDIR) mv $(INSTDIR)/usr/lib/cmake $(INSTDIR)/$(LIBDIR) sed -i -e 's%${_IMPORT_PREFIX}/include%/usr/include%g' \ -e 's%${PACKAGE_PREFIX_DIR}/lib/cmake%$(LIBDIR)/cmake%g' \ $(CMAKEDIR)/GridTools/GridToolsConfig.cmake