#!/usr/bin/make -f DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed PACKAGE = $(shell dh_listpackages) TMP = $(CURDIR)/debian/$(PACKAGE) BUILD_DIR := obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(CURDIR)/$(BUILD_DIR):$(TMP)/usr/lib export LD_LIBRARY_PATH export DEB_BUILD_MAINT_OPTIONS = hardening=+all # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ # CMAKE_PREFIX_PATH is used when building against ITK 3.20 DEB_CMAKE_EXTRA_FLAGS += \ -DCMAKE_PREFIX_PATH=/usr/lib/InsightToolkit \ -DCMAKE_BUILD_TYPE:STRING=RELEASE \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -DPLM_CONFIG_DEBIAN_BUILD:BOOL=ON \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTING:BOOL=ON override_dh_auto_configure: dh_auto_configure -- $(DEB_CMAKE_EXTRA_FLAGS) override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) #Make the test suit fatal on supported arches ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-amd64)) dh_auto_test else dh_auto_test || true endif endif override_dh_auto_install: dh_auto_install rm -rfv $(TMP)/usr/lib/*.a rm -rfv $(TMP)/usr/lib/cmake rm -rfv $(TMP)/usr/include