Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 1 | |
| 2 | VERSION=0.29alpha1 |
| 3 | BUILDTIME=$(shell date "+%Y%m%d-%H%M") |
| 4 | |
| 5 | #This will choke on a non-debian system |
| 6 | ARCH=`uname -m | sed -e 's/i.86/i386/' | sed -e 's/sparc.*/sparc/'` |
| 7 | |
| 8 | |
| 9 | STRIP= strip --remove-section=.note --remove-section=.comment busybox |
| 10 | LDFLAGS= -s |
| 11 | |
| 12 | # -D_GNU_SOURCE is needed because environ is used in init.c |
| 13 | CFLAGS=-Wall -O2 -fomit-frame-pointer -fno-builtin -D_GNU_SOURCE |
| 14 | # For debugging only |
| 15 | #CFLAGS=-Wall -g -D_GNU_SOURCE |
| 16 | LIBRARIES=-lc |
Eric Andersen | 2b69c40 | 1999-10-05 22:58:32 +0000 | [diff] [blame^] | 17 | OBJECTS=$(shell ./busybox.sh) utility.o |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 18 | |
| 19 | CFLAGS+= -DBB_VER='"$(VERSION)"' |
| 20 | CFLAGS+= -DBB_BT='"$(BUILDTIME)"' |
| 21 | |
| 22 | #all: busybox links |
| 23 | all: busybox |
| 24 | |
| 25 | busybox: $(OBJECTS) |
| 26 | $(CC) $(CFLAGS) $(LDFLAGS) -o busybox $(OBJECTS) $(LIBRARIES) |
| 27 | #$(STRIP) |
| 28 | |
| 29 | links: |
| 30 | - ./busybox.mkll | sort >busybox.links |
| 31 | |
| 32 | clean: |
| 33 | - rm -f busybox busybox.links *~ *.o |
| 34 | |
| 35 | distclean: clean |
| 36 | - rm -f busybox |
| 37 | |
| 38 | force: |
Eric Andersen | 2b69c40 | 1999-10-05 22:58:32 +0000 | [diff] [blame^] | 39 | |
| 40 | $(OBJECTS): busybox.def.h Makefile |