1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#!/usr/bin/make -f
# export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)
ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
# Provide OS=
OS_MAP_linux = Linux
OS_MAP_kfreebsd = GNU/kFreeBSD
OS_MAP_hurd = GNU
ifneq ($(OS_MAP_$(DEB_HOST_ARCH_OS)),)
BUILD_FLAGS += OS=$(OS_MAP_$(DEB_HOST_ARCH_OS))
endif
# Provide compiler information
BUILD_FLAGS += compiler=gcc
BUILD_FLAGS += CC=$(DEB_HOST_GNU_TYPE)-gcc
BUILD_FLAGS += CXX=$(DEB_HOST_GNU_TYPE)-g++
# Provide arch=
arch_MAP_amd64 = intel64
arch_MAP_i386 = ia32
arch_MAP_mips64el = mips64
arch_MAP_powerpc = ppc32
arch_MAP_ppc64 = ppc64
arch_MAP_ppc64el = ppc64le
ifneq ($(arch_MAP_$(DEB_HOST_ARCH_CPU)),)
BUILD_FLAGS += arch=$(arch_MAP_$(DEB_HOST_ARCH_CPU))
else
ifeq ($(DEB_HOST_ARCH),armhf)
BUILD_FLAGS += arch=armv7
else
# covers arm64, ia64, mips, sparc64, etc.
BUILD_FLAGS += arch=$(DEB_HOST_GNU_CPU)
endif
endif
endif
%:
dh $@
override_dh_auto_build:
# dump out diagnostics
cat /proc/cpuinfo
gcc -dM -E - < /dev/null
echo Build system page size is $$(($$(getconf PAGESIZE) >> 10)) KiB
sed -e "s/@VERSION@/$(DEB_VERSION)/g" \
-e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
debian/tbb.pc.in > debian/tbb.pc
dh_auto_build -- $(BUILD_FLAGS)
# Makefiles should not be compressed (tbb-examples)
override_dh_compress-indep:
dh_compress -X*/examples/*
override_dh_auto_clean:
dh_auto_clean
-$(RM) debian/tbb.pc
|