5 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6 DPKG_EXPORT_BUILDFLAGS = 1
7 include /usr/share/dpkg/buildflags.mk
11 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
18 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
19 MAKEFLAGS += -j$(NUMJOBS)
22 DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
23 DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
24 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
26 arch64_map = i386=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x
27 ifneq (,$(filter $(DEB_HOST_ARCH)=%, $(arch64_map)))
28 HOST64 = $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
29 $(filter $(DEB_HOST_ARCH)=%, $(arch64_map))))-linux-gnu
31 extra_build_targets += build64-stamp
34 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
35 CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE)
37 CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
42 build: build-arch build-indep
44 build-arch: build-stamp $(extra_build_targets)
45 build-indep: build-stamp $(extra_build_targets)
49 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
56 cd $(@D); sh ../configure --prefix=/usr $(CONFIG_OPTS)
60 cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
65 rm -rf build build64 strace64.1
68 binary: binary-indep binary-arch
73 test -f build-stamp || make $(MFLAGS) -f debian/rules build
75 # prepare 64bit executable and manpage, if it has been built
76 test -f build64-stamp && ( mv build64/strace build64/strace64 ; \
77 cp strace.1 strace64.1 ) || true
85 dh_installchangelogs -s