Store a custom Rules.mak file to enable buildign static binaries
[oweals/busybox.git] / debian / rules
1 #!/usr/bin/make -f
2
3 export DH_VERBOSE=1
4 export DH_COMPAT=3
5
6 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
7         CFLAGS += -g
8 endif
9 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
10         INSTALL_PROGRAM += -s
11 endif
12
13 binary-indep:
14
15 busybox-deb:
16         dh_testdir
17         dh_testroot
18         $(MAKE) clean
19         cp ./debian/config-deb .config
20         cp ./debian/Rules.mak.shared Rules.mak
21         $(MAKE) dep
22         $(MAKE)
23         install -D busybox ./debian/busybox/bin/busybox
24         dh_installchangelogs Changelog -pbusybox
25         dh_installdocs -pbusybox
26         dh_strip -pbusybox
27         dh_compress -pbusybox
28         dh_fixperms -pbusybox
29         dh_installdeb -pbusybox
30         dh_shlibdeps -pbusybox
31         dh_gencontrol -pbusybox
32         dh_md5sums -pbusybox
33         dh_builddeb -pbusybox
34                                                                                 
35 busybox-udeb:
36         dh_testdir
37         dh_testroot
38         $(MAKE) clean
39         cp ./debian/config-udeb .config
40         cp ./debian/Rules.mak.shared Rules.mak
41         $(MAKE) dep
42         $(MAKE)
43         install -D busybox ./debian/busybox-udeb/bin/busybox
44         dh_installchangelogs Changelog -pbusybox-udeb
45         dh_strip -pbusybox-udeb
46         dh_compress -pbusybox-udeb
47         dh_fixperms -pbusybox-udeb
48         dh_installdeb -pbusybox-udeb
49         dh_shlibdeps -pbusybox-udeb
50         dh_gencontrol -pbusybox-udeb
51         dh_md5sums -pbusybox-udeb
52         dh_builddeb -pbusybox-udeb
53
54
55 busybox-static:
56         dh_testdir
57         dh_testroot
58         $(MAKE) clean
59         cp ./debian/config-static .config
60         cp ./debian/Rules.mak.static Rules.mak
61         $(MAKE) dep
62         $(MAKE)
63         install -D busybox ./debian/busybox-static/bin/busybox
64         dh_installchangelogs Changelog -pbusybox-static
65         dh_installdocs -pbusybox-static
66         dh_strip -pbusybox-static
67         dh_compress -pbusybox-static
68         dh_fixperms -pbusybox-static
69         dh_installdeb -pbusybox-static
70         dh_shlibdeps -pbusybox-static
71         dh_gencontrol -pbusybox-static
72         dh_md5sums -pbusybox-static
73         dh_builddeb -pbusybox-static
74
75 binary-arch: busybox-deb busybox-udeb busybox-static
76
77 binary-indep:
78         dh_testdir
79         dh_testroot
80         $(MAKE) clean
81         $(MAKE) newdoc
82         dh_installdocs -pbusybox-doc
83         dh_installchangelogs Changelog -pbusybox-doc
84         dh_compress -pbusybox-doc
85         dh_fixperms -pbusybox-doc
86         dh_installdeb -pbusybox-doc
87         dh_gencontrol -pbusybox-doc
88         dh_md5sums -pbusybox-doc
89         dh_builddeb -pbusybox-doc
90
91 binary: binary-indep binary-arch
92 .PHONY: build clean binary-indep binary-arch binary install configure