File: rules

package info (click to toggle)
aflplusplus 4.04c-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,568 kB
  • sloc: ansic: 101,393; cpp: 15,334; sh: 4,215; python: 3,340; makefile: 896; javascript: 507; java: 43; sql: 3; xml: 1
file content (74 lines) | stat: -rwxr-xr-x 2,003 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
#!/usr/bin/make -f
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# don't emit NEON instructions whatsoever to prevent FTBFS on machines which
# doesn't support that, see #842143 [thanks to Paul Wise]
ifeq "$(shell dpkg-architecture -q DEB_HOST_ARCH)" "armhf"
export DEB_CFLAGS_MAINT_APPEND = -mfpu=vfpv3
export DEB_CXXFLAGS_MAINT_APPEND = -mfpu=vfpv3
endif

export HOSTNAME =
export PREFIX = /usr

ifeq "$(filter i386 amd64,$(shell dpkg-architecture -q DEB_HOST_ARCH_CPU))" ""
export AFL_NO_X86 = 1
endif

# Keep this in sync with Build-Depends (clang-X, llvm-X-dev)
export LLVM_MAJOR_VERSION = 14
export LLVM_CONFIG = llvm-config-$(LLVM_MAJOR_VERSION)

%:
	dh $@ --with buildinfo

override_dh_auto_build:
	$(MAKE) distrib

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	rm $(CURDIR)/debian/tmp/usr/bin/afl-clang
	rm $(CURDIR)/debian/tmp/usr/bin/afl-clang++
	# insert correct version in helper-script
	sed -i "s|LLVM_MAJOR_VERSION|$(LLVM_MAJOR_VERSION)|" debian/helper-script/afl-clang
	sed -i "s|LLVM_MAJOR_VERSION|$(LLVM_MAJOR_VERSION)|" debian/helper-script/afl-clang++

override_dh_install:
	dh_install
ifneq "$(AFL_NO_X86)" ""
	# Keep only the *-fast* variants on non-x86
	cd debian/afl++/usr/lib/afl/ && rm as afl-as
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) test
endif

override_dh_gencontrol:
	dh_gencontrol -- -Vllvm-major-version=$(LLVM_MAJOR_VERSION)

override_dh_installdocs:
	dh_installdocs -A README.md -XINSTALL.md

override_dh_compress:
	dh_compress -X.c -X.mp4 -X.sql -XREADME -X.txt

# Exclude afl++-doc from many operations due to embedded binaries
override_dh_buildinfo:
	dh_buildinfo -Nafl++-doc

override_dh_strip_nondeterminism:
	# see #803503
	dh_strip_nondeterminism -Nafl++-doc

override_dh_strip:
	dh_strip -Nafl++-doc

override_dh_makeshlibs:
	dh_makeshlibs -Nafl++-doc

override_dh_dwz:
	# do not run dh_dwz. Since clang 14 it fails with
	# "Unknown debugging section .debug_addr"