File: rules

package info (click to toggle)
xidle 20161031
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 56 kB
  • ctags: 40
  • sloc: ansic: 230; makefile: 60
file content (66 lines) | stat: -rwxr-xr-x 1,432 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
#!/usr/bin/make -f

shellescape='$(subst ','\'',$(1))'
shellexport=$(1)=$(call shellescape,${$(1)})

CC?=			gcc
EXTRA_CFLAGS=		-Wall -Wextra -Wformat
EXTRA_CPPFLAGS=
EXTRA_LDFLAGS=		-Wl,--as-needed

ifneq (,$(wildcard /usr/share/dpkg/buildflags.mk))
# dpkg-dev (>= 1.16.1~)
DEB_CFLAGS_MAINT_APPEND=${EXTRA_CFLAGS}
DEB_CPPFLAGS_MAINT_APPEND=${EXTRA_CPPFLAGS}
DEB_LDFLAGS_MAINT_APPEND=${EXTRA_LDFLAGS}
DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/buildflags.mk
else
# old-fashioned way to determine build flags
CFLAGS=			-O$(if $(findstring noopt,${DEB_BUILD_OPTIONS}),0,2) -g
CFLAGS+=		${EXTRA_CFLAGS}
CPPFLAGS+=		${EXTRA_CPPFLAGS}
LDFLAGS+=		${EXTRA_LDFLAGS}
endif

DO_BSDMAKE:=		env LC_ALL=C \
			    $(foreach i,CC CPPFLAGS CFLAGS LDFLAGS,$(call shellexport,$i)) \
			    pmake NOGCCERROR=1

build build-arch: xidle
build-indep:

xidle:
	dh_testdir
	${DO_BSDMAKE} clean
	${DO_BSDMAKE} depend
	${DO_BSDMAKE} xidle

clean:
	dh_testdir
	${DO_BSDMAKE} cleandir
	dh_clean

binary-indep: build-indep

binary-arch: build-arch
	dh_testdir
	dh_testroot
	if test -x "$$(which dh_prep)"; then dh_prep; else dh_clean -k; fi
	dh_installchangelogs
	dh_installdocs
	dh_install
	dh_installman
	dh_lintian
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean