aboutsummaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-10-05 07:40:46 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-10-05 07:40:46 +0000
commita5f01fd78e6b2419c78a9604471c78c9a05e9e6b (patch)
tree2f116d1bedfb7bddc5d9be9c9d1829944703f388 /Rules.mak
parentd7226cab5103e0551a1a44899ac1c4efa7f0aaad (diff)
downloadbusybox-w32-a5f01fd78e6b2419c78a9604471c78c9a05e9e6b.tar.gz
busybox-w32-a5f01fd78e6b2419c78a9604471c78c9a05e9e6b.tar.bz2
busybox-w32-a5f01fd78e6b2419c78a9604471c78c9a05e9e6b.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. git-svn-id: svn://busybox.net/trunk/busybox@11762 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak18
1 files changed, 7 insertions, 11 deletions
diff --git a/Rules.mak b/Rules.mak
index b18d09b96..1e519fbf1 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -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.
61CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS))) 61CFLAGS_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.
66BB_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
177endif 172endif
178 173
174ifeq ($(strip $(CONFIG_SELINUX)),y)
175 LIBRARIES += -lselinux
176endif
177
179ifeq ($(strip $(PREFIX)),) 178ifeq ($(strip $(PREFIX)),)
180 PREFIX:=`pwd`/_install 179 PREFIX:=`pwd`/_install
181endif 180endif
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
189ifneq ($(strip $(BB_SRC_DIR)),)
190 VPATH:=$(BB_SRC_DIR)
191endif
192 188
193OBJECTS:=$(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o 189OBJECTS:=$(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o
194CFLAGS += $(CROSS_CFLAGS) 190CFLAGS += $(CROSS_CFLAGS)