File: rules

package info (click to toggle)
spread 3.17.4-2
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 1,800 kB
  • ctags: 2,322
  • sloc: ansic: 15,666; sh: 2,611; java: 2,291; perl: 556; yacc: 523; makefile: 255; lex: 204; xml: 77
file content (40 lines) | stat: -rwxr-xr-x 1,140 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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/dpatch.mk

DEB_SHLIBS_INCLUDE := debian/libspread1/usr/lib
DEB_CONFIGURE_SYSCONFDIR := /etc/spread
DEB_MAKE_CHECK_TARGET := 
DEB_CONFIGURE_EXTRA_FLAGS := --with-mantype=man

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  INSTALL_PROGRAM += -s
endif
# Make it even harder to exploit spread
ifeq ($(DEB_OPT_FLAG),-O2)
	CFLAGS += -D_FORTIFY_SOURCE=2
endif
ifneq ($(DEB_HOST_GNU_CPU),arm)
	CFLAGS += -fstack-protector
endif
CFLAGS += -fPIC
LDFLAGS += -Wl,-z,relro,-z,noexecstack,-z,now -pic
export CFLAGS
export LDFLAGS

configure/spread::
	sed -i 's/^\(LDFLAGS.*[[:space:]]\)\(\-pic\)\([[:space:]].*\)\?$$/\1-pie\3/' Makefile

configure/libspread-perl:: perl/Spread/Makefile.PL
	cd perl/Spread && perl Makefile.PL INSTALLDIRS=vendor

build/libspread-perl:: perl/Spread/Makefile
	cd perl/Spread && $(MAKE) LD_RUN_PATH="" OPTIMIZE="$(CFLAGS)"

install/libspread-perl::
	cd perl/Spread && $(MAKE) install PREFIX=$(DEB_DESTDIR)/usr

clean::
	cd perl/Spread && [ ! -f Makefile ] || $(MAKE) distclean