#!/usr/bin/make -f export PYBUILD_NAME=tomopy include /usr/share/dpkg/architecture.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk CFLAGS+=$(CPPFLAGS) CXXFLAGS+=$(CPPFLAGS) LIBTOMOPATH=/usr/lib/python3/dist-packages/tomopy/util/extern ifneq (,$(wildcard /usr/include/mkl/mkl.h)) USE_MKL:=ON else USE_MKL:=OFF endif ifneq (,$(wildcard /usr/lib/llvm-*/lib/clang/*/include/omp.h)) USE_OPENMP:=ON else USE_OPENMP:=OFF endif export CMAKE_OPTIONS := \ -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \ -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \ -DWITH_SHARED_LIB=1 \ -DWITH_STATIC_LIB=0 \ -DCMAKE_INSTALL_LIBDIR=$(LIBTOMOPATH) \ -DCMAKE_CUDA_HOST_COMPILER=cuda-g++ \ -DMKL_ROOT_DIR=/usr \ -DMKL_INCLUDE_DIR=/usr/include/mkl \ -DCMAKE_BUILD_TYPE=Release \ -DTOMOPY_USE_MKL=$(USE_MKL) \ -DTOMOPY_USE_OPENMP=$(USE_OPENMP) %: dh $@ --with python3 --buildsystem=pybuild --test-pytest PTLLINKS=VERSION CMakeLists.txt cmake source override_dh_auto_configure: mkdir -p source/PTL for i in $(PTLLINKS) ; do ln -s ../../PTL/$$i source/PTL/ ; done dh_auto_configure -Spython3 --buildsystem=pybuild -O--test-pytest dh_auto_configure -Scmake -- $(CMAKE_OPTIONS) override_dh_auto_build: dh_auto_build -Spython3 --buildsystem=pybuild -O--test-pytest dh_auto_build -Scmake dh_auto_install -Scmake override_dh_auto_install: dh_auto_install -Spython3 --buildsystem=pybuild -O--test-pytest dh_auto_install -Scmake execute_after_dh_auto_clean: for i in $(PTLLINKS) ; do rm -f source/PTL/$$i ; done execute_before_dh_auto_test: for v in $$(py3versions -sv) ; do cp -v debian/python3-tomopy/$(LIBTOMOPATH)/*.so $(CURDIR)/.pybuild/cpython3_$${v}_tomopy/build/tomopy/util/extern ; done execute_after_dh_auto_test: rm -f $(CURDIR)/.pybuild/cpython*/build/tomopy/util/extern/*.so