File: rules

package info (click to toggle)
primecount 8.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,640 kB
  • sloc: cpp: 21,835; ansic: 121; sh: 99; makefile: 89
file content (67 lines) | stat: -rwxr-xr-x 1,527 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
#!/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 -- \
		-DWITH_POPCNT=OFF \
		-DBUILD_LIBPRIMESIEVE=OFF \
		-DBUILD_SHARED_LIBS=ON \
		-DBUILD_STATIC_LIBS=ON \
		-DBUILD_TESTS=ON \
		-DBUILD_MANPAGE=ON

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

override_dh_auto_test-indep:
	true

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

override_dh_prep-arch: README.toc.md

override_dh_installdocs:
	dh_installdocs -pprimecount-bin    --link-doc=libprimecount8
	dh_installdocs -plibprimecount-dev --doc-main-package=libprimecount-dev-common
	dh_installdocs --remaining-packages

override_dh_compress-indep:
	dh_compress -X.pdf -X.md -Xexamples

override_dh_missing:
	dh_missing --list-missing

README.toc.md:
	sed \
			-e '/\[libprimecount/d' \
			-e '/\[primecount-backup/d' \
			-e '/\[BUILD/d' \
			-e '/\[RELEASE/d' \
		doc/README.md > README.toc.md

CMAKE ?= cmake