-PROG=busybox
-VERSION=0.40
-BUILDTIME=$(shell date "+%Y%m%d-%H%M")
-
-# Comment out the following to make a debuggable build
-# Leave this off for production use.
-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...
-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=$(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 \
- echo "true"; \
- else \
- echo "false"; \
- fi; \
-else \
- if ( test $(GCCMAJVERSION) -gt 2 ) ; then \
- echo "true"; \
- else \
- echo "false"; \
- fi; \
-fi; )
-
-
-ifeq ($(GCCSUPPORTSOPTSIZE), true)
- OPTIMIZATION=-Os
-else
- OPTIMIZATION=-O2
+# Set the following to `true' to make a debuggable build.
+# Leave this set to `false' for production use.
+# eg: `make DODEBUG=true tests'
+DODEBUG = false
+
+# 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 did it...
+#CFLAGS+=-nostdinc -I/home/andersen/CVS/uC-libc/include -I/usr/include/linux
+#LDFLAGS+=-nostdlib -L/home/andersen/CVS/libc.a
+
+
+CC = gcc
+
+# 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)
+
+
+# Allow alternative stripping tools to be used...
+ifndef $(STRIPTOOL)
+ STRIPTOOL = strip