File: rules

package info (click to toggle)
epcr 2.3.12-1-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 920 kB
  • sloc: cpp: 5,730; ansic: 231; makefile: 45; python: 26; sh: 12
file content (42 lines) | stat: -rwxr-xr-x 951 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
#!/usr/bin/make -f
# Andreas Tille <tille@debian.org>, GPL

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

VERSION := $(DEB_VERSION_UPSTREAM)
VER_MAJOR := $(shell echo $(VERSION) | sed 's/^\([0-9]\+\)\..*/\1/')
VER_MINOR := $(shell echo $(VERSION) | sed 's/^[0-9]\+\.\([0-9]\+\)\..*/\1/')
VER_BUILD := $(shell \
	echo $(VERSION) \
	| sed 's/^[0-9]\+\.[0-9]\+\.\([0-9]\+\).*/\1/' \
)

export DEB_CFLAGS_MAINT_APPEND = \
	-I. \
	-g2 \
	-DDEALLOCATE=0 \
	-DVERSION=\\\"$(VERSION)\\\" \
	-DVER_MAJOR=$(VER_MAJOR) \
	-DVER_MINOR=$(VER_MINOR) \
	-DVER_BUILD=$(VER_BUILD) \
	-DSTANDALONE=1
export DEB_LDFLAGS_MAINT_APPEND = -L.

%:
	dh $@

override_dh_auto_clean:
	rm -fr epcr
	rm -f *_depend.mk
	rm -f libepcr.a *.o
	rm -f e-PCR famap fahash re-PCR

override_dh_auto_build:
	dh_auto_build -- links OPTIMIZE=6
	dh_auto_build -- depend OPTIMIZE=6
	dh_auto_build -- all OPTIMIZE=6

override_dh_auto_install:
	# do nothing