too bad upstream doesn't like make ... sigh
[debian/splat] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 build: build-stamp
9 build-stamp: 
10         dh_testdir      
11         cp std-parms.h splat.h
12         g++ -Wall -O3 -fomit-frame-pointer -ffast-math itm.cpp splat.cpp -lm -lbz2 -o splat
13         cp hd-parms.h splat.h
14         g++ -Wall -O3 -fomit-frame-pointer -ffast-math itm.cpp splat.cpp -lm -lbz2 -o splat-hd
15         (cd utils ; \
16                 cc -Wall -O3 -fomit-frame-pointer citydecoder.c -o citydecoder)
17         (cd utils ; \
18                 cc -Wall -O3 -fomit-frame-pointer usgs2sdf.c -o usgs2sdf)
19         (cd utils ; \
20                 cc -Wall -O3 -lbz2 -fomit-frame-pointer srtm2sdf.c -o srtm2sdf)
21         (cd utils ; \
22                 cc -Wall -O3 -lz -fomit-frame-pointer fontdata.c -o fontdata)
23         (cd utils ; \
24                 cc -Wall -O3 -fomit-frame-pointer -lm bearing.c -o bearing)
25         touch build-stamp
26
27 clean:
28         dh_testdir
29         dh_testroot
30         rm -f build-stamp splat splat-hd splat.h
31         rm -f utils/srtm2sdf utils/fontdata utils/citydecoder utils/usgs2sdf \
32                 utils/bearing
33         dh_clean
34
35 install: build
36         dh_testdir
37         dh_testroot
38         dh_clean -k
39         dh_installdirs
40         cp splat $(CURDIR)/debian/splat/usr/bin
41         cp splat-hd $(CURDIR)/debian/splat/usr/bin
42         cp utils/citydecoder $(CURDIR)/debian/splat/usr/bin
43         cp utils/usgs2sdf $(CURDIR)/debian/splat/usr/bin
44         cp utils/srtm2sdf $(CURDIR)/debian/splat/usr/bin
45         cp utils/fontdata $(CURDIR)/debian/splat/usr/bin
46         cp utils/bearing $(CURDIR)/debian/splat/usr/bin
47         cp docs/english/man/splat.man \
48                 $(CURDIR)/debian/splat/usr/share/man/man1/splat.1
49
50 # Build architecture-independent files here.
51 binary-indep: build install
52
53 # Build architecture-dependent files here.
54 binary-arch: build install
55         dh_testdir
56         dh_testroot
57         dh_installdocs
58         cp utils/README $(CURDIR)/debian/splat/usr/share/doc/splat/README.utils
59         dh_installexamples
60         dh_installmenu
61         dh_installcron
62         dh_installman
63         dh_installinfo
64         dh_installchangelogs 
65         dh_link
66         dh_strip
67         dh_compress
68         dh_fixperms
69         dh_installdeb
70         dh_shlibdeps
71         dh_gencontrol
72         dh_md5sums
73         dh_builddeb
74
75 binary: binary-indep binary-arch
76 .PHONY: build clean binary-indep binary-arch binary install