#!/usr/bin/make -f # export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,noexecstack # crossbuild ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) include /usr/share/dpkg/buildtools.mk endif %: dh $@ # The debian/compiler directory contains gcc and clang wrappers. # It adds Debian specifific options distributed in # $CC, $CFLAGS, $CPPFLAGS and $LDFLAGS export PATH := $(shell pwd)/debian/compiler:$(PATH) # Detects the correct ABINAME from the DEB_BUILD_ARCH # instead of run-time detection. Fixes FTBR. ABINAME=$(DEB_BUILD_ARCH) ifeq ($(ABINAME), x32) ABINAME=amd64 endif .PHONY: debugprint debugprint: @echo === debug === @echo "abiname: $(ABINAME)" @echo "uname -m: `uname -m`" @echo "debian compiler: $(CC)" @echo "debian compiler options: $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)" @echo ============= override_dh_auto_configure: debugprint ./configure --host=$(ABINAME) --prefix=/usr override_dh_auto_clean: rm -rf ./build # disable auto installation override_dh_auto_install: