Fix signed integer warning; debian build hardening
[wdq2wav.git] / debian / rules
1 #!/usr/bin/make -f
2
3 CFLAGS = -Wall -g
4
5 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
6         CFLAGS += -O0
7 else
8         CFLAGS += -O2
9 endif
10 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
11         INSTALL_PROGRAM += -s
12 endif
13
14 export DEB_BUILD_HARDENING=1
15 export DPKG_EXPORT_BUILDFLAGS=1
16 export DEB_BUILD_MAINT_OPTIONS="hardening=+all" 
17 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
18 CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
19 CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
20 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
21
22
23 configure: configure-stamp
24 configure-stamp:
25         dh_testdir
26         touch configure-stamp
27
28
29 build: build-stamp build-arch build-indep
30
31 build-stamp: configure-stamp
32         dh_testdir
33         $(MAKE)
34         touch build-stamp
35
36 clean:
37         dh_testdir
38         dh_testroot
39         rm -f build-stamp configure-stamp
40         $(MAKE) clean
41         dh_clean
42
43 install: build
44         dh_testdir
45         dh_testroot
46         dh_prep
47         dh_installdirs
48         DPKG_EXPORT_BUILDFLAGS=1
49         $(MAKE)
50         dh_install wdq2wav usr/bin
51
52 binary-indep: 
53
54 binary-arch: install
55         dh_testdir
56         dh_testroot
57         dh_installdocs
58         dh_installexamples
59         dh_installmenu
60         dh_installcron
61         dh_installman wdq2wav.1
62         dh_installinfo
63         dh_installchangelogs 
64         dh_link
65         dh_strip
66         dh_compress
67         dh_fixperms
68         dh_installdeb
69         dh_shlibdeps
70         dh_gencontrol
71         dh_md5sums
72         dh_builddeb
73
74 build-indep:
75
76 build-arch:
77
78 binary: clean binary-indep binary-arch
79 .PHONY: build clean binary-indep binary-arch binary install configure