#!/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"