- 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.
This commit is contained in:
18
Rules.mak
18
Rules.mak
@@ -27,7 +27,7 @@ BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
|
||||
# With a modern GNU make(1) (highly recommended, that's what all the
|
||||
# developers use), all of the following configuration values can be
|
||||
# overridden at the command line. For example:
|
||||
# make CROSS=powerpc-linux- BB_SRC_DIR=$HOME/busybox PREFIX=/mnt/app
|
||||
# make CROSS=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app
|
||||
#--------------------------------------------------------
|
||||
|
||||
# If you are running a cross compiler, you will want to set 'CROSS'
|
||||
@@ -60,11 +60,6 @@ LC_ALL:= C
|
||||
# For optimization overrides, it's better still to set OPTIMIZATION.
|
||||
CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS)))
|
||||
|
||||
# If you have a "pristine" source directory, point BB_SRC_DIR to it.
|
||||
# Experimental and incomplete; tell the mailing list
|
||||
# <busybox@busybox.net> if you do or don't like it so far.
|
||||
BB_SRC_DIR=
|
||||
|
||||
# To compile vs some other alternative libc, you may need to use/adjust
|
||||
# the following lines to meet your needs...
|
||||
#
|
||||
@@ -176,19 +171,20 @@ ifeq ($(strip $(CONFIG_STATIC)),y)
|
||||
LDFLAGS += --static
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONFIG_SELINUX)),y)
|
||||
LIBRARIES += -lselinux
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PREFIX)),)
|
||||
PREFIX:=`pwd`/_install
|
||||
endif
|
||||
|
||||
# Additional complications due to support for pristine source dir.
|
||||
# Include files in the build directory should take precedence over
|
||||
# the copy in BB_SRC_DIR, both during the compilation phase and the
|
||||
# the copy in top_srcdir, both during the compilation phase and the
|
||||
# shell script that finds the list of object files.
|
||||
# Work in progress by <ldoolitt@recycle.lbl.gov>.
|
||||
#
|
||||
ifneq ($(strip $(BB_SRC_DIR)),)
|
||||
VPATH:=$(BB_SRC_DIR)
|
||||
endif
|
||||
|
||||
|
||||
OBJECTS:=$(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o
|
||||
CFLAGS += $(CROSS_CFLAGS)
|
||||
|
Reference in New Issue
Block a user