File: rules

package info (click to toggle)
veryfasttree 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,308 kB
  • sloc: cpp: 7,403; python: 209; sh: 38; makefile: 36
file content (49 lines) | stat: -rwxr-xr-x 1,135 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
#!/usr/bin/make -f

# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/default.mk

%:
	dh $@


override_dh_auto_configure:
ifeq (amd64,$(DEB_HOST_ARCH))
	for i in "sse2 SEE2" "sse4_1 SEE4" "avx AVX" "avx2 AVX2" "avx512f AVX512" ; do \
		set -- $${i} ; \
		dh_auto_configure --builddirectory build_$${1} -- \
			-DUSE_NATIVE=OFF -DUSE_SHARED=ON -DUSE_$${2}=ON ; \
	done
else
	dh_auto_configure -- \
		-DUSE_NATIVE=OFF -DUSE_SHARED=ON
endif


override_dh_auto_build:
ifeq (amd64,$(DEB_HOST_ARCH))
	for SIMD in avx512f avx2 avx sse4_1 sse2 ; do \
		dh_auto_build --builddirectory build_$${SIMD} && \
		mv build_$${SIMD}/VeryFastTree build_$${SIMD}/VeryFastTree-$${SIMD} ; \
	done
	mkdir -p build_simd
	cp debian/bin/VeryFastTree-simd build_simd/VeryFastTree
else
	dh_auto_build
endif


override_dh_auto_install:
ifeq (amd64,$(DEB_HOST_ARCH))
	dh_install build_*/VeryFastTree-* /usr/libexec/VeryFastTree/
	dh_install build_*/VeryFastTree /usr/bin/
else
	dh_auto_install
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -Rf build_*