File: rules

package info (click to toggle)
libdeflate 1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 828 kB
  • sloc: ansic: 8,675; sh: 1,016; makefile: 273
file content (51 lines) | stat: -rwxr-xr-x 1,684 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
#!/usr/bin/make -f

export LC_ALL=C.UTF-8

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@


override_dh_auto_build:
	make CFLAGS="$(shell dpkg-buildflags --get CFLAGS) -fprofile-generate" \
		LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS) -fprofile-generate"\
		CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)"\
		V=1 PREFIX=/usr DESTDIR=$(CURDIR)/debian/tmp -j$(shell nproc)\
		"INSTALL=install --strip-program=true"\
		all test_programs
	for level in $(shell seq 1 12); do \
		./benchmark -$${level} ./lib/deflate_compress.c > /dev/null; \
	done
	make CFLAGS="$(shell dpkg-buildflags --get CFLAGS) -fprofile-use" \
		LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS) -fprofile-use"\
		CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)"\
		V=1 PREFIX=/usr DESTDIR=$(CURDIR)/debian/tmp -j$(shell nproc)\
		"INSTALL=install --strip-program=true"\
		all test_programs

override_dh_auto_install:
	make CFLAGS="$(shell dpkg-buildflags --get CFLAGS) -fprofile-use" \
		LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS) -fprofile-use"\
		CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)"\
		V=1 PREFIX=/usr DESTDIR=$(CURDIR)/debian/tmp -j$(shell nproc)\
		"INSTALL=install --strip-program=true"\
		install

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- V=1
	# SMOKEDATA=$(CURDIR)/README.md WRAPPER= tools/run_tests.sh \
	# 	  -checksum_benchmarks -windows -android -mips \
	# 	  -static_analysis -native -valgrind
	# SMOKEDATA=$(CURDIR)/README.md WRAPPER= sh tools/exec_tests.sh
endif

override_dh_install:
	dh_install
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    debian/tmp/usr/lib/*.so