5 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6 DPKG_EXPORT_BUILDFLAGS = 1
7 include /usr/share/dpkg/buildflags.mk
8 include /usr/share/dpkg/architecture.mk
12 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
19 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
20 MAKEFLAGS += -j$(NUMJOBS)
23 extra_build_targets += build-udeb-stamp
25 arch64_map = i386=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x
26 ifneq (,$(filter $(DEB_HOST_ARCH)=%, $(arch64_map)))
27 HOST64 = $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
28 $(filter $(DEB_HOST_ARCH)=%, $(arch64_map))))-linux-gnu
30 extra_build_targets += build64-stamp
33 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
34 CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE)
36 CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
41 build: build-arch build-indep
43 build-arch: build-stamp $(extra_build_targets)
44 build-indep: build-stamp $(extra_build_targets)
51 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
53 $(MAKE) -C $* check VERBOSE=1
57 build/Makefile: configure
59 cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr $(CONFIG_OPTS)
61 build-udeb/Makefile: configure
63 cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr \
64 --without-stacktrace --without-libiberty $(CONFIG_OPTS)
66 build64/Makefile: configure
68 cd $(@D); CC="$(CC64)" sh ../configure --enable-mpers=check --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
73 rm -rf build build-udeb build64 strace64.1 debian/strace64.substvars
76 binary: binary-indep binary-arch
81 test -f build-stamp || make $(MFLAGS) -f debian/rules build
83 # prepare 64bit executable and manpage, if it has been built
84 test -f build64-stamp && ( mv build64/strace build64/strace64 ; \
85 mv build64/strace.1 build64/strace64.1 ) || true
93 dh_installchangelogs -a