File: rules

package info (click to toggle)
rng-tools-debian 2.6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 368 kB
  • sloc: ansic: 2,690; sh: 200; makefile: 58
file content (54 lines) | stat: -rwxr-xr-x 1,346 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
#!/usr/bin/make -f

ifeq (,$(filter terse,${DEB_BUILD_OPTIONS}))
export DH_VERBOSE=1
export V=1
export VERBOSE=1
endif

LC_ALL:=C.UTF-8
export LC_ALL
TZ:=UTC
export TZ

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

include /usr/share/dpkg/architecture.mk
DPKG_EXPORT_BUILDTOOLS:=1
include /usr/share/dpkg/buildtools.mk

OUR_CPPFLAGS:=
OUR_CFLAGS:=
OUR_LDFLAGS:=

ifneq (,$(filter debug,${DEB_BUILD_OPTIONS}))
OUR_CFLAGS+=	-Og -g3
endif

OUR_CFLAGS+=	-Wall

dpkgbuildflagsmkescape=$(subst \,\\\,$(1))
export DEB_BUILD_MAINT_OPTIONS:=hardening=+all optimize=-lto
export DEB_CPPFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_CPPFLAGS})
export DEB_CFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_CFLAGS})
export DEB_LDFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_LDFLAGS})
include /usr/share/dpkg/buildflags.mk

# detect i386 (or amd64) and force-enable VIA PadLock support
ifneq (,$(filter ${DEB_HOST_ARCH},i386 amd64))
CONFIGURE_ARGS+=	--enable-viapadlock
else
CONFIGURE_ARGS+=	--disable-viapadlock
endif

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- ${CONFIGURE_ARGS}
	# quieten binutils vs. autotools/libtool conflict of interest
	perl -pi -e 's/^ARFLAGS\s*=.*$$/ARFLAGS=rc/' Makefile

override_dh_installinit:
	dh_installinit --error-handler=true