diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-10-05 07:40:46 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-10-05 07:40:46 +0000 |
commit | 5c071bcf2f6bc923b5d6779b3563d08b80a8949d (patch) | |
tree | 2f116d1bedfb7bddc5d9be9c9d1829944703f388 /Rules.mak | |
parent | dc2510327b43ab5ce18c1752304015fad4663bad (diff) | |
download | busybox-w32-5c071bcf2f6bc923b5d6779b3563d08b80a8949d.tar.gz busybox-w32-5c071bcf2f6bc923b5d6779b3563d08b80a8949d.tar.bz2 busybox-w32-5c071bcf2f6bc923b5d6779b3563d08b80a8949d.zip |
- fix building out-of-tree;
to test, checkout the source (let's assume /scratch/src/busybox), then
mkdir /tmp/bb ; cd /tmp/bb
make top_srcdir=/scratch/src/busybox O="$(pwd)" -f /scratch/src/busybox/Makefile allyesconfig check
- default to O=$(pwd) if no O was specified. Now you can just specify
the top_srcdir (without O=/somewhere) to create the obj-tree in pwd.
- make "make configtarget buildtarget" work. Previously this didn't
work due to how HAVE_DOT_CONFIG was evaluated. Two separate steps were
needed before, e.g. make config ; make busybox.
- remove some unneeded variables from Rules.mak (BB_SRC_DIR from Mr.
ldoolitt@recycle.lbl) which suggest that the stuff fixed above
didn't work before.
- move selinux libraries to where they belong (from Makefile to Rules.mak)
- update the docs to mention svn instead of cvs and provide an example
for building out-of-tree in INSTALL.
Diffstat (limited to 'Rules.mak')
-rw-r--r-- | Rules.mak | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -27,7 +27,7 @@ BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z") | |||
27 | # With a modern GNU make(1) (highly recommended, that's what all the | 27 | # With a modern GNU make(1) (highly recommended, that's what all the |
28 | # developers use), all of the following configuration values can be | 28 | # developers use), all of the following configuration values can be |
29 | # overridden at the command line. For example: | 29 | # overridden at the command line. For example: |
30 | # make CROSS=powerpc-linux- BB_SRC_DIR=$HOME/busybox PREFIX=/mnt/app | 30 | # make CROSS=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app |
31 | #-------------------------------------------------------- | 31 | #-------------------------------------------------------- |
32 | 32 | ||
33 | # If you are running a cross compiler, you will want to set 'CROSS' | 33 | # If you are running a cross compiler, you will want to set 'CROSS' |
@@ -60,11 +60,6 @@ LC_ALL:= C | |||
60 | # For optimization overrides, it's better still to set OPTIMIZATION. | 60 | # For optimization overrides, it's better still to set OPTIMIZATION. |
61 | CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS))) | 61 | CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS))) |
62 | 62 | ||
63 | # If you have a "pristine" source directory, point BB_SRC_DIR to it. | ||
64 | # Experimental and incomplete; tell the mailing list | ||
65 | # <busybox@busybox.net> if you do or don't like it so far. | ||
66 | BB_SRC_DIR= | ||
67 | |||
68 | # To compile vs some other alternative libc, you may need to use/adjust | 63 | # To compile vs some other alternative libc, you may need to use/adjust |
69 | # the following lines to meet your needs... | 64 | # the following lines to meet your needs... |
70 | # | 65 | # |
@@ -176,19 +171,20 @@ ifeq ($(strip $(CONFIG_STATIC)),y) | |||
176 | LDFLAGS += --static | 171 | LDFLAGS += --static |
177 | endif | 172 | endif |
178 | 173 | ||
174 | ifeq ($(strip $(CONFIG_SELINUX)),y) | ||
175 | LIBRARIES += -lselinux | ||
176 | endif | ||
177 | |||
179 | ifeq ($(strip $(PREFIX)),) | 178 | ifeq ($(strip $(PREFIX)),) |
180 | PREFIX:=`pwd`/_install | 179 | PREFIX:=`pwd`/_install |
181 | endif | 180 | endif |
182 | 181 | ||
183 | # Additional complications due to support for pristine source dir. | 182 | # Additional complications due to support for pristine source dir. |
184 | # Include files in the build directory should take precedence over | 183 | # Include files in the build directory should take precedence over |
185 | # the copy in BB_SRC_DIR, both during the compilation phase and the | 184 | # the copy in top_srcdir, both during the compilation phase and the |
186 | # shell script that finds the list of object files. | 185 | # shell script that finds the list of object files. |
187 | # Work in progress by <ldoolitt@recycle.lbl.gov>. | 186 | # Work in progress by <ldoolitt@recycle.lbl.gov>. |
188 | # | 187 | |
189 | ifneq ($(strip $(BB_SRC_DIR)),) | ||
190 | VPATH:=$(BB_SRC_DIR) | ||
191 | endif | ||
192 | 188 | ||
193 | OBJECTS:=$(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o | 189 | OBJECTS:=$(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o |
194 | CFLAGS += $(CROSS_CFLAGS) | 190 | CFLAGS += $(CROSS_CFLAGS) |