File: rules

package info (click to toggle)
libnih 1.0.3-11
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 11,824 kB
  • sloc: ansic: 188,730; sh: 11,217; makefile: 1,117; yacc: 291; xml: 239; sed: 16
file content (25 lines) | stat: -rwxr-xr-x 762 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
25
#!/usr/bin/make -f
%:
	dh $@

include /usr/share/dpkg/architecture.mk

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/$(DEB_HOST_MULTIARCH)/libnih.so
	dh_link -plibnih-dbus-dev lib/$$(basename $$(readlink debian/tmp/usr/lib/*/libnih-dbus.so)) usr/lib/$(DEB_HOST_MULTIARCH)/libnih-dbus.so
	dh_link --remaining-packages