Make cin be static
[oweals/busybox.git] / Makefile
index 19f024a438e78ce715a4b0b1018a6d7be3e9fc4b..285f3ab66620871919ded3fd9c3875372c7376f6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,11 @@ 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
 
@@ -153,6 +158,9 @@ ifdef BB_INIT_SCRIPT
     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
 
@@ -216,11 +224,11 @@ busybox: $(OBJECTS)
        $(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
 
@@ -236,6 +244,7 @@ clean:
            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