File: rules

package info (click to toggle)
primesieve 7.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,080 kB
  • sloc: cpp: 7,270; ansic: 455; sh: 199; makefile: 86
file content (59 lines) | stat: -rwxr-xr-x 1,405 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

## inspired from mpfr material
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS    += -O0
	CXXCFLAGS += -O0
else ifeq ($(DEB_HOST_ARCH),alpha)
	CFLAGS   += -mieee
	CXXFLAGS += -mieee
else ifeq ($(DEB_HOST_ARCH),sha4)
	CFLAGS   += -mieee
	CXXFLAGS += -mieee
else
	CFLAGS   := $(subst -O2,-O3,$(CFLAGS))
	CXXFLAGS := $(subst -O2,-O3,$(CXXFLAGS))
endif

default:
	@uscan --no-conf --dehs --report || true

%:
	dh $@ --builddirectory=_build

override_dh_auto_configure:
	dh_auto_configure -- \
		-DBUILD_TESTS=ON \
		-DBUILD_EXAMPLES=ON \
		-DBUILD_DOC=ON

override_dh_auto_build-indep: README.implementation.md
	$(MAKE) -f debian/adhoc/Makefile doc

override_dh_auto_test-indep:
	true

override_dh_prep-arch: README.implementation.md

override_dh_auto_install-indep:
	DESTDIR=$(CURDIR)/debian/tmp $(CMAKE) \
			-DCMAKE_INSTALL_COMPONENT=libprimesieve-headers \
		-P _build/cmake_install.cmake

override_dh_installdocs:
	dh_installdocs -pprimesieve-bin    --link-doc=libprimesieve9
	dh_installdocs -plibprimesieve-dev --doc-main-package=libprimesieve-dev-common
	dh_installdocs --remaining-packages

override_dh_installexamples-indep:
	dh_installexamples -XCMakeLists.txt -XREADME.md

override_dh_compress-indep:
	dh_compress -X.pdf -Xexamples

README.implementation.md:
	cp -p src/README.md README.implementation.md

CMAKE ?= cmake