diff options
32 files changed, 961 insertions, 732 deletions
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,175 +17,13 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | PROG := busybox | 20 | TOPDIR:= $(shell /bin/pwd)/ |
21 | VERSION := 0.61.pre | 21 | include $(TOPDIR).config |
22 | BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z") | 22 | include $(TOPDIR)Rules.mak |
23 | TOPDIR := ${shell /bin/pwd} | 23 | SUBDIRS:=applets archival archival/libunarchive console-tools \ |
24 | HOSTCC := gcc | 24 | editors fileutils findutils init miscutils modutils networking \ |
25 | HOSTCFLAGS:= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer | 25 | procps pwd_grp pwd_grp/libpwd_grp shell shellutils sysklogd \ |
26 | 26 | textutils util-linux libbb | |
27 | |||
28 | # What OS are you compiling busybox for? This allows you to include | ||
29 | # OS specific things, syscall overrides, etc. | ||
30 | TARGET_OS := linux | ||
31 | |||
32 | # With a modern GNU make(1) (highly recommended, that's what all the | ||
33 | # developers use), all of the following configuration values can be | ||
34 | # overridden at the command line. For example: | ||
35 | # make CROSS=powerpc-linux- BB_SRC_DIR=$HOME/busybox PREFIX=/mnt/app | ||
36 | |||
37 | # If you want to add some simple compiler switches (like -march=i686), | ||
38 | # especially from the command line, use this instead of CFLAGS directly. | ||
39 | # For optimization overrides, it's better still to set OPTIMIZATION. | ||
40 | CFLAGS_EXTRA = | ||
41 | |||
42 | # If you want a static binary, turn this on. | ||
43 | DOSTATIC = false | ||
44 | |||
45 | # Set the following to `true' to make a debuggable build. | ||
46 | # Leave this set to `false' for production use. | ||
47 | DODEBUG = false | ||
48 | |||
49 | # This enables compiling with dmalloc ( http://dmalloc.com/ ) | ||
50 | # which is an excellent public domain mem leak and malloc problem | ||
51 | # detector. To enable dmalloc, before running busybox you will | ||
52 | # want to first set up your environment. | ||
53 | # eg: `export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile` | ||
54 | # The debug= value is generated using the following command | ||
55 | # dmalloc -p log-stats -p log-non-free -p log-bad-space -p log-elapsed-time \ | ||
56 | # -p check-fence -p check-heap -p check-lists -p check-blank \ | ||
57 | # -p check-funcs -p realloc-copy -p allow-free-null | ||
58 | # Do not enable this for production builds... | ||
59 | DODMALLOC = false | ||
60 | |||
61 | # Electric-fence is another very useful malloc debugging library. | ||
62 | # Do not enable this for production builds... | ||
63 | DOEFENCE = false | ||
64 | |||
65 | # If you want large file summit support, turn this on. | ||
66 | # This has no effect if you don't have a kernel with lfs | ||
67 | # support, and a system with libc-2.1.3 or later. | ||
68 | # Some of the programs that can benefit from lfs support | ||
69 | # are dd, gzip, mount, tar, and mkfs_minix. | ||
70 | # LFS allows you to use the above programs for files | ||
71 | # larger than 2GB! | ||
72 | DOLFS = false | ||
73 | |||
74 | # If you have a "pristine" source directory, point BB_SRC_DIR to it. | ||
75 | # Experimental and incomplete; tell the mailing list | ||
76 | # <busybox@busybox.net> if you do or don't like it so far. | ||
77 | BB_SRC_DIR = | ||
78 | |||
79 | # If you are running a cross compiler, you may want to set CROSS | ||
80 | # to something more interesting, like "arm-linux-". | ||
81 | CROSS = | ||
82 | CC = $(CROSS)gcc | ||
83 | AR = $(CROSS)ar | ||
84 | AS = $(CROSS)as | ||
85 | LD = $(CROSS)ld | ||
86 | NM = $(CROSS)nm | ||
87 | STRIP = $(CROSS)strip | ||
88 | CPP = $(CC) -E | ||
89 | MAKEFILES = $(TOPDIR)/.config | ||
90 | export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP | ||
91 | |||
92 | |||
93 | # To compile vs uClibc, just use the compiler wrapper built by uClibc... | ||
94 | # Everything should compile and work as expected these days... | ||
95 | #CC = /usr/i386-linux-uclibc/usr/bin/i386-uclibc-gcc | ||
96 | |||
97 | # To compile vs some other alternative libc, you may need to use/adjust | ||
98 | # the following lines to meet your needs... | ||
99 | # | ||
100 | # If you are using Red Hat 6.x with the compatible RPMs (for developing under | ||
101 | # Red Hat 5.x and glibc 2.0) uncomment the following. Be sure to read about | ||
102 | # using the compatible RPMs (compat-*) at http://www.redhat.com ! | ||
103 | #LIBCDIR=/usr/i386-glibc20-linux | ||
104 | # | ||
105 | # The following is used for libc5 (if you install altgcc and libc5-altdev | ||
106 | # on a Debian system). | ||
107 | #LIBCDIR=/usr/i486-linuxlibc1 | ||
108 | # | ||
109 | # For other libraries, you are on your own... | ||
110 | #LDFLAGS+=-nostdlib | ||
111 | #LIBRARIES = $(LIBCDIR)/lib/libc.a -lgcc | ||
112 | #CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR) | ||
113 | #GCCINCDIR = $(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp") | ||
114 | |||
115 | # use '-Os' optimization if available, else use -O2 | ||
116 | OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null \ | ||
117 | >/dev/null 2>&1; then echo "-Os"; else echo "-O2" ; fi} | ||
118 | GCC_STACK_BOUNDRY := ${shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null \ | ||
119 | >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; else echo "" ; fi} | ||
120 | OPTIMIZATIONS=$(OPTIMIZATION) -fomit-frame-pointer $(GCC_STACK_BOUNDRY) #-fstrict-aliasing -march=i386 -mcpu=i386 -malign-functions=0 -malign-jumps=0 | ||
121 | WARNINGS=-Wall -Wstrict-prototypes -Wshadow | ||
122 | CFLAGS = -I$(TOPDIR)/include | ||
123 | ARFLAGS = -r | ||
124 | |||
125 | # | ||
126 | #-------------------------------------------------------- | ||
127 | # If you're going to do a lot of builds with a non-vanilla configuration, | ||
128 | # it makes sense to adjust parameters above, so you can type "make" | ||
129 | # by itself, instead of following it by the same half-dozen overrides | ||
130 | # every time. The stuff below, on the other hand, is probably less | ||
131 | # prone to casual user adjustment. | ||
132 | # | ||
133 | |||
134 | ifeq ($(strip $(DOLFS)),true) | ||
135 | # For large file summit support | ||
136 | CFLAGS+=-D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 | ||
137 | endif | ||
138 | ifeq ($(strip $(DODMALLOC)),true) | ||
139 | # For testing mem leaks with dmalloc | ||
140 | CFLAGS+=-DDMALLOC | ||
141 | LIBRARIES = -ldmalloc | ||
142 | # Force debug=true, since this is useless when not debugging... | ||
143 | DODEBUG = true | ||
144 | else | ||
145 | ifeq ($(strip $(DOEFENCE)),true) | ||
146 | LIBRARIES = -lefence | ||
147 | # Force debug=true, since this is useless when not debugging... | ||
148 | DODEBUG = true | ||
149 | endif | ||
150 | endif | ||
151 | ifeq ($(strip $(DODEBUG)),true) | ||
152 | CFLAGS += $(WARNINGS) -g -D_GNU_SOURCE | ||
153 | LDFLAGS += -Wl,-warn-common | ||
154 | STRIPCMD = /bin/true -Not_stripping_since_we_are_debugging | ||
155 | else | ||
156 | CFLAGS += $(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE | ||
157 | LDFLAGS += -s -Wl,-warn-common | ||
158 | STRIPCMD = $(STRIP) --remove-section=.note --remove-section=.comment | ||
159 | endif | ||
160 | ifeq ($(strip $(DOSTATIC)),true) | ||
161 | LDFLAGS += --static | ||
162 | endif | ||
163 | |||
164 | ifndef $(PREFIX) | ||
165 | PREFIX = `pwd`/_install | ||
166 | endif | ||
167 | |||
168 | # Additional complications due to support for pristine source dir. | ||
169 | # Include files in the build directory should take precedence over | ||
170 | # the copy in BB_SRC_DIR, both during the compilation phase and the | ||
171 | # shell script that finds the list of object files. | ||
172 | # Work in progress by <ldoolitt@recycle.lbl.gov>. | ||
173 | # | ||
174 | ifneq ($(strip $(BB_SRC_DIR)),) | ||
175 | VPATH = $(BB_SRC_DIR) | ||
176 | endif | ||
177 | |||
178 | OBJECTS = $(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o | ||
179 | CFLAGS += $(CROSS_CFLAGS) | ||
180 | ifdef BB_INIT_SCRIPT | ||
181 | CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"' | ||
182 | endif | ||
183 | |||
184 | # Put user-supplied flags at the end, where they | ||
185 | # have a chance of winning. | ||
186 | CFLAGS += $(CFLAGS_EXTRA) | ||
187 | |||
188 | .EXPORT_ALL_VARIABLES: | ||
189 | 27 | ||
190 | all: do-it-all | 28 | all: do-it-all |
191 | 29 | ||
@@ -196,7 +34,8 @@ ifeq (.config,$(wildcard .config)) | |||
196 | include .config | 34 | include .config |
197 | ifeq (.depend,$(wildcard .depend)) | 35 | ifeq (.depend,$(wildcard .depend)) |
198 | include .depend | 36 | include .depend |
199 | do-it-all: busybox busybox.links doc | 37 | do-it-all: busybox busybox.links #doc |
38 | include $(patsubst %,%/Makefile.in, $(SUBDIRS)) | ||
200 | else | 39 | else |
201 | CONFIGURATION = depend | 40 | CONFIGURATION = depend |
202 | do-it-all: depend | 41 | do-it-all: depend |
@@ -207,18 +46,9 @@ do-it-all: menuconfig | |||
207 | endif | 46 | endif |
208 | 47 | ||
209 | 48 | ||
210 | SUBDIRS =applets archival archival/libunarchive console-tools editors \ | 49 | busybox: depend $(libraries-y) |
211 | fileutils findutils init miscutils modutils networking procps \ | 50 | $(CC) $(LDFLAGS) $(libraries-y) $(LIBRARIES) -o $@ |
212 | pwd_grp shell shellutils sysklogd textutils util-linux libbb | 51 | $(STRIPCMD) $@ |
213 | |||
214 | bbsubdirs: $(patsubst %, _dir_%, $(SUBDIRS)) | ||
215 | |||
216 | $(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/config/MARKER | ||
217 | $(MAKE) CFLAGS="$(CFLAGS)" -C $(patsubst _dir_%, %, $@) | ||
218 | |||
219 | busybox: config.h dep-files bbsubdirs | ||
220 | $(CC) $(LDFLAGS) -o $@ applets/busybox.o $(shell find $(SUBDIRS) -name \*.a) $(LIBRARIES) | ||
221 | $(STRIPCMD) $(PROG) | ||
222 | 52 | ||
223 | busybox.links: applets/busybox.mkll | 53 | busybox.links: applets/busybox.mkll |
224 | - $(SHELL) $^ >$@ | 54 | - $(SHELL) $^ >$@ |
@@ -291,52 +121,52 @@ docs/busybox/busyboxdocumentation.html: docs/busybox.sgml | |||
291 | - mkdir -p docs | 121 | - mkdir -p docs |
292 | (cd docs/busybox.net; sgmltools -b html ../busybox.sgml) | 122 | (cd docs/busybox.net; sgmltools -b html ../busybox.sgml) |
293 | 123 | ||
124 | |||
125 | |||
294 | # The nifty new buildsystem stuff | 126 | # The nifty new buildsystem stuff |
295 | scripts/mkdep: scripts/mkdep.c | 127 | $(TOPDIR)scripts/mkdep: scripts/mkdep.c |
296 | $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c | 128 | $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c |
297 | 129 | ||
298 | scripts/split-include: scripts/split-include.c | 130 | $(TOPDIR)scripts/split-include: scripts/split-include.c |
299 | $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c | 131 | $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c |
300 | 132 | ||
301 | dep-files: scripts/mkdep | 133 | $(TOPDIR).depend: $(TOPDIR)scripts/mkdep |
302 | @if [ ! -f .depend ] ; then \ | 134 | rm -f .depend .hdepend; |
303 | rm -f .depend .hdepend; \ | 135 | mkdir -p $(TOPDIR)include/config; |
304 | mkdir -p $(TOPDIR)/include/config; \ | 136 | $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c |
305 | scripts/mkdep -I $(TOPDIR)/include -- \ | 137 | scripts/mkdep -I $(TOPDIR)include -- \ |
306 | `find $(TOPDIR) -name \*.c -print` >> .depend; \ | 138 | `find $(TOPDIR) -name \*.c -print` >> .depend; |
307 | scripts/mkdep -I $(TOPDIR)/include -- \ | 139 | scripts/mkdep -I $(TOPDIR)include -- \ |
308 | `find $(TOPDIR) -name \*.h -print` >> .hdepend; \ | 140 | `find $(TOPDIR) -name \*.h -print` >> .hdepend; |
309 | $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" ; \ | 141 | $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" ; |
310 | fi; | ||
311 | |||
312 | |||
313 | depend dep: config.h dep-files | ||
314 | @ echo -e "\n\nNow run 'make' to build BusyBox\n\n" | 142 | @ echo -e "\n\nNow run 'make' to build BusyBox\n\n" |
315 | 143 | ||
144 | depend dep: $(TOPDIR)include/config.h $(TOPDIR).depend | ||
145 | |||
316 | BB_SHELL := ${shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 146 | BB_SHELL := ${shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
317 | else if [ -x /bin/bash ]; then echo /bin/bash; \ | 147 | else if [ -x /bin/bash ]; then echo /bin/bash; \ |
318 | else echo sh; fi ; fi} | 148 | else echo sh; fi ; fi} |
319 | 149 | ||
320 | include/config/MARKER: scripts/split-include include/config.h | 150 | include/config/MARKER: depend $(TOPDIR)scripts/split-include |
321 | scripts/split-include include/config.h include/config | 151 | scripts/split-include include/config.h include/config |
322 | @ touch include/config/MARKER | 152 | @ touch include/config/MARKER |
323 | 153 | ||
324 | config.h: | 154 | $(TOPDIR)include/config.h: |
325 | @if [ ! -f include/config.h ] ; then \ | 155 | @if [ ! -f $(TOPDIR)include/config.h ] ; then \ |
326 | make oldconfig; \ | 156 | make oldconfig; \ |
327 | fi; | 157 | fi; |
328 | 158 | ||
329 | menuconfig: | 159 | menuconfig: |
330 | mkdir -p $(TOPDIR)/include/config | 160 | mkdir -p $(TOPDIR)include/config |
331 | $(MAKE) -C scripts/lxdialog all | 161 | $(MAKE) -C scripts/lxdialog all |
332 | $(BB_SHELL) scripts/Menuconfig sysdeps/$(TARGET_OS)/config.in | 162 | $(BB_SHELL) scripts/Menuconfig sysdeps/$(TARGET_OS)/config.in |
333 | 163 | ||
334 | config: | 164 | config: |
335 | mkdir -p $(TOPDIR)/include/config | 165 | mkdir -p $(TOPDIR)include/config |
336 | $(BB_SHELL) scripts/Configure sysdeps/$(TARGET_OS)/config.in | 166 | $(BB_SHELL) scripts/Configure sysdeps/$(TARGET_OS)/config.in |
337 | 167 | ||
338 | oldconfig: | 168 | oldconfig: |
339 | mkdir -p $(TOPDIR)/include/config | 169 | mkdir -p $(TOPDIR)include/config |
340 | $(BB_SHELL) scripts/Configure -d sysdeps/$(TARGET_OS)/config.in | 170 | $(BB_SHELL) scripts/Configure -d sysdeps/$(TARGET_OS)/config.in |
341 | 171 | ||
342 | 172 | ||
@@ -359,7 +189,10 @@ dummy: | |||
359 | 189 | ||
360 | endif | 190 | endif |
361 | 191 | ||
362 | include Rules.mak | 192 | |
193 | %.o: %.c | ||
194 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
195 | |||
363 | 196 | ||
364 | # Testing... | 197 | # Testing... |
365 | test tests: | 198 | test tests: |
@@ -407,9 +240,11 @@ dist release: distclean doc | |||
407 | 240 | ||
408 | 241 | ||
409 | 242 | ||
410 | .PHONY: tags check | 243 | .PHONY: tags check depend |
244 | |||
411 | tags: | 245 | tags: |
412 | ctags -R . | 246 | ctags -R . |
413 | 247 | ||
414 | check: busybox | 248 | check: busybox |
415 | cd testsuite && ./runtest | 249 | cd testsuite && ./runtest |
250 | |||
@@ -1,195 +1,208 @@ | |||
1 | # | 1 | # Rules.make for busybox |
2 | # This file contains rules which are shared between multiple Makefiles. | 2 | # |
3 | # | 3 | # Copyright (C) 2002 Erik Andersen <andersee@debian.org> |
4 | 4 | # | |
5 | # | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # False targets. | 6 | # it under the terms of the GNU General Public License as published by |
7 | # | 7 | # the Free Software Foundation; either version 2 of the License, or |
8 | .PHONY: dummy | 8 | # (at your option) any later version. |
9 | 9 | # | |
10 | # | 10 | # This program is distributed in the hope that it will be useful, |
11 | # Special variables which should not be exported | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | # | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | unexport EXTRA_AFLAGS | 13 | # General Public License for more details. |
14 | unexport EXTRA_CFLAGS | 14 | # |
15 | unexport EXTRA_LDFLAGS | 15 | # You should have received a copy of the GNU General Public License |
16 | unexport EXTRA_ARFLAGS | 16 | # along with this program; if not, write to the Free Software |
17 | unexport SUBDIRS | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | unexport SUB_DIRS | 18 | # |
19 | unexport ALL_SUB_DIRS | 19 | |
20 | unexport O_TARGET | 20 | PROG := busybox |
21 | 21 | VERSION := 0.61.pre | |
22 | unexport obj-y | 22 | BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z") |
23 | unexport obj-n | 23 | HOSTCC := gcc |
24 | unexport obj- | 24 | HOSTCFLAGS:= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer |
25 | unexport export-objs | 25 | |
26 | unexport subdir-y | 26 | |
27 | unexport subdir-n | 27 | # What OS are you compiling busybox for? This allows you to include |
28 | unexport subdir- | 28 | # OS specific things, syscall overrides, etc. |
29 | 29 | TARGET_OS:=linux | |
30 | # | 30 | |
31 | # Get things started. | 31 | # With a modern GNU make(1) (highly recommended, that's what all the |
32 | # | 32 | # developers use), all of the following configuration values can be |
33 | first_rule: sub_dirs | 33 | # overridden at the command line. For example: |
34 | $(MAKE) all_targets | 34 | # make CROSS=powerpc-linux- BB_SRC_DIR=$HOME/busybox PREFIX=/mnt/app |
35 | 35 | ||
36 | SUB_DIRS := $(subdir-y) | 36 | # If you want to add some simple compiler switches (like -march=i686), |
37 | ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-n) $(subdir-)) | 37 | # especially from the command line, use this instead of CFLAGS directly. |
38 | 38 | # For optimization overrides, it's better still to set OPTIMIZATION. | |
39 | 39 | CFLAGS_EXTRA:= | |
40 | # | 40 | |
41 | # Common rules | 41 | # If you want a static binary, turn this on. |
42 | # | 42 | DOSTATIC:=false |
43 | 43 | ||
44 | %.s: %.c | 44 | # Set the following to `true' to make a debuggable build. |
45 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -S $< -o $@ | 45 | # Leave this set to `false' for production use. |
46 | 46 | DODEBUG:=false | |
47 | %.i: %.c | 47 | |
48 | $(CPP) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) $< > $@ | 48 | # This enables compiling with dmalloc ( http://dmalloc.com/ ) |
49 | 49 | # which is an excellent public domain mem leak and malloc problem | |
50 | %.o: %.c | 50 | # detector. To enable dmalloc, before running busybox you will |
51 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -c -o $@ $< | 51 | # want to first set up your environment. |
52 | @ ( \ | 52 | # eg: `export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile` |
53 | echo 'ifeq ($(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@))),$$(strip $$(subst $$(comma),:,$$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@))))' ; \ | 53 | # The debug= value is generated using the following command |
54 | echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ | 54 | # dmalloc -p log-stats -p log-non-free -p log-bad-space -p log-elapsed-time \ |
55 | echo 'endif' \ | 55 | # -p check-fence -p check-heap -p check-lists -p check-blank \ |
56 | ) > $(dir $@)/.$(notdir $@).flags | 56 | # -p check-funcs -p realloc-copy -p allow-free-null |
57 | 57 | # Do not enable this for production builds... | |
58 | %.o: %.s | 58 | DODMALLOC:=false |
59 | $(AS) $(AFLAGS) $(EXTRA_CFLAGS) -o $@ $< | 59 | |
60 | 60 | # Electric-fence is another very useful malloc debugging library. | |
61 | # Old makefiles define their own rules for compiling .S files, | 61 | # Do not enable this for production builds... |
62 | # but these standard rules are available for any Makefile that | 62 | DOEFENCE:=false |
63 | # wants to use them. Our plan is to incrementally convert all | 63 | |
64 | # the Makefiles to these standard rules. -- rmk, mec | 64 | # If you want large file summit support, turn this on. |
65 | ifdef USE_STANDARD_AS_RULE | 65 | # This has no effect if you don't have a kernel with lfs |
66 | 66 | # support, and a system with libc-2.1.3 or later. | |
67 | %.s: %.S | 67 | # Some of the programs that can benefit from lfs support |
68 | $(CPP) $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$@) $< > $@ | 68 | # are dd, gzip, mount, tar, and mkfs_minix. |
69 | 69 | # LFS allows you to use the above programs for files | |
70 | %.o: %.S | 70 | # larger than 2GB! |
71 | $(CC) $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$@) -c -o $@ $< | 71 | DOLFS:=false |
72 | 72 | ||
73 | # If you have a "pristine" source directory, point BB_SRC_DIR to it. | ||
74 | # Experimental and incomplete; tell the mailing list | ||
75 | # <busybox@busybox.net> if you do or don't like it so far. | ||
76 | BB_SRC_DIR:= | ||
77 | |||
78 | # If you are running a cross compiler, you may want to set CROSS | ||
79 | # to something more interesting, like "arm-linux-". | ||
80 | CROSS:= | ||
81 | CC := $(CROSS)gcc | ||
82 | AR := $(CROSS)ar | ||
83 | AS := $(CROSS)as | ||
84 | LD := $(CROSS)ld | ||
85 | NM := $(CROSS)nm | ||
86 | STRIP := $(CROSS)strip | ||
87 | CPP := $(CC) -E | ||
88 | MAKEFILES := $(TOPDIR).config | ||
89 | export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP | ||
90 | |||
91 | |||
92 | # To compile vs uClibc, just use the compiler wrapper built by uClibc... | ||
93 | # Everything should compile and work as expected these days... | ||
94 | #CC:=/usr/i386-linux-uclibc/usr/bin/i386-uclibc-gcc | ||
95 | |||
96 | # To compile vs some other alternative libc, you may need to use/adjust | ||
97 | # the following lines to meet your needs... | ||
98 | # | ||
99 | # If you are using Red Hat 6.x with the compatible RPMs (for developing under | ||
100 | # Red Hat 5.x and glibc 2.0) uncomment the following. Be sure to read about | ||
101 | # using the compatible RPMs (compat-*) at http://www.redhat.com ! | ||
102 | #LIBCDIR:=/usr/i386-glibc20-linux | ||
103 | # | ||
104 | # The following is used for libc5 (if you install altgcc and libc5-altdev | ||
105 | # on a Debian system). | ||
106 | #LIBCDIR:=/usr/i486-linuxlibc1 | ||
107 | # | ||
108 | # For other libraries, you are on your own... | ||
109 | #LDFLAGS+=-nostdlib | ||
110 | #LIBRARIES:=$(LIBCDIR)/lib/libc.a -lgcc | ||
111 | #CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR) | ||
112 | #GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp") | ||
113 | |||
114 | # use '-Os' optimization if available, else use -O2 | ||
115 | OPTIMIZATION:=${shell if $(CC) -Os -S -o /dev/null -xc /dev/null \ | ||
116 | >/dev/null 2>&1; then echo "-Os"; else echo "-O2" ; fi} | ||
117 | GCC_STACK_BOUNDRY:=${shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null \ | ||
118 | >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; else echo "" ; fi} | ||
119 | OPTIMIZATIONS:=$(OPTIMIZATION) -fomit-frame-pointer $(GCC_STACK_BOUNDRY) #-fstrict-aliasing -march=i386 -mcpu=i386 -malign-functions=0 -malign-jumps=0 | ||
120 | WARNINGS:=-Wall -Wstrict-prototypes -Wshadow | ||
121 | CFLAGS:=-I$(TOPDIR)include | ||
122 | ARFLAGS:=-r | ||
123 | |||
124 | # | ||
125 | #-------------------------------------------------------- | ||
126 | # If you're going to do a lot of builds with a non-vanilla configuration, | ||
127 | # it makes sense to adjust parameters above, so you can type "make" | ||
128 | # by itself, instead of following it by the same half-dozen overrides | ||
129 | # every time. The stuff below, on the other hand, is probably less | ||
130 | # prone to casual user adjustment. | ||
131 | # | ||
132 | |||
133 | ifeq ($(strip $(DOLFS)),true) | ||
134 | # For large file summit support | ||
135 | CFLAGS+=-D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 | ||
136 | endif | ||
137 | ifeq ($(strip $(DODMALLOC)),true) | ||
138 | # For testing mem leaks with dmalloc | ||
139 | CFLAGS+=-DDMALLOC | ||
140 | LIBRARIES:=-ldmalloc | ||
141 | # Force debug=true, since this is useless when not debugging... | ||
142 | DODEBUG:=true | ||
143 | else | ||
144 | ifeq ($(strip $(DOEFENCE)),true) | ||
145 | LIBRARIES:=-lefence | ||
146 | # Force debug=true, since this is useless when not debugging... | ||
147 | DODEBUG:=true | ||
148 | endif | ||
149 | endif | ||
150 | ifeq ($(strip $(DODEBUG)),true) | ||
151 | CFLAGS +=$(WARNINGS) -g -D_GNU_SOURCE | ||
152 | LDFLAGS +=-Wl,-warn-common | ||
153 | STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging | ||
154 | else | ||
155 | CFLAGS += $(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE | ||
156 | LDFLAGS += -s -Wl,-warn-common | ||
157 | STRIPCMD:=$(STRIP) --remove-section=.note --remove-section=.comment | ||
158 | endif | ||
159 | ifeq ($(strip $(DOSTATIC)),true) | ||
160 | LDFLAGS += --static | ||
73 | endif | 161 | endif |
74 | 162 | ||
75 | %.lst: %.c | 163 | ifndef $(PREFIX) |
76 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -g -c -o $*.o $< | 164 | PREFIX:=`pwd`/_install |
77 | $(TOPDIR)/scripts/makelst $* $(TOPDIR) $(OBJDUMP) | 165 | endif |
78 | # | ||
79 | # | ||
80 | # | ||
81 | all_targets: $(O_TARGET) $(L_TARGET) | ||
82 | 166 | ||
167 | # Additional complications due to support for pristine source dir. | ||
168 | # Include files in the build directory should take precedence over | ||
169 | # the copy in BB_SRC_DIR, both during the compilation phase and the | ||
170 | # shell script that finds the list of object files. | ||
171 | # Work in progress by <ldoolitt@recycle.lbl.gov>. | ||
83 | # | 172 | # |
84 | # Rule to compile a set of .o files into one .o file | 173 | ifneq ($(strip $(BB_SRC_DIR)),) |
85 | # | 174 | VPATH:=$(BB_SRC_DIR) |
86 | ifdef O_TARGET | 175 | endif |
87 | $(O_TARGET): $(obj-y) | ||
88 | rm -f $@ | ||
89 | ifneq "$(strip $(obj-y))" "" | ||
90 | $(LD) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), $^) | ||
91 | else | ||
92 | $(AR) rcs $@ | ||
93 | endif | ||
94 | @ ( \ | ||
95 | echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_LDFLAGS) $(obj-y))),$$(strip $$(subst $$(comma),:,$$(EXTRA_LDFLAGS) $$(obj-y))))' ; \ | ||
96 | echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ | ||
97 | echo 'endif' \ | ||
98 | ) > $(dir $@)/.$(notdir $@).flags | ||
99 | endif # O_TARGET | ||
100 | 176 | ||
101 | # | 177 | CFLAGS += -DBB_VER='"$(VERSION)"' |
102 | # Rule to compile a set of .o files into one .a file | 178 | CFLAGS += -DBB_BT='"$(BUILDTIME)"' |
103 | # | 179 | OBJECTS:=$(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o |
104 | ifdef L_TARGET | 180 | CFLAGS += $(CROSS_CFLAGS) |
105 | $(L_TARGET): $(obj-y) | 181 | ifdef BB_INIT_SCRIPT |
106 | rm -f $@ | 182 | CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"' |
107 | $(AR) $(EXTRA_ARFLAGS) rcs $@ $(obj-y) | ||
108 | @ ( \ | ||
109 | echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_ARFLAGS) $(obj-y))),$$(strip $$(subst $$(comma),:,$$(EXTRA_ARFLAGS) $$(obj-y))))' ; \ | ||
110 | echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ | ||
111 | echo 'endif' \ | ||
112 | ) > $(dir $@)/.$(notdir $@).flags | ||
113 | endif | 183 | endif |
114 | 184 | ||
185 | # Put user-supplied flags at the end, where they | ||
186 | # have a chance of winning. | ||
187 | CFLAGS += $(CFLAGS_EXTRA) | ||
115 | 188 | ||
116 | # | 189 | %.o: %.c |
117 | # This make dependencies quickly | 190 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
118 | # | 191 | |
192 | ifdef _FASTDEP_ALL_SUB_DIRS | ||
119 | fastdep: dummy | 193 | fastdep: dummy |
120 | $(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS) -- $(wildcard *.[chS]) > .depend | 194 | $(TOPDIR)scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -- $(wildcard *.[chS]) > .depend |
121 | ifdef ALL_SUB_DIRS | 195 | ifdef ALL_SUB_DIRS |
122 | $(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)" | 196 | $(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)" |
123 | endif | 197 | endif |
124 | 198 | ||
125 | ifdef _FASTDEP_ALL_SUB_DIRS | ||
126 | $(patsubst %,_sfdep_%,$(_FASTDEP_ALL_SUB_DIRS)): | 199 | $(patsubst %,_sfdep_%,$(_FASTDEP_ALL_SUB_DIRS)): |
127 | $(MAKE) -C $(patsubst _sfdep_%,%,$@) fastdep | 200 | $(MAKE) -C $(patsubst _sfdep_%,%,$@) fastdep |
128 | endif | 201 | endif |
129 | 202 | ||
130 | 203 | .PHONY: dummy | |
131 | # | ||
132 | # A rule to make subdirectories | ||
133 | # | ||
134 | subdir-list = $(sort $(patsubst %,_subdir_%,$(SUB_DIRS))) | ||
135 | sub_dirs: dummy $(subdir-list) | ||
136 | |||
137 | ifdef SUB_DIRS | ||
138 | $(subdir-list) : dummy | ||
139 | $(MAKE) -C $(patsubst _subdir_%,%,$@) | ||
140 | endif | ||
141 | |||
142 | # | ||
143 | # A rule to do nothing | ||
144 | # | ||
145 | dummy: | ||
146 | |||
147 | # | ||
148 | # This is useful for testing | ||
149 | # | ||
150 | script: | ||
151 | $(SCRIPT) | ||
152 | |||
153 | # | ||
154 | # include dependency files if they exist | ||
155 | # | ||
156 | ifneq ($(wildcard .depend),) | ||
157 | include .depend | ||
158 | endif | ||
159 | |||
160 | ifneq ($(wildcard $(TOPDIR)/.hdepend),) | ||
161 | include $(TOPDIR)/.hdepend | ||
162 | endif | ||
163 | 204 | ||
164 | # | ||
165 | # Find files whose flags have changed and force recompilation. | ||
166 | # For safety, this works in the converse direction: | ||
167 | # every file is forced, except those whose flags are positively up-to-date. | ||
168 | # | ||
169 | FILES_FLAGS_UP_TO_DATE := | ||
170 | 205 | ||
171 | # For use in expunging commas from flags, which mung our checking. | ||
172 | comma = , | ||
173 | 206 | ||
174 | FILES_FLAGS_EXIST := $(wildcard .*.flags) | 207 | .EXPORT_ALL_VARIABLES: |
175 | ifneq ($(FILES_FLAGS_EXIST),) | ||
176 | include $(FILES_FLAGS_EXIST) | ||
177 | endif | ||
178 | 208 | ||
179 | FILES_FLAGS_CHANGED := $(strip \ | ||
180 | $(filter-out $(FILES_FLAGS_UP_TO_DATE), \ | ||
181 | $(O_TARGET) $(L_TARGET) $(active-objs) \ | ||
182 | )) | ||
183 | |||
184 | # A kludge: .S files don't get flag dependencies (yet), | ||
185 | # because that will involve changing a lot of Makefiles. Also | ||
186 | # suppress object files explicitly listed in $(IGNORE_FLAGS_OBJS). | ||
187 | # This allows handling of assembly files that get translated into | ||
188 | # multiple object files (see arch/ia64/lib/idiv.S, for example). | ||
189 | FILES_FLAGS_CHANGED := $(strip \ | ||
190 | $(filter-out $(patsubst %.S, %.o, $(wildcard *.S) $(IGNORE_FLAGS_OBJS)), \ | ||
191 | $(FILES_FLAGS_CHANGED))) | ||
192 | |||
193 | ifneq ($(FILES_FLAGS_CHANGED),) | ||
194 | $(FILES_FLAGS_CHANGED): dummy | ||
195 | endif | ||
diff --git a/applets/Makefile b/applets/Makefile index e6efc17d9..c4887f908 100644 --- a/applets/Makefile +++ b/applets/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,18 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := applets.a | 21 | APPLETS_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | obj-y += applets.o busybox.o usage.o | ||
28 | |||
29 | # Hand off to toplevel Rules.mak | ||
30 | include $(TOPDIR)/Rules.mak | ||
31 | 27 | ||
32 | clean: | 28 | clean: |
33 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
34 | 30 | ||
diff --git a/applets/Makefile.in b/applets/Makefile.in new file mode 100644 index 000000000..f198a1447 --- /dev/null +++ b/applets/Makefile.in | |||
@@ -0,0 +1,32 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | APPLETS_AR:=applets.a | ||
21 | ifndef $(APPLETS_DIR) | ||
22 | APPLETS_DIR:=$(TOPDIR)applets/ | ||
23 | endif | ||
24 | |||
25 | APPLET_SRC:=applets.c busybox.c usage.c | ||
26 | APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC)) | ||
27 | |||
28 | libraries-y+=$(APPLETS_DIR)$(APPLETS_AR) | ||
29 | |||
30 | $(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ) | ||
31 | $(AR) -ro $@ $(APPLET_OBJ) | ||
32 | |||
diff --git a/archival/Makefile b/archival/Makefile index 35ba02f3b..d76face4b 100644 --- a/archival/Makefile +++ b/archival/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,29 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := archival.a | 21 | ARCHIVAL_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | subdir-y := libunarchive | 26 | -include $(TOPDIR).depend |
27 | |||
28 | obj-$(CONFIG_AR) += ar.o | ||
29 | obj-$(CONFIG_BUNZIP2) += bunzip2.o | ||
30 | obj-$(CONFIG_CPIO) += cpio.o | ||
31 | obj-$(CONFIG_DPKG) += dpkg.o | ||
32 | obj-$(CONFIG_DPKG_DEB) += dpkg_deb.o | ||
33 | obj-$(CONFIG_GUNZIP) += gunzip.o | ||
34 | obj-$(CONFIG_GZIP) += gzip.o | ||
35 | obj-$(CONFIG_RPM2CPIO) += rpm2cpio.o | ||
36 | obj-$(CONFIG_TAR) += tar.o | ||
37 | obj-$(CONFIG_UNZIP) += unzip.o | ||
38 | |||
39 | |||
40 | # Hand off to toplevel Rules.mak | ||
41 | include $(TOPDIR)/Rules.mak | ||
42 | 27 | ||
43 | clean: | 28 | clean: |
44 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
45 | 30 | ||
diff --git a/archival/Makefile.in b/archival/Makefile.in new file mode 100644 index 000000000..c53171eea --- /dev/null +++ b/archival/Makefile.in | |||
@@ -0,0 +1,41 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | ARCHIVAL_AR:=archival.a | ||
21 | ifndef $(ARCHIVAL_DIR) | ||
22 | ARCHIVAL_DIR:=$(TOPDIR)archival/ | ||
23 | endif | ||
24 | |||
25 | ARCHIVAL-y:= | ||
26 | ARCHIVAL-$(CONFIG_AR) += ar.o | ||
27 | ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o | ||
28 | ARCHIVAL-$(CONFIG_CPIO) += cpio.o | ||
29 | ARCHIVAL-$(CONFIG_DPKG) += dpkg.o | ||
30 | ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o | ||
31 | ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o | ||
32 | ARCHIVAL-$(CONFIG_GZIP) += gzip.o | ||
33 | ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o | ||
34 | ARCHIVAL-$(CONFIG_TAR) += tar.o | ||
35 | ARCHIVAL-$(CONFIG_UNZIP) += unzip.o | ||
36 | |||
37 | libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR) | ||
38 | |||
39 | $(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) | ||
40 | $(AR) -ro $@ $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) | ||
41 | |||
diff --git a/archival/libunarchive/Makefile b/archival/libunarchive/Makefile index a8409a432..7979879c4 100644 --- a/archival/libunarchive/Makefile +++ b/archival/libunarchive/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,45 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=../.. | 20 | TOPDIR:= ../../ |
21 | L_TARGET := libunarchive.a | 21 | LIBUNARCHIVE_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := unarchive.o seek_sub_file.o | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | ifeq ($(CONFIG_DPKG),y) | ||
28 | obj-y += deb_extract.o get_header_ar.o get_header_tar.o | ||
29 | endif | ||
30 | |||
31 | ifeq ($(CONFIG_DPKG_DEB),y) | ||
32 | obj-y += deb_extract.o get_header_ar.o get_header_tar.o | ||
33 | endif | ||
34 | |||
35 | ifeq ($(CONFIG_AR),y) | ||
36 | obj-y += get_header_ar.o | ||
37 | endif | ||
38 | |||
39 | ifeq ($(CONFIG_CPIO),y) | ||
40 | obj-y += get_header_cpio.o | ||
41 | endif | ||
42 | |||
43 | ifeq ($(CONFIG_RPM2CPIO),y) | ||
44 | obj-y += get_header_cpio.o | ||
45 | endif | ||
46 | |||
47 | ifeq ($(CONFIG_TAR),y) | ||
48 | obj-y += get_header_tar.o | ||
49 | endif | ||
50 | |||
51 | ifeq ($(CONFIG_UNZIP),y) | ||
52 | obj-y += get_header_zip.o | ||
53 | endif | ||
54 | |||
55 | |||
56 | # Hand off to toplevel Rules.mak | ||
57 | include $(TOPDIR)/Rules.mak | ||
58 | 27 | ||
59 | clean: | 28 | clean: |
60 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
61 | 30 | ||
diff --git a/archival/libunarchive/Makefile.in b/archival/libunarchive/Makefile.in new file mode 100644 index 000000000..cd68be732 --- /dev/null +++ b/archival/libunarchive/Makefile.in | |||
@@ -0,0 +1,38 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | LIBUNARCHIVE_AR:=libunarchive.a | ||
21 | ifndef $(LIBUNARCHIVE_DIR) | ||
22 | LIBUNARCHIVE_DIR:=$(TOPDIR)archival/libunarchive/ | ||
23 | endif | ||
24 | |||
25 | LIBUNARCHIVE-y:=unarchive.o seek_sub_file.o | ||
26 | LIBUNARCHIVE-$(CONFIG_DPKG) += deb_extract.o get_header_ar.o get_header_tar.o | ||
27 | LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += deb_extract.o get_header_ar.o get_header_tar.o | ||
28 | LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o | ||
29 | LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o | ||
30 | LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += get_header_cpio.o | ||
31 | LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o | ||
32 | LIBUNARCHIVE-$(CONFIG_UNZIP) += get_header_zip.o | ||
33 | |||
34 | libraries-y+=$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR) | ||
35 | |||
36 | $(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y)) | ||
37 | $(AR) -ro $@ $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y)) | ||
38 | |||
diff --git a/console-tools/Makefile b/console-tools/Makefile index a67e4bb7b..2cea319ad 100644 --- a/console-tools/Makefile +++ b/console-tools/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,27 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := console-tools.a | 21 | CONSOLETOOLS_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | obj-$(CONFIG_CHVT) += chvt.o | ||
28 | obj-$(CONFIG_CLEAR) += clear.o | ||
29 | obj-$(CONFIG_DEALLOCVT) += deallocvt.o | ||
30 | obj-$(CONFIG_DUMPKMAP) += dumpkmap.o | ||
31 | obj-$(CONFIG_LOADACM) += loadacm.o | ||
32 | obj-$(CONFIG_LOADFONT) += loadfont.o | ||
33 | obj-$(CONFIG_LOADKMAP) += loadkmap.o | ||
34 | obj-$(CONFIG_RESET) += reset.o | ||
35 | obj-$(CONFIG_SETKEYCODES) += setkeycodes.o | ||
36 | |||
37 | |||
38 | # Hand off to toplevel Rules.mak | ||
39 | include $(TOPDIR)/Rules.mak | ||
40 | 27 | ||
41 | clean: | 28 | clean: |
42 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
43 | 30 | ||
diff --git a/console-tools/Makefile.in b/console-tools/Makefile.in new file mode 100644 index 000000000..bc0335643 --- /dev/null +++ b/console-tools/Makefile.in | |||
@@ -0,0 +1,40 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | CONSOLETOOLS_AR:=console-tools.a | ||
21 | ifndef $(CONSOLETOOLS_DIR) | ||
22 | CONSOLETOOLS_DIR:=$(TOPDIR)console-tools/ | ||
23 | endif | ||
24 | |||
25 | CONSOLETOOLS_DIR-y:= | ||
26 | CONSOLETOOLS_DIR-$(CONFIG_CHVT) += chvt.o | ||
27 | CONSOLETOOLS_DIR-$(CONFIG_CLEAR) += clear.o | ||
28 | CONSOLETOOLS_DIR-$(CONFIG_DEALLOCVT) += deallocvt.o | ||
29 | CONSOLETOOLS_DIR-$(CONFIG_DUMPKMAP) += dumpkmap.o | ||
30 | CONSOLETOOLS_DIR-$(CONFIG_LOADACM) += loadacm.o | ||
31 | CONSOLETOOLS_DIR-$(CONFIG_LOADFONT) += loadfont.o | ||
32 | CONSOLETOOLS_DIR-$(CONFIG_LOADKMAP) += loadkmap.o | ||
33 | CONSOLETOOLS_DIR-$(CONFIG_RESET) += reset.o | ||
34 | CONSOLETOOLS_DIR-$(CONFIG_SETKEYCODES) += setkeycodes.o | ||
35 | |||
36 | libraries-y+=$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR) | ||
37 | |||
38 | $(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR): $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y)) | ||
39 | $(AR) -ro $@ $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y)) | ||
40 | |||
diff --git a/editors/Makefile b/editors/Makefile index 7d8d96582..4df771090 100644 --- a/editors/Makefile +++ b/editors/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,20 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := editors.a | 21 | EDITOR_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | obj-$(CONFIG_SED) += sed.o | ||
28 | obj-$(CONFIG_VI) += vi.o | ||
29 | |||
30 | |||
31 | # Hand off to toplevel Rules.mak | ||
32 | include $(TOPDIR)/Rules.mak | ||
33 | 27 | ||
34 | clean: | 28 | clean: |
35 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
36 | 30 | ||
diff --git a/editors/Makefile.in b/editors/Makefile.in new file mode 100644 index 000000000..88c75890f --- /dev/null +++ b/editors/Makefile.in | |||
@@ -0,0 +1,35 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | EDITOR_AR:=editors.a | ||
21 | ifndef $(EDITOR_DIR) | ||
22 | EDITOR_DIR:=$(TOPDIR)editors/ | ||
23 | endif | ||
24 | |||
25 | EDITOR-y:= | ||
26 | EDITOR-$(CONFIG_SED) += sed.o | ||
27 | EDITOR-$(CONFIG_VI) += vi.o | ||
28 | EDITOR_SRC:= $(EDITOR-y) | ||
29 | EDITOR_OBJ:= $(patsubst %.c,$(EDITOR_DIR)%.o, $(EDITOR_SRC)) | ||
30 | |||
31 | libraries-y+=$(EDITOR_DIR)$(EDITOR_AR) | ||
32 | |||
33 | $(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y)) | ||
34 | $(AR) -ro $@ $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y)) | ||
35 | |||
diff --git a/findutils/Makefile b/findutils/Makefile index ac590ccf4..dee8a664f 100644 --- a/findutils/Makefile +++ b/findutils/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,23 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := findutils.a | 21 | FINDUTILS_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | |||
28 | obj-$(CONFIG_FIND) += find.o | ||
29 | obj-$(CONFIG_GREP) += grep.o | ||
30 | obj-$(CONFIG_WHICH) += which.o | ||
31 | obj-$(CONFIG_XARGS) += xargs.o | ||
32 | |||
33 | |||
34 | # Hand off to toplevel Rules.mak | ||
35 | include $(TOPDIR)/Rules.mak | ||
36 | 27 | ||
37 | clean: | 28 | clean: |
38 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
39 | 30 | ||
diff --git a/findutils/Makefile.in b/findutils/Makefile.in new file mode 100644 index 000000000..2deaadb05 --- /dev/null +++ b/findutils/Makefile.in | |||
@@ -0,0 +1,35 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | FINDUTILS_AR:=findutils.a | ||
21 | ifndef $(FINDUTILS_DIR) | ||
22 | FINDUTILS_DIR:=$(TOPDIR)findutils/ | ||
23 | endif | ||
24 | |||
25 | FINDUTILS-y:= | ||
26 | FINDUTILS-$(CONFIG_FIND) += find.o | ||
27 | FINDUTILS-$(CONFIG_GREP) += grep.o | ||
28 | FINDUTILS-$(CONFIG_WHICH) += which.o | ||
29 | FINDUTILS-$(CONFIG_XARGS) += xargs.o | ||
30 | |||
31 | libraries-y+=$(FINDUTILS_DIR)$(FINDUTILS_AR) | ||
32 | |||
33 | $(FINDUTILS_DIR)$(FINDUTILS_AR): $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y)) | ||
34 | $(AR) -ro $@ $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y)) | ||
35 | |||
diff --git a/init/Makefile b/init/Makefile index 76f49794d..8d0cdc4ec 100644 --- a/init/Makefile +++ b/init/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,24 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := init.a | 21 | INIT_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | obj-$(CONFIG_HALT) += halt.o | ||
28 | obj-$(CONFIG_INIT) += init.o | ||
29 | obj-$(CONFIG_POWEROFF) += poweroff.o | ||
30 | obj-$(CONFIG_REBOOT) += reboot.o | ||
31 | obj-$(CONFIG_START_STOP_DAEMON) += start_stop_daemon.o | ||
32 | obj-$(CONFIG_RUN_PARTS) += run_parts.o | ||
33 | |||
34 | |||
35 | # Hand off to toplevel Rules.mak | ||
36 | include $(TOPDIR)/Rules.mak | ||
37 | 27 | ||
38 | clean: | 28 | clean: |
39 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
40 | 30 | ||
diff --git a/init/Makefile.in b/init/Makefile.in new file mode 100644 index 000000000..8cc95264d --- /dev/null +++ b/init/Makefile.in | |||
@@ -0,0 +1,37 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | INIT_AR:=init.a | ||
21 | ifndef $(INIT_DIR) | ||
22 | INIT_DIR:=$(TOPDIR)init/ | ||
23 | endif | ||
24 | |||
25 | INIT-y:= | ||
26 | INIT-$(CONFIG_HALT) += halt.o | ||
27 | INIT-$(CONFIG_INIT) += init.o | ||
28 | INIT-$(CONFIG_POWEROFF) += poweroff.o | ||
29 | INIT-$(CONFIG_REBOOT) += reboot.o | ||
30 | INIT-$(CONFIG_START_STOP_DAEMON) += start_stop_daemon.o | ||
31 | INIT-$(CONFIG_RUN_PARTS) += run_parts.o | ||
32 | |||
33 | libraries-y+=$(INIT_DIR)$(INIT_AR) | ||
34 | |||
35 | $(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y)) | ||
36 | $(AR) -ro $@ $(patsubst %,$(INIT_DIR)%, $(INIT-y)) | ||
37 | |||
diff --git a/libbb/Makefile b/libbb/Makefile index 879be2452..f6d021ce9 100644 --- a/libbb/Makefile +++ b/libbb/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 2001 Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -15,53 +15,16 @@ | |||
15 | # You should have received a copy of the GNU General Public License | 15 | # You should have received a copy of the GNU General Public License |
16 | # along with this program; if not, write to the Free Software | 16 | # along with this program; if not, write to the Free Software |
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | ||
18 | 19 | ||
19 | 20 | TOPDIR:= ../ | |
20 | 21 | LIBBB_DIR:=./ | |
21 | TOPDIR :=.. | 22 | include $(TOPDIR).config |
22 | L_TARGET := libbb.a | 23 | include $(TOPDIR)Rules.mak |
23 | 24 | include Makefile.in | |
24 | LIBBB_MSRC=messages.c | 25 | all: $(libraries-y) |
25 | LIBBB_OBJ= full_version name_too_long omitting_directory not_a_directory \ | 26 | -include $(TOPDIR).depend |
26 | memory_exhausted invalid_date invalid_option io_error dash_dash_help \ | ||
27 | write_error too_few_args name_longer_than_foo unknown can_not_create_raw_socket | ||
28 | LIBBB_MOBJS=$(patsubst %,%.o, $(LIBBB_OBJ)) | ||
29 | |||
30 | obj-y := | ||
31 | obj-n := | ||
32 | obj- := | ||
33 | |||
34 | obj-y += ask_confirmation.o chomp.o concat_path_file.o copy_file.o \ | ||
35 | copy_file_chunk.o dump.o libc5.o device_open.o error_msg.o \ | ||
36 | error_msg_and_die.o fgets_str.o find_mount_point.o find_pid_by_name.o \ | ||
37 | find_root_device.o full_read.o full_write.o get_console.o \ | ||
38 | get_last_path_component.o get_line_from_file.o gz_open.o human_readable.o \ | ||
39 | isdirectory.o kernel_version.o loop.o mode_string.o module_syscalls.o mtab.o \ | ||
40 | mtab_file.o my_getgrnam.o my_getgrgid.o my_getpwnam.o my_getpwnamegid.o \ | ||
41 | my_getpwuid.o parse_mode.o parse_number.o perror_msg.o perror_msg_and_die.o \ | ||
42 | print_file.o process_escape_sequence.o read_package_field.o recursive_action.o \ | ||
43 | safe_read.o safe_strncpy.o syscalls.o syslog_msg_with_name.o time_string.o \ | ||
44 | trim.o unzip.o vdprintf.o verror_msg.o vperror_msg.o wfopen.o xfuncs.o \ | ||
45 | xgetcwd.o xreadlink.o xregcomp.o interface.o remove_file.o last_char_is.o \ | ||
46 | copyfd.o vherror_msg.o herror_msg.o herror_msg_and_die.o xgethostbyname.o \ | ||
47 | dirname.o make_directory.o create_icmp_socket.o u_signal_names.o arith.o \ | ||
48 | simplify_path.o inet_common.o inode_hash.o $(LIBBB_MOBJS) $(LIBBB_AROBJS) | ||
49 | |||
50 | |||
51 | # Hand off to toplevel Rules.mak | ||
52 | include $(TOPDIR)/Rules.mak | ||
53 | |||
54 | $(LIBBB_MOBJS): $(LIBBB_MSRC) | ||
55 | $(CC) $(CFLAGS) -DBB_VER='"$(VERSION)"' -DBB_BT='"$(BUILDTIME)"' \ | ||
56 | $(LIBBB_CFLAGS) -DL_$(patsubst %,%,$*) -c $< -o $*.o | ||
57 | |||
58 | $(LIBBB_AROBJS): $(LIBBB_ARCSRC) | ||
59 | $(CC) $(CFLAGS) $(LIBBB_CFLAGS) -DL_$(patsubst %,%,$*) -c $< -o $*.o | ||
60 | |||
61 | loop.o: loop.h | ||
62 | |||
63 | loop.h: mk_loop_h.sh | ||
64 | @ $(SHELL) $< > $@ | ||
65 | 27 | ||
66 | clean: | 28 | clean: |
67 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
30 | |||
diff --git a/libbb/Makefile.in b/libbb/Makefile.in new file mode 100644 index 000000000..6d098c0e5 --- /dev/null +++ b/libbb/Makefile.in | |||
@@ -0,0 +1,63 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | |||
19 | |||
20 | |||
21 | LIBBB_AR:=libbb.a | ||
22 | ifndef $(LIBBB_DIR) | ||
23 | LIBBB_DIR:=$(TOPDIR)libbb/ | ||
24 | endif | ||
25 | |||
26 | LIBBB_SRC:= \ | ||
27 | ask_confirmation.c chomp.c concat_path_file.c copy_file.c \ | ||
28 | copy_file_chunk.c dump.c libc5.c device_open.c error_msg.c \ | ||
29 | error_msg_and_die.c fgets_str.c find_mount_point.c find_pid_by_name.c \ | ||
30 | find_root_device.c full_read.c full_write.c get_console.c \ | ||
31 | get_last_path_component.c get_line_from_file.c gz_open.c human_readable.c \ | ||
32 | isdirectory.c kernel_version.c loop.c mode_string.c module_syscalls.c mtab.c \ | ||
33 | mtab_file.c my_getgrnam.c my_getgrgid.c my_getpwnam.c my_getpwnamegid.c \ | ||
34 | my_getpwuid.c parse_mode.c parse_number.c perror_msg.c perror_msg_and_die.c \ | ||
35 | print_file.c process_escape_sequence.c read_package_field.c recursive_action.c \ | ||
36 | safe_read.c safe_strncpy.c syscalls.c syslog_msg_with_name.c time_string.c \ | ||
37 | trim.c unzip.c vdprintf.c verror_msg.c vperror_msg.c wfopen.c xfuncs.c \ | ||
38 | xgetcwd.c xreadlink.c xregcomp.c interface.c remove_file.c last_char_is.c \ | ||
39 | copyfd.c vherror_msg.c herror_msg.c herror_msg_and_die.c xgethostbyname.c \ | ||
40 | dirname.c make_directory.c create_icmp_socket.c u_signal_names.c arith.c \ | ||
41 | simplify_path.c inet_common.c inode_hash.c | ||
42 | LIBBB_OBJS=$(patsubst %.c,$(LIBBB_DIR)%.o, $(LIBBB_SRC)) | ||
43 | |||
44 | LIBBB_MSRC:=$(LIBBB_DIR)messages.c | ||
45 | LIBBB_MOBJ:=full_version.o name_too_long.o omitting_directory.o not_a_directory.o \ | ||
46 | memory_exhausted.o invalid_date.o invalid_option.o io_error.o dash_dash_help.o \ | ||
47 | write_error.o too_few_args.o name_longer_than_foo.o unknown.o can_not_create_raw_socket.o | ||
48 | LIBBB_MOBJS=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ)) | ||
49 | |||
50 | libraries-y+=$(LIBBB_DIR)$(LIBBB_AR) | ||
51 | |||
52 | $(LIBBB_DIR)$(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_MOBJS) | ||
53 | $(AR) -ro $@ $(LIBBB_OBJS) $(LIBBB_MOBJS) | ||
54 | |||
55 | $(LIBBB_MOBJS): $(LIBBB_MSRC) | ||
56 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@ | ||
57 | |||
58 | $(LIBBB_DIR)loop.o: $(LIBBB_DIR)loop.h | ||
59 | |||
60 | $(LIBBB_DIR)loop.h: $(LIBBB_DIR)mk_loop_h.sh | ||
61 | @ $(SHELL) $< > $@ | ||
62 | |||
63 | |||
diff --git a/miscutils/Makefile b/miscutils/Makefile index 3a4d1b659..b1765f627 100644 --- a/miscutils/Makefile +++ b/miscutils/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,30 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := miscutils.a | 21 | MISCUTILS_DIR:=./ |
22 | EXTRA_CFLAGS = -DBB_VER='"$(VERSION)"' -DBB_BT='"$(BUILDTIME)"' | 22 | include $(TOPDIR).config |
23 | 23 | include $(TOPDIR)Rules.mak | |
24 | obj-y := | 24 | include Makefile.in |
25 | obj-n := | 25 | all: $(libraries-y) |
26 | obj- := | 26 | -include $(TOPDIR).depend |
27 | |||
28 | |||
29 | obj-$(CONFIG_ADJTIMEX) += adjtimex.o | ||
30 | obj-$(CONFIG_DC) += dc.o | ||
31 | obj-$(CONFIG_DUTMP) += dutmp.o | ||
32 | obj-$(CONFIG_MAKEDEVS) += makedevs.o | ||
33 | obj-$(CONFIG_MKTEMP) += mktemp.o | ||
34 | obj-$(CONFIG_MT) += mt.o | ||
35 | obj-$(CONFIG_READLINK) += readlink.o | ||
36 | obj-$(CONFIG_TIME) += time.o | ||
37 | obj-$(CONFIG_UPDATE) += update.o | ||
38 | obj-$(CONFIG_WATCHDOG) += watchdog.o | ||
39 | |||
40 | |||
41 | # Hand off to toplevel Rules.mak | ||
42 | include $(TOPDIR)/Rules.mak | ||
43 | 27 | ||
44 | clean: | 28 | clean: |
45 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
46 | 30 | ||
diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in new file mode 100644 index 000000000..078f87001 --- /dev/null +++ b/miscutils/Makefile.in | |||
@@ -0,0 +1,42 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | MISCUTILS_AR:=miscutils.a | ||
21 | ifndef $(MISCUTILS_DIR) | ||
22 | MISCUTILS_DIR:=$(TOPDIR)miscutils/ | ||
23 | endif | ||
24 | |||
25 | |||
26 | MISCUTILS-y:= | ||
27 | MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o | ||
28 | MISCUTILS-$(CONFIG_DC) += dc.o | ||
29 | MISCUTILS-$(CONFIG_DUTMP) += dutmp.o | ||
30 | MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o | ||
31 | MISCUTILS-$(CONFIG_MKTEMP) += mktemp.o | ||
32 | MISCUTILS-$(CONFIG_MT) += mt.o | ||
33 | MISCUTILS-$(CONFIG_READLINK) += readlink.o | ||
34 | MISCUTILS-$(CONFIG_TIME) += time.o | ||
35 | MISCUTILS-$(CONFIG_UPDATE) += update.o | ||
36 | MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o | ||
37 | |||
38 | libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR) | ||
39 | |||
40 | $(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) | ||
41 | $(AR) -ro $@ $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) | ||
42 | |||
diff --git a/modutils/Makefile b/modutils/Makefile index 7a8d4664e..e8246cee7 100644 --- a/modutils/Makefile +++ b/modutils/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,23 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := modutils.a | 21 | MODUTILS_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | |||
28 | obj-$(CONFIG_INSMOD) += insmod.o | ||
29 | obj-$(CONFIG_LSMOD) += lsmod.o | ||
30 | obj-$(CONFIG_MODPROBE) += modprobe.o | ||
31 | obj-$(CONFIG_RMMOD) += rmmod.o | ||
32 | |||
33 | |||
34 | # Hand off to toplevel Rules.mak | ||
35 | include $(TOPDIR)/Rules.mak | ||
36 | 27 | ||
37 | clean: | 28 | clean: |
38 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
39 | 30 | ||
diff --git a/modutils/Makefile.in b/modutils/Makefile.in new file mode 100644 index 000000000..6ad9582fd --- /dev/null +++ b/modutils/Makefile.in | |||
@@ -0,0 +1,35 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | MODUTILS_AR:=modutils.a | ||
21 | ifndef $(MODUTILS_DIR) | ||
22 | MODUTILS_DIR:=$(TOPDIR)modutils/ | ||
23 | endif | ||
24 | |||
25 | MODUTILS-y:= | ||
26 | MODUTILS-$(CONFIG_INSMOD) += insmod.o | ||
27 | MODUTILS-$(CONFIG_LSMOD) += lsmod.o | ||
28 | MODUTILS-$(CONFIG_MODPROBE) += modprobe.o | ||
29 | MODUTILS-$(CONFIG_RMMOD) += rmmod.o | ||
30 | |||
31 | libraries-y+=$(MODUTILS_DIR)$(MODUTILS_AR) | ||
32 | |||
33 | $(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y)) | ||
34 | $(AR) -ro $@ $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y)) | ||
35 | |||
diff --git a/networking/Makefile b/networking/Makefile index 4b522ffff..4caa18338 100644 --- a/networking/Makefile +++ b/networking/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,30 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := networking.a | 21 | NETWORKING_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | |||
28 | obj-$(CONFIG_HOSTNAME) += hostname.o | ||
29 | obj-$(CONFIG_IFCONFIG) += ifconfig.o | ||
30 | obj-$(CONFIG_NC) += nc.o | ||
31 | obj-$(CONFIG_NETSTAT) += netstat.o | ||
32 | obj-$(CONFIG_NSLOOKUP) += nslookup.o | ||
33 | obj-$(CONFIG_PING) += ping.o | ||
34 | obj-$(CONFIG_ROUTE) += route.o | ||
35 | obj-$(CONFIG_TELNET) += telnet.o | ||
36 | obj-$(CONFIG_TFTP) += tftp.o | ||
37 | obj-$(CONFIG_TRACEROUTE) += traceroute.o | ||
38 | obj-$(CONFIG_WGET) += wget.o | ||
39 | |||
40 | |||
41 | # Hand off to toplevel Rules.mak | ||
42 | include $(TOPDIR)/Rules.mak | ||
43 | 27 | ||
44 | clean: | 28 | clean: |
45 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
46 | 30 | ||
diff --git a/networking/Makefile.in b/networking/Makefile.in new file mode 100644 index 000000000..6f3cc2189 --- /dev/null +++ b/networking/Makefile.in | |||
@@ -0,0 +1,42 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | NETWORKING_AR:=networking.a | ||
21 | ifndef $(NETWORKING_DIR) | ||
22 | NETWORKING_DIR:=$(TOPDIR)networking/ | ||
23 | endif | ||
24 | |||
25 | NETWORKING-y:= | ||
26 | NETWORKING-$(CONFIG_HOSTNAME) += hostname.o | ||
27 | NETWORKING-$(CONFIG_IFCONFIG) += ifconfig.o | ||
28 | NETWORKING-$(CONFIG_NC) += nc.o | ||
29 | NETWORKING-$(CONFIG_NETSTAT) += netstat.o | ||
30 | NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o | ||
31 | NETWORKING-$(CONFIG_PING) += ping.o | ||
32 | NETWORKING-$(CONFIG_ROUTE) += route.o | ||
33 | NETWORKING-$(CONFIG_TELNET) += telnet.o | ||
34 | NETWORKING-$(CONFIG_TFTP) += tftp.o | ||
35 | NETWORKING-$(CONFIG_TRACEROUTE) += traceroute.o | ||
36 | NETWORKING-$(CONFIG_WGET) += wget.o | ||
37 | |||
38 | libraries-y+=$(NETWORKING_DIR)$(NETWORKING_AR) | ||
39 | |||
40 | $(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y)) | ||
41 | $(AR) -ro $@ $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y)) | ||
42 | |||
diff --git a/procps/Makefile b/procps/Makefile index 0e3bdc254..8e572aa4a 100644 --- a/procps/Makefile +++ b/procps/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,24 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := procps.a | 21 | PROCPS_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | obj-$(CONFIG_FREE) += free.o | ||
28 | obj-$(CONFIG_KILL) += kill.o | ||
29 | obj-$(CONFIG_PIDOF) += pidof.o | ||
30 | obj-$(CONFIG_PS) += ps.o | ||
31 | obj-$(CONFIG_RENICE) += renice.o | ||
32 | obj-$(CONFIG_UPTIME) += uptime.o | ||
33 | |||
34 | |||
35 | # Hand off to toplevel Rules.mak | ||
36 | include $(TOPDIR)/Rules.mak | ||
37 | 27 | ||
38 | clean: | 28 | clean: |
39 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
40 | 30 | ||
diff --git a/procps/Makefile.in b/procps/Makefile.in new file mode 100644 index 000000000..1851d8953 --- /dev/null +++ b/procps/Makefile.in | |||
@@ -0,0 +1,37 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | PROCPS_AR:=procps.a | ||
21 | ifndef $(PROCPS_DIR) | ||
22 | PROCPS_DIR:=$(TOPDIR)procps/ | ||
23 | endif | ||
24 | |||
25 | PROCPS-:= | ||
26 | PROCPS-$(CONFIG_FREE) += free.o | ||
27 | PROCPS-$(CONFIG_KILL) += kill.o | ||
28 | PROCPS-$(CONFIG_PIDOF) += pidof.o | ||
29 | PROCPS-$(CONFIG_PS) += ps.o | ||
30 | PROCPS-$(CONFIG_RENICE) += renice.o | ||
31 | PROCPS-$(CONFIG_UPTIME) += uptime.o | ||
32 | |||
33 | libraries-y+=$(PROCPS_DIR)$(PROCPS_AR) | ||
34 | |||
35 | $(PROCPS_DIR)$(PROCPS_AR): $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y)) | ||
36 | $(AR) -ro $@ $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y)) | ||
37 | |||
diff --git a/shell/Makefile b/shell/Makefile index e0229973e..f3b1042e6 100644 --- a/shell/Makefile +++ b/shell/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,24 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := shell.a | 21 | SHELL_DIR:=./ |
22 | EXTRA_CFLAGS = -DBB_VER='"$(VERSION)"' -DBB_BT='"$(BUILDTIME)"' | 22 | include $(TOPDIR).config |
23 | 23 | include $(TOPDIR)Rules.mak | |
24 | obj-y := | 24 | include Makefile.in |
25 | obj-n := | 25 | all: $(libraries-y) |
26 | obj- := | 26 | -include $(TOPDIR).depend |
27 | |||
28 | obj-$(CONFIG_ASH) += ash.o | ||
29 | obj-$(CONFIG_HUSH) += hush.o | ||
30 | obj-$(CONFIG_LASH) += lash.o | ||
31 | obj-$(CONFIG_MSH) += msh.o | ||
32 | obj-$(CONFIG_FEATURE_COMMAND_EDITING) += cmdedit.o | ||
33 | |||
34 | |||
35 | # Hand off to toplevel Rules.mak | ||
36 | include $(TOPDIR)/Rules.mak | ||
37 | 27 | ||
38 | clean: | 28 | clean: |
39 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
40 | 30 | ||
diff --git a/shell/Makefile.in b/shell/Makefile.in new file mode 100644 index 000000000..a5778d6fd --- /dev/null +++ b/shell/Makefile.in | |||
@@ -0,0 +1,36 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | |||
19 | |||
20 | SHELL_AR:=shell.a | ||
21 | ifndef $(SHELL_DIR) | ||
22 | SHELL_DIR:=$(TOPDIR)shell/ | ||
23 | endif | ||
24 | |||
25 | SHELLT-y:= | ||
26 | SHELLT-$(CONFIG_ASH) += ash.o | ||
27 | SHELLT-$(CONFIG_HUSH) += hush.o | ||
28 | SHELLT-$(CONFIG_LASH) += lash.o | ||
29 | SHELLT-$(CONFIG_MSH) += msh.o | ||
30 | SHELLT-$(CONFIG_FEATURE_COMMAND_EDITING) += cmdedit.o | ||
31 | |||
32 | libraries-y+=$(SHELL_DIR)$(SHELL_AR) | ||
33 | |||
34 | $(SHELL_DIR)$(SHELL_AR): $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y)) | ||
35 | $(AR) -ro $@ $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y)) | ||
36 | |||
diff --git a/sysklogd/Makefile b/sysklogd/Makefile index 3f7da6d3c..dc2098f11 100644 --- a/sysklogd/Makefile +++ b/sysklogd/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,23 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := sysklogd.a | 21 | SYSKLOGD_DIR:=./ |
22 | EXTRA_CFLAGS = -DBB_VER='"$(VERSION)"' -DBB_BT='"$(BUILDTIME)"' | 22 | include $(TOPDIR).config |
23 | 23 | include $(TOPDIR)Rules.mak | |
24 | obj-y := | 24 | include Makefile.in |
25 | obj-n := | 25 | all: $(libraries-y) |
26 | obj- := | 26 | -include $(TOPDIR).depend |
27 | |||
28 | |||
29 | obj-$(CONFIG_KLOGD) += klogd.o | ||
30 | obj-$(CONFIG_LOGGER) += logger.o | ||
31 | obj-$(CONFIG_LOGREAD) += logread.o | ||
32 | obj-$(CONFIG_SYSLOGD) += syslogd.o | ||
33 | |||
34 | # Hand off to toplevel Rules.mak | ||
35 | include $(TOPDIR)/Rules.mak | ||
36 | 27 | ||
37 | clean: | 28 | clean: |
38 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
39 | 30 | ||
diff --git a/sysklogd/Makefile.in b/sysklogd/Makefile.in new file mode 100644 index 000000000..aacb941bd --- /dev/null +++ b/sysklogd/Makefile.in | |||
@@ -0,0 +1,35 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | SYSKLOGD_AR:=sysklogd.a | ||
21 | ifndef $(SYSKLOGD_DIR) | ||
22 | SYSKLOGD_DIR:=$(TOPDIR)sysklogd/ | ||
23 | endif | ||
24 | |||
25 | SYSKLOGD-:= | ||
26 | SYSKLOGD-$(CONFIG_KLOGD) += klogd.o | ||
27 | SYSKLOGD-$(CONFIG_LOGGER) += logger.o | ||
28 | SYSKLOGD-$(CONFIG_LOGREAD) += logread.o | ||
29 | SYSKLOGD-$(CONFIG_SYSLOGD) += syslogd.o | ||
30 | |||
31 | libraries-y+=$(SYSKLOGD_DIR)$(SYSKLOGD_AR) | ||
32 | |||
33 | $(SYSKLOGD_DIR)$(SYSKLOGD_AR): $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y)) | ||
34 | $(AR) -ro $@ $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y)) | ||
35 | |||
diff --git a/util-linux/Makefile b/util-linux/Makefile index 9cd1486b6..41080a930 100644 --- a/util-linux/Makefile +++ b/util-linux/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
@@ -17,34 +17,14 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR :=.. | 20 | TOPDIR:= ../ |
21 | L_TARGET := util-linux.a | 21 | UTILLINUX_DIR:=./ |
22 | 22 | include $(TOPDIR).config | |
23 | obj-y := | 23 | include $(TOPDIR)Rules.mak |
24 | obj-n := | 24 | include Makefile.in |
25 | obj- := | 25 | all: $(libraries-y) |
26 | 26 | -include $(TOPDIR).depend | |
27 | obj-$(CONFIG_DMESG) += dmesg.o | ||
28 | obj-$(CONFIG_FBSET) += fbset.o | ||
29 | obj-$(CONFIG_FDFLUSH) += fdflush.o | ||
30 | obj-$(CONFIG_FREERAMDISK) += freeramdisk.o | ||
31 | obj-$(CONFIG_FSCK_MINIX) += fsck_minix.o | ||
32 | obj-$(CONFIG_GETOPT) += getopt.o | ||
33 | obj-$(CONFIG_HEXDUMP) += hexdump.o | ||
34 | obj-$(CONFIG_LOSETUP) += losetup.o | ||
35 | obj-$(CONFIG_MKFS_MINIX) += mkfs_minix.o | ||
36 | obj-$(CONFIG_MKSWAP) += mkswap.o | ||
37 | obj-$(CONFIG_MORE) += more.o | ||
38 | obj-$(CONFIG_MOUNT) += mount.o | ||
39 | obj-$(CONFIG_NFSMOUNT) += nfsmount.o | ||
40 | obj-$(CONFIG_PIVOT_ROOT) += pivot_root.o | ||
41 | obj-$(CONFIG_RDATE) += rdate.o | ||
42 | obj-$(CONFIG_SWAPONOFF) += swaponoff.o | ||
43 | obj-$(CONFIG_UMOUNT) += umount.o | ||
44 | |||
45 | # Hand off to toplevel Rules.mak | ||
46 | include $(TOPDIR)/Rules.mak | ||
47 | 27 | ||
48 | clean: | 28 | clean: |
49 | rm -f $(L_TARGET) *.o core | 29 | rm -f *.o *.a $(AR_TARGET) |
50 | 30 | ||
diff --git a/util-linux/Makefile.in b/util-linux/Makefile.in new file mode 100644 index 000000000..fbe075ded --- /dev/null +++ b/util-linux/Makefile.in | |||
@@ -0,0 +1,48 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | UTILLINUX_AR:=util-linux.a | ||
21 | ifndef $(UTILLINUX_DIR) | ||
22 | UTILLINUX_DIR:=$(TOPDIR)util-linux/ | ||
23 | endif | ||
24 | |||
25 | UTILLINUX-:= | ||
26 | UTILLINUX-$(CONFIG_DMESG) += dmesg.o | ||
27 | UTILLINUX-$(CONFIG_FBSET) += fbset.o | ||
28 | UTILLINUX-$(CONFIG_FDFLUSH) += fdflush.o | ||
29 | UTILLINUX-$(CONFIG_FREERAMDISK) += freeramdisk.o | ||
30 | UTILLINUX-$(CONFIG_FSCK_MINIX) += fsck_minix.o | ||
31 | UTILLINUX-$(CONFIG_GETOPT) += getopt.o | ||
32 | UTILLINUX-$(CONFIG_HEXDUMP) += hexdump.o | ||
33 | UTILLINUX-$(CONFIG_LOSETUP) += losetup.o | ||
34 | UTILLINUX-$(CONFIG_MKFS_MINIX) += mkfs_minix.o | ||
35 | UTILLINUX-$(CONFIG_MKSWAP) += mkswap.o | ||
36 | UTILLINUX-$(CONFIG_MORE) += more.o | ||
37 | UTILLINUX-$(CONFIG_MOUNT) += mount.o | ||
38 | UTILLINUX-$(CONFIG_NFSMOUNT) += nfsmount.o | ||
39 | UTILLINUX-$(CONFIG_PIVOT_ROOT) += pivot_root.o | ||
40 | UTILLINUX-$(CONFIG_RDATE) += rdate.o | ||
41 | UTILLINUX-$(CONFIG_SWAPONOFF) += swaponoff.o | ||
42 | UTILLINUX-$(CONFIG_UMOUNT) += umount.o | ||
43 | |||
44 | libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR) | ||
45 | |||
46 | $(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) | ||
47 | $(AR) -ro $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) | ||
48 | |||