diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-11-29 22:08:35 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-11-29 22:08:35 +0000 |
commit | 20ea5c335291012bef0529fb1ef3a579a9b10940 (patch) | |
tree | 20d72fe3bbb7984bfb5e1a9a1728f89ce400e0d4 | |
parent | 7b5d59464fa19dbb15620928cc22c448206489c2 (diff) | |
download | busybox-w32-20ea5c335291012bef0529fb1ef3a579a9b10940.tar.gz busybox-w32-20ea5c335291012bef0529fb1ef3a579a9b10940.tar.bz2 busybox-w32-20ea5c335291012bef0529fb1ef3a579a9b10940.zip |
Patch form Larry Doolittle <ldoolitt@recycle.lbl.gov> (in collaboration
with Matt Kraai <kraai@alumni.carnegiemellon.edu>) to allow for a
pristine source directory -- where all the .o files and such are
not placed into the source tree. Thanks Larry!
-rw-r--r-- | Makefile | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -23,6 +23,11 @@ VERSION := 0.48pre | |||
23 | BUILDTIME := $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z") | 23 | BUILDTIME := $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z") |
24 | export VERSION | 24 | export VERSION |
25 | 25 | ||
26 | # With a modern GNU make(1) (highly recommended, that's what all the | ||
27 | # developers use), all of the following configuration values can be | ||
28 | # overridden at the command line. For example: | ||
29 | # make CROSS=powerpc-linux- BB_SRC_DIR=$HOME/busybox PREFIX=/mnt/app | ||
30 | |||
26 | # If you want a static binary, turn this on. | 31 | # If you want a static binary, turn this on. |
27 | DOSTATIC = false | 32 | DOSTATIC = false |
28 | 33 | ||
@@ -49,10 +54,12 @@ DODMALLOC = false | |||
49 | # larger than 2GB! | 54 | # larger than 2GB! |
50 | DOLFS = false | 55 | DOLFS = false |
51 | 56 | ||
57 | # If you have a "pristine" source directory, point BB_SRC_DIR to it. | ||
58 | BB_SRC_DIR = . | ||
52 | 59 | ||
53 | # If you are running a cross compiler, you may want to set this | 60 | # If you are running a cross compiler, you may want to set this |
54 | # to something more interesting... | 61 | # to something more interesting, like "powerpc-linux-". |
55 | CROSS = #powerpc-linux- | 62 | CROSS = |
56 | CC = $(CROSS)gcc | 63 | CC = $(CROSS)gcc |
57 | STRIPTOOL = $(CROSS)strip | 64 | STRIPTOOL = $(CROSS)strip |
58 | 65 | ||
@@ -73,6 +80,8 @@ OPTIMIZATION = $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>& | |||
73 | 80 | ||
74 | WARNINGS = -Wall | 81 | WARNINGS = -Wall |
75 | 82 | ||
83 | VPATH += :$(BB_SRC_DIR) | ||
84 | |||
76 | ifeq ($(DOLFS),true) | 85 | ifeq ($(DOLFS),true) |
77 | # For large file summit support | 86 | # For large file summit support |
78 | CFLAGS+=-D_FILE_OFFSET_BITS=64 | 87 | CFLAGS+=-D_FILE_OFFSET_BITS=64 |
@@ -113,7 +122,7 @@ ifndef $(PREFIX) | |||
113 | PREFIX = `pwd`/_install | 122 | PREFIX = `pwd`/_install |
114 | endif | 123 | endif |
115 | 124 | ||
116 | OBJECTS = $(shell ./busybox.sh) busybox.o messages.o usage.o utility.o | 125 | OBJECTS = $(shell cd $(BB_SRC_DIR); ./busybox.sh) busybox.o messages.o usage.o utility.o |
117 | CFLAGS += -DBB_VER='"$(VERSION)"' | 126 | CFLAGS += -DBB_VER='"$(VERSION)"' |
118 | CFLAGS += -DBB_BT='"$(BUILDTIME)"' | 127 | CFLAGS += -DBB_BT='"$(BUILDTIME)"' |
119 | ifdef BB_INIT_SCRIPT | 128 | ifdef BB_INIT_SCRIPT |
@@ -177,18 +186,18 @@ busybox.links: Config.h | |||
177 | - ./busybox.mkll | sort >$@ | 186 | - ./busybox.mkll | sort >$@ |
178 | 187 | ||
179 | nfsmount.o cmdedit.o: %.o: %.h | 188 | nfsmount.o cmdedit.o: %.o: %.h |
180 | $(OBJECTS): %.o: Config.h busybox.h %.c Makefile | 189 | $(OBJECTS): %.o: %.c Config.h busybox.h Makefile |
181 | 190 | ||
182 | utility.o: loop.h | 191 | utility.o: loop.h |
183 | 192 | ||
184 | loop.h: | 193 | loop.h: |
185 | @./mk_loop_h.sh | 194 | @$(BB_SRC_DIR)/mk_loop_h.sh |
186 | 195 | ||
187 | test tests: | 196 | test tests: |
188 | cd tests && $(MAKE) all | 197 | cd tests && $(MAKE) all |
189 | 198 | ||
190 | clean: | 199 | clean: |
191 | cd tests && $(MAKE) clean | 200 | - cd tests && $(MAKE) clean |
192 | - rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \ | 201 | - rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \ |
193 | docs/busybox.lineo.com/BusyBox.html | 202 | docs/busybox.lineo.com/BusyBox.html |
194 | - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \ | 203 | - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \ |