# If you have a "pristine" source directory, point CONFIG_SRC_DIR to it.
# Experimental and incomplete; tell the mailing list
-# <busybox@opensource.lineo.com> if you do or don't like it so far.
+# <busybox@busybox.net> if you do or don't like it so far.
CONFIG_SRC_DIR =
# If you are running a cross compiler, you may want to set CROSS
# use '-Os' optimization if available, else use -O2
OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null \
>/dev/null 2>&1; then echo "-Os"; else echo "-O2" ; fi}
-
+GCC_STACK_BOUNDRY := ${shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null \
+ >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; else echo "" ; fi}
+OPTIMIZATIONS=$(OPTIMIZATION) -fomit-frame-pointer $(GCC_STACK_BOUNDRY)
WARNINGS=-Wall -Wstrict-prototypes -Wshadow
-CFLAGS = -I $(TOPDIR)/include
+CFLAGS = -I$(TOPDIR)/include
ARFLAGS = -r
#
LDFLAGS += -Wl,-warn-common
STRIPCMD =
else
- CFLAGS += $(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer -mpreferred-stack-boundary=2 -D_GNU_SOURCE
+ CFLAGS += $(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE
LDFLAGS += -s -Wl,-warn-common
- STRIPCMD = $(STRIP) --remove-section=.note --remove-section=.comment $(PROG)
+ STRIPCMD = $(STRIP) --remove-section=.note --remove-section=.comment
endif
ifeq ($(strip $(DOSTATIC)),true)
LDFLAGS += --static
$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/config/MARKER
$(MAKE) CFLAGS="$(CFLAGS)" -C $(patsubst _dir_%, %, $@)
-busybox: config.h depend bbsubdirs
+busybox: config.h dep-files bbsubdirs
$(CC) $(LDFLAGS) -o $@ applets/busybox.o $(shell find $(SUBDIRS) -name \*.a) $(LIBCONFIG_LIB) $(LIBRARIES)
- $(STRIPCMD)
+ $(STRIPCMD) $(PROG)
busybox.links: applets/busybox.mkll
- $(SHELL) $^ >$@
- pod2man --center=BusyBox --release="version $(VERSION)" \
$< > $@
-docs/BusyBox.html: docs/busybox.lineo.com/BusyBox.html
+docs/BusyBox.html: docs/busybox.net/BusyBox.html
- mkdir -p docs
-@ rm -f docs/BusyBox.html
- -@ ln -s busybox.lineo.com/BusyBox.html docs/BusyBox.html
+ -@ ln -s busybox.net/BusyBox.html docs/BusyBox.html
-docs/busybox.lineo.com/BusyBox.html: docs/busybox.pod
- -@ mkdir -p docs/busybox.lineo.com
+docs/busybox.net/BusyBox.html: docs/busybox.pod
+ -@ mkdir -p docs/busybox.net
- pod2html --noindex $< > \
- docs/busybox.lineo.com/BusyBox.html
+ docs/busybox.net/BusyBox.html
-@ rm -f pod2htm*
docs/busybox/busyboxdocumentation.html: docs/busybox.sgml
- mkdir -p docs
- (cd docs/busybox.lineo.com; sgmltools -b html ../busybox.sgml)
+ (cd docs/busybox.net; sgmltools -b html ../busybox.sgml)
# The nifty new buildsystem stuff
scripts/mkdep: scripts/mkdep.c
$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
dep-files: scripts/mkdep
- if [ ! -f .depend ] ; then \
+ @if [ ! -f .depend ] ; then \
rm -f .depend .hdepend; \
mkdir -p $(TOPDIR)/include/config; \
scripts/mkdep -I $(TOPDIR)/include -- \
- $(MAKE) -C tests clean
- $(MAKE) -C scripts/lxdialog clean
- rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
- docs/busybox.lineo.com/BusyBox.html
+ docs/busybox.net/BusyBox.html
- rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
- docs/busybox.pdf docs/busybox.lineo.com/busybox.html \
+ docs/busybox.pdf docs/busybox.net/busybox.html \
docs/busybox _install pod2htm* *.gdb *.elf *~ core
- rm -f busybox.links libbb/loop.h .config.old .hdepend
- rm -f scripts/split-include scripts/mkdep .*config.log
-.PHONY: tags
+.PHONY: tags check
tags:
ctags -R .
+
+check: busybox
+ cd testsuite && ./runtest