blob: 04714d648bd1c83b102be46461bb451c217fb7b0 [file] [log] [blame]
Eric Andersenb108a5b2000-06-19 09:21:34 +00001#!/usr/bin/make -f
2
3# This is a bit unusual, in that I have to completely recompile everything
4# twice. The first is the normal, dynamically linked package. The second is
5# for the statically linked package. This file has been adjusted accordingly.
6
7# This is the debhelper compatability version to use.
8export DH_COMPAT=1
9
10bb=debian/tmp
11bbs=debian/busybox-static
12
13clean:
14 dh_testdir
15 dh_testroot
16 rm -f build-stamp-busybox build-stamp-busybox-static
17 -$(MAKE) clean
18 -rm -rf $(bb) $(bbs)
19 dh_clean
20
21half_clean:
22 dh_testdir
23 dh_testroot
24 rm -rf $(bbs) build-stamp-busybox-static
25 -$(MAKE) clean
26
27build: build-stamp-busybox
28build-stamp-busybox:
29 dh_testdir
30 $(MAKE)
31 touch build-stamp-busybox
32
33install: build
34 dh_testdir
35 dh_testroot
36 dh_clean -k
37 dh_installdirs
38 $(MAKE) "PREFIX=$(bb)" install
39 mkdir -p $(bb)/usr/share/man/man1
40 cp docs/BusyBox.1 $(bb)/usr/share/man/man1/busybox.1
41
42# Now for the statically linked stuff
43build-static: build-stamp-busybox-static
44build-stamp-busybox-static:
45 dh_testdir
46 $(MAKE) DOSTATIC=true
47 touch build-stamp-busybox-static
48
49install-static: build
50 dh_testdir
51 dh_testroot
52 dh_clean -k
53 dh_installdirs
54 # Do not run 'make install', since we do not want all the symlinks.
55 # This just installes the busybox binary...
56 #$(MAKE) "PREFIX=$(bbs)" install
57 mkdir -p $(bbs)/bin/
58 cp busybox $(bbs)/bin/busybox
59 mkdir -p $(bbs)/usr/share/man/man1/
60 cp docs/BusyBox.1 $(bbs)/usr/share/man/man1/busybox.1
61
62do_static: half_clean build-static install-static
63
64
65# Build architecture-independent files here.
66binary-indep:
67# We have nothing to do by default.
68
69# Build architecture-dependent files here.
Eric Andersen30f0f2d2000-06-19 09:29:32 +000070binary-arch: busybox busybox-static
Eric Andersenb108a5b2000-06-19 09:21:34 +000071
72busybox: install
73 @echo "--- Building: $@"
74 dh_testdir
75 dh_testroot
76 dh_installdirs
77 dh_installdocs -p$@ docs/BusyBox.txt \
78 docs/BusyBox.html docs/busybox.lineo.com AUTHORS README TODO
79 rm -rf $(bb)/usr/share/doc/busybox/busybox.lineo.com/CVS \
80 $(bb)/usr/share/doc/busybox/busybox.lineo.com/.cvsignore \
81 $(bb)/usr/share/doc/busybox/busybox.lineo.com/images/CVS \
82 $(bb)/usr/share/doc/busybox/busybox.lineo.com/images/.cvsignore
83 #dh_undocumented -p$@
84 dh_installchangelogs -p$@ Changelog
85 dh_strip -p$@
86 dh_compress -p$@
87 dh_fixperms -p$@
88 dh_installdeb -p$@
89 dh_shlibdeps -p$@
90 dh_gencontrol -p$@
91 dh_md5sums -p$@
92 dh_builddeb -p$@
93
94
95busybox-static: do_static
96 @echo "--- Building: $@"
97 dh_testdir
98 dh_testroot
99 dh_installdirs
100 dh_installdocs -p$@ docs/BusyBox.txt \
101 docs/BusyBox.html docs/busybox.lineo.com AUTHORS README TODO
102 rm -rf $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/CVS \
103 $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/.cvsignore \
104 $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/images/CVS \
105 $(bbs)/usr/share/doc/busybox-static/busybox.lineo.com/images/.cvsignore
106 dh_undocumented -p$@
107 dh_installchangelogs -p$@ Changelog
108 dh_strip -p$@
109 dh_compress -p$@
110 dh_fixperms -p$@
111 dh_installdeb -p$@
112 dh_shlibdeps -p$@
113 dh_gencontrol -p$@
114 dh_md5sums -p$@
115 dh_builddeb -p$@
116
117
118binary: binary-indep binary-arch
119.PHONY: build clean binary-indep binary-arch binary install