File: rules

package info (click to toggle)
jemalloc 3.6.0-9.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,256 kB
  • ctags: 2,758
  • sloc: ansic: 21,324; perl: 3,931; sh: 3,689; makefile: 406
file content (57 lines) | stat: -rwxr-xr-x 1,473 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
#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1

DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

ifneq (,$(findstring $(DEB_HOST_ARCH),sparc sparc64))
  DEB_CPPFLAGS_MAINT_APPEND += -DLG_QUANTUM=4
endif

ifneq (,$(findstring $(DEB_HOST_ARCH),m68k or1k))
  DEB_CPPFLAGS_MAINT_APPEND += -DLG_QUANTUM=3
endif

ifneq (,$(findstring $(DEB_HOST_ARCH),powerpc))
  DEB_CPPFLAGS_MAINT_APPEND += -maltivec
endif

ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
  DEB_CPPFLAGS_MAINT_APPEND += -DJEMALLOC_PURGE_MADVISE_FREE
endif

ifeq ($(DEB_HOST_ARCH_OS),hurd)
  # Fake a PATH_MAX when building on Hurd to keep jemalloc happy
  DEB_CPPFLAGS_MAINT_APPEND += -DPATH_MAX=8192
endif

ifeq ($(DEB_HOST_ARCH),i386)
  # i386 needs -msse4.1 in order to be able to run the test suite
  # and as far as we can tell, *ONLY* the test suite
  TESTFLAGS += -msse4.1
endif

DEB_CFLAGS_MAINT_APPEND += -std=gnu99

export DEB_CFLAGS_MAINT_APPEND DEB_CPPFLAGS_MAINT_APPEND

%:
	dh $@ --parallel

override_dh_auto_build:
	make all doc

ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
export ASAN_OPTIONS = suppressions=$(CURDIR)/debian/asan-suppressions.txt
override_dh_auto_test:
	make check "TESTFLAGS=$(TESTFLAGS)"
endif

override_dh_auto_install:
	make install_include install_lib DESTDIR=$(CURDIR)/debian/tmp

override_dh_strip:
	dh_strip -p libjemalloc1 --dbg-package=libjemalloc1-dbg
	dh_strip -a --remaining-packages