More small build tweaks. Maemo extras-devel buildbot successfully compiles weightgrap...
[weightgraph] / weightgraph / debian / rules
1 #!/usr/bin/make -f
2 APPNAME = weightgraph
3
4 # Use hardware floating point
5 ifneq (,$(findstring vfp,$(DEB_BUILD_OPTIONS)))
6 CFLAGS += -mfpu=vfp -mfloat-abi=softfp
7 endif
8
9 builddir:
10         mkdir -p builddir
11
12 builddir/Makefile: builddir
13         cd builddir && qmake-qt4 PREFIX=/usr ../$(APPNAME).pro
14
15 build: build-stamp
16
17 build-stamp: builddir/Makefile
18         dh_testdir
19         # compile commands go here
20         cd builddir && $(MAKE) -j6
21         touch $@
22
23 clean:
24         dh_testdir
25         dh_testroot
26         rm -f build-stamp
27         # cleanup commands go here
28         rm -rf builddir
29         dh_clean
30 install: build
31         dh_testdir
32         dh_testroot
33         dh_clean -k
34         dh_installdirs
35         # install commands go here
36         cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install
37
38 # Build arch-independent files here
39 binary-indep: build install
40 #We have nothing to do by default
41
42 # Build architecture-dependent files here.
43 binary-arch: build install
44         dh_testdir
45         dh_testroot
46         dh_installdocs
47         dh_installexamples
48         dh_installman
49         dh_installchangelogs
50         dh_link
51 #       dh_strip --dbg-package=appname-dbg
52         dh_compress
53         dh_fixperms
54         dh_installdeb
55         dh_shlibdeps
56         dh_gencontrol
57         dh_md5sums
58         dh_builddeb
59  
60 binary: binary-indep binary-arch
61 .PHONY: build clean binary-indep binary-arch binary install configure