#
PROG := busybox
-VERSION := 0.48pre
+VERSION := 0.49pre
BUILDTIME := $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
export VERSION
# overridden at the command line. For example:
# make CROSS=powerpc-linux- BB_SRC_DIR=$HOME/busybox PREFIX=/mnt/app
+# If you want to add some simple compiler switches (like -march=i686),
+# especially from the command line, use this instead of CFLAGS directly.
+# For optimization overrides, it's better still to set OPTIMIZATION.
+CFLAGS_EXTRA =
+
# If you want a static binary, turn this on.
DOSTATIC = false
# To compile vs an alternative libc, you may need to use/adjust
# the following lines to meet your needs. This is how I make
-# busybox compile with uC-Libc (needs BB_GETOPT and BB_FEATURE_NFSMOUNT
-# disabled at the moment).
+# busybox compile staticly with uClibc (needs BB_FEATURE_NFSMOUNT
+# disabled at the moment). Note the _full_ path for LIBCDIR.
+# This is because make doesn't do ~ expansion...
#LIBCDIR=/home/andersen/CVS/uClibc
#LDFLAGS+=-nostdlib
#LIBRARIES = $(LIBCDIR)/libc.a -lgcc
#CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
#GCCINCDIR = $(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
+# This is how I compile with the uClibc shared lib...
+#LIBCDIR=/home/andersen/CVS/uClibc
+#LDFLAGS+=-nostdlib
+#LIBRARIES = -luClibc -lgcc $(LIBCDIR)/crt0.o
+#CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
+#GCCINCDIR = $(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
+
#--------------------------------------------------------
# use '-Os' optimization if available, else use -O2
CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'
endif
+# Put user-supplied flags at the end, where they
+# have a chance of winning.
+CFLAGS += $(CFLAGS_EXTRA)
all: busybox busybox.links doc
$(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
$(STRIP)
-busybox.links: Config.h
+busybox.links: Config.h applets.h
- $(BB_SRC_DIR)/busybox.mkll $(CONFIG_H) $(BB_SRC_DIR)/applets.h >$@
nfsmount.o cmdedit.o: %.o: %.h
-$(OBJECTS): %.o: %.c Config.h busybox.h Makefile
+$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
utility.o: loop.h
docs/busybox.lineo.com/BusyBox.html
- rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
docs/busybox.pdf docs/busybox.lineo.com/busybox.html
+ - rm -f Config.h.ORG bb.def.h busybox.REGRESS.sh.results bb.OptionsAndFeatures
- rm -rf docs/busybox _install
- rm -f busybox.links loop.h *~ *.o core