Making note of my changes
[oweals/busybox.git] / Makefile
index 1413ea05df7d04b1b51529bc94624b434be424c4..554dd00f55453fdc750587e2fca5d9d3b7e2499b 100644 (file)
--- a/Makefile
+++ b/Makefile
 
 
 PROG=busybox
-VERSION=0.36
+VERSION=0.42
 BUILDTIME=$(shell date "+%Y%m%d-%H%M")
 
 # Comment out the following to make a debuggable build
 # Leave this off for production use.
-DODEBUG=true
+DODEBUG=false
 # If you want a static binary, turn this on.  I can't think
 # of many situations where anybody would ever want it static, 
 # but...
@@ -31,12 +31,12 @@ DOSTATIC=false
 #This will choke on a non-debian system
 ARCH=`uname -m | sed -e 's/i.86/i386/' | sed -e 's/sparc.*/sparc/'`
 
-GCCMAJVERSION=`$(CC) --version | sed -n "s/^\([0-9]\)\.\([0-9].*\)[\.].*/\1/p"`
-GCCMINVERSION=`$(CC) --version | sed -n "s/^\([0-9]\)\.\([0-9].*\)[\.].*/\2/p"`
+GCCMAJVERSION=$(shell $(CC) --version | sed -n "s/^\([^\.]*\).*/\1/p" )
+GCCMINVERSION=$(shell $(CC) --version | sed -n "s/^[^\.]*\.\([^\.]*\)[\.].*/\1/p" )
 
 GCCSUPPORTSOPTSIZE=$(shell \
 if ( test $(GCCMAJVERSION) -eq 2 ) ; then \
-    if ( test $(GCCMINVERSION) -ge 91 ) ; then \
+    if ( test $(GCCMINVERSION) -ge 66 ) ; then \
        echo "true"; \
     else \
        echo "false"; \
@@ -73,13 +73,16 @@ else
 endif
 
 ifndef $(PREFIX)
-    PREFIX=`pwd`/busybox_install
+    PREFIX=`pwd`/_install
 endif
 
 LIBRARIES=
 OBJECTS=$(shell ./busybox.sh)
 CFLAGS+= -DBB_VER='"$(VERSION)"'
 CFLAGS+= -DBB_BT='"$(BUILDTIME)"'
+ifdef BB_INIT_SCRIPT
+    CFLAGS += -DINIT_SCRIPT=${BB_INIT_SCRIPT}
+endif
 
 all: busybox busybox.links
 
@@ -89,27 +92,22 @@ busybox: $(OBJECTS)
 
 busybox.links:
        - ./busybox.mkll | sort >$@
-       
+
 clean:
        - rm -f $(PROG) busybox.links *~ *.o core 
-       - rm -rf busybox_install
+       - rm -rf _install
 
 distclean: clean
        - rm -f $(PROG)
 
-force:
-
 $(OBJECTS):  busybox.def.h internal.h Makefile
 
 install: busybox busybox.links
        ./install.sh $(PREFIX)
 
-whichversion:
-       @echo $(VERSION)
-
-
 dist: release
 
 release: distclean
-       (cd .. ; rm -rf busybox-$(VERSION) ; cp -a busybox busybox-$(VERSION); rm -rf busybox-$(VERSION)/CVS busybox-$(VERSION)/.cvsignore ; tar -cvzf busybox-$(VERSION).tar.gz busybox-$(VERSION)) 
+       (cd .. ; rm -rf busybox-$(VERSION) ; cp -a busybox busybox-$(VERSION); rm -rf busybox-$(VERSION)/CVS busybox-$(VERSION)/scripts/CVS busybox-$(VERSION)/docs/CVS busybox-$(VERSION)/.cvsignore ; tar -cvzf busybox-$(VERSION).tar.gz busybox-$(VERSION)) 
+