#!/usr/bin/make -f include /usr/share/dpkg/architecture.mk export DPKG_GENSYMBOLS_CHECK_LEVEL := 4 # list of arch for which build 32-bit library lib32 := illumos-amd64 kopensolaris-amd64 # list of arch for which build 64-bit library lib64 := variants := default ifneq (,$(filter $(DEB_HOST_ARCH), $(lib32))) variants += 32 endif ifneq (,$(filter $(DEB_HOST_ARCH), $(lib64))) variants += 64 endif configure.32 := --libdir=\$${prefix}/lib32 --disable-progs CFLAGS="-m32" configure.64 := --libdir=\$${prefix}/lib64 --disable-progs CFLAGS="-m64" %: dh $@ override_dh_auto_configure : $(variants:%=configure-%-stamp) override_dh_auto_build : $(variants:%=build-%-stamp) override_dh_auto_install : $(variants:%=install-%-stamp) override_dh_auto_clean: rm -rf debian/build override_dh_strip: dh_strip -p libiscsit1 --dbg-package=libiscsit1-dbg dh_strip -N libiscsit1 configure-%-stamp: dh_auto_configure -B debian/build/$* -- \ --libexecdir=\$${prefix}/lib \ $(configure.$*) touch $@ build-%-stamp: configure-%-stamp dh_auto_build -B debian/build/$* touch $@ install-%-stamp: build-%-stamp dh_auto_install -B debian/build/$* touch $@