1 #!/usr/bin/make -f
2 # debian/rules for pfstmo
3 #
4 # Written by Sebastian Harl <tokkee@debian.org>
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CFLAGS = -Wall -g
15 CXXFLAGS = -Wall -g
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18 CFLAGS += -O0
19 CXXFLAGS += -O0
20 else
21 CFLAGS += -O2
22 CXXFLAGS += -O2
23 endif
25 config.status: configure
26 dh_testdir
28 for file in config.guess config.sub; do \
29 if [ ! -e $$file.upstream ]; then \
30 mv $$file $$file.upstream; \
31 ln -s /usr/share/misc/$$file .; \
32 fi \
33 done
35 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
36 --prefix=/usr --mandir=\$${prefix}/share/man \
37 --infodir=\$${prefix}/share/info \
38 CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)"
40 build: build-stamp
42 build-stamp: config.status
43 dh_testdir
45 $(MAKE)
47 touch build-stamp
49 clean:
50 dh_testdir
51 dh_testroot
52 rm -f build-stamp
54 [ ! -f Makefile ] || $(MAKE) distclean
55 for file in config.guess config.sub; do \
56 if [ -e $$file.upstream ]; then \
57 rm -f $$file; \
58 mv $$file.upstream $$file; \
59 fi \
60 done
62 dh_clean
64 install: build
65 dh_testdir
66 dh_testroot
67 dh_clean -k
68 dh_installdirs
70 $(MAKE) DESTDIR=$(CURDIR)/debian/pfstmo install
72 binary-indep: build install
73 # nothing to do here
75 binary-arch: build install
76 dh_testdir
77 dh_testroot
78 dh_installchangelogs ChangeLog
79 dh_installdocs AUTHORS README TODO
80 dh_installexamples
81 dh_installman
82 dh_link
83 dh_strip
84 dh_compress
85 dh_fixperms
86 dh_installdeb
87 dh_shlibdeps
88 dh_gencontrol
89 dh_md5sums
90 dh_builddeb
92 binary: binary-indep binary-arch
93 .PHONY: build clean binary-indep binary-arch binary install