Enable building with -mthumb for ARM by default
[browser-switch] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12 # Optimize for N8x0 CPUs if building for armel
13 ifeq ($(DEB_HOST_ARCH),armel)
14         EXTRA_CFLAGS += -mcpu=arm1136jf-s
15         # Use Thumb for smaller binaries unless otherwise requested
16         ifeq (,$(filter nothumb,$(DEB_BUILD_OPTIONS)))
17                 EXTRA_CFLAGS += -mthumb
18         endif
19 endif
20
21 configure: configure-stamp
22 configure-stamp:
23         touch configure-stamp
24
25
26 build: build-stamp
27
28 build-stamp: configure-stamp 
29         dh_testdir
30
31         make EXTRA_CFLAGS="$(EXTRA_CFLAGS)" diablo
32         make -C config-ui EXTRA_CFLAGS="$(EXTRA_CFLAGS)" diablo-plugin
33
34         touch $@
35
36 clean:
37         dh_testdir
38         dh_testroot
39         rm -f build-stamp configure-stamp
40
41         make clean
42         make -C config-ui clean
43
44         dh_clean 
45
46 install: build
47         dh_testdir
48         dh_testroot
49         dh_clean -k 
50         dh_installdirs
51
52         # Add here commands to install the package into
53         # debian/browser-switchboard.
54         make DESTDIR=debian/browser-switchboard install
55         make -C config-ui DESTDIR=../debian/browser-switchboard install
56
57
58 binary-indep: build install
59 # arch: any package, nothing to do here
60
61 binary-arch: build install
62         dh_testdir
63         dh_testroot
64         dh_installchangelogs 
65         dh_installdocs
66         dh_installexamples
67 #       dh_install
68 #       dh_installmenu
69 #       dh_installdebconf       
70 #       dh_installlogrotate
71 #       dh_installemacsen
72 #       dh_installpam
73 #       dh_installmime
74 #       dh_python
75 #       dh_installinit
76 #       dh_installcron
77 #       dh_installinfo
78 #       dh_installman
79 #       dh_link
80         dh_strip
81         dh_compress
82         dh_fixperms
83 #       dh_perl
84 #       dh_makeshlibs
85         dh_installdeb
86         dh_shlibdeps
87         dh_gencontrol
88         dh_md5sums
89         dh_builddeb
90
91 binary: binary-indep binary-arch
92 .PHONY: build clean binary-indep binary-arch binary install configure