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