File: rules

package info (click to toggle)
libnih 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,384 kB
  • ctags: 4,453
  • sloc: ansic: 185,873; sh: 11,213; makefile: 1,116; yacc: 291; xml: 227; sed: 16
file content (24 lines) | stat: -rwxr-xr-x 674 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/make -f
%:
	dh $@


CFLAGS = -Wall -g -fstack-protector -fPIE
LDFLAGS = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -pie

# Disable optimisations if noopt found in $DEB_BUILD_OPTIONS
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
	LDFLAGS += -Wl,-O0
else
	CFLAGS += -Os
	LDFLAGS += -Wl,-O1
endif

override_dh_auto_configure:
	dh_auto_configure -- CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"

override_dh_link:
	dh_link -plibnih-dev lib/$$(basename $$(readlink debian/tmp/usr/lib/libnih.so)) usr/lib/libnih.so
	dh_link -plibnih-dbus-dev lib/$$(basename $$(readlink debian/tmp/usr/lib/libnih-dbus.so)) usr/lib/libnih-dbus.so
	dh_link --remaining-packages