File: rules

package info (click to toggle)
tbb 2020.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,844 kB
  • sloc: cpp: 142,989; ansic: 11,007; makefile: 1,367; python: 860; asm: 517; sh: 406; javascript: 215; lisp: 198; objc: 176; pascal: 65
file content (83 lines) | stat: -rwxr-xr-x 2,047 bytes parent folder | download
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/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-arch:
# 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)

override_dh_auto_build-indep:
	$(MAKE) doxygen

override_dh_auto_test-indep:
	:

override_dh_auto_install-arch:
	dh_auto_install
	# install cmake files (TBBConfig*.cmake) to libtbb-dev
	-cmake -DINSTALL_DIR=debian/libtbb-dev/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/TBB \
		-DSYSTEM_NAME=Linux -DTBB_VERSION_FILE=include/tbb/tbb_stddef.h \
		-DLIB_REL_PATH="../../" \
		-DINC_REL_PATH="../../../../include" \
		-P cmake/tbb_config_installer.cmake

# 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