Use different CFLAGS for debug & package builds
[mspang/pyceo.git] / debian / rules
1 #!/usr/bin/make -f
2
3 CFLAGS  := -g -O2 -fstack-protector-all -fPIE
4 LDFLAGS := -pie
5
6 build:
7         python setup.py -q build
8         cd src && make CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
9
10 clean:
11         dh_testdir
12         dh_testroot
13         dh_clean
14         $(MAKE) -C src clean
15         python setup.py -q clean -a
16
17 install: build
18         dh_testdir
19         dh_testroot
20         dh_installdirs
21         python setup.py -q install --no-compile -O0 --root=debian/ceo
22         $(MAKE) -C src DESTDIR=$(PWD)/debian/ceo PREFIX=/usr install
23         
24 binary-arch: build install
25         dh_testdir
26         dh_testroot
27         dh_installchangelogs 
28         dh_installdocs
29         dh_installexamples
30         dh_install
31         dh_installman
32         dh_link
33         dh_strip
34         dh_compress
35         dh_fixperms
36         dh_pysupport
37         dh_installdeb
38         dh_shlibdeps
39         dh_gencontrol
40         dh_md5sums
41         dh_builddeb
42
43 binary-indep:
44
45 binary: binary-indep binary-arch
46
47 .PHONY: build clean binary-indep binary-arch binary install