aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-05-16 20:07:38 +0000
committerErik Andersen <andersen@codepoet.org>2000-05-16 20:07:38 +0000
commit499f65fb98a8258f8704b52efb3a99da0c82f785 (patch)
tree8bb86bf2d07ab298eff29daea039449e87d90166 /Makefile
parent969f9b0486792829378ff7397ee53c1475b22cdc (diff)
downloadbusybox-w32-499f65fb98a8258f8704b52efb3a99da0c82f785.tar.gz
busybox-w32-499f65fb98a8258f8704b52efb3a99da0c82f785.tar.bz2
busybox-w32-499f65fb98a8258f8704b52efb3a99da0c82f785.zip
Some updates for better portability.
-Erik
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index e9192f948..d3d71ad77 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,12 @@ DODEBUG = false
31# If you want a static binary, turn this on. 31# If you want a static binary, turn this on.
32DOSTATIC = false 32DOSTATIC = false
33 33
34# To compile vs an alternative libc, you may need to use/adjust
35# the following lines to meet your needs. This is how I did it...
36#CFLAGS+=-nostdinc -I/home/andersen/CVS/uC-libc/include -I/usr/include/linux
37#LDFLAGS+=-nostdlib -L/home/andersen/CVS/libc.a
38
39
34CC = gcc 40CC = gcc
35 41
36# use '-Os' optimization if available, else use -O2 42# use '-Os' optimization if available, else use -O2
@@ -43,10 +49,6 @@ ifndef $(STRIPTOOL)
43 STRIPTOOL = strip 49 STRIPTOOL = strip
44endif 50endif
45 51
46# TODO: Try compiling vs other libcs.
47# See what -nostdinc and -nostdlib do for them.
48# also try --prefix=/usr/my-libc-stuff
49
50# -D_GNU_SOURCE is needed because environ is used in init.c 52# -D_GNU_SOURCE is needed because environ is used in init.c
51ifeq ($(DODEBUG),true) 53ifeq ($(DODEBUG),true)
52 CFLAGS += -Wall -g -D_GNU_SOURCE 54 CFLAGS += -Wall -g -D_GNU_SOURCE
@@ -65,11 +67,10 @@ else
65 #want to give it a shot... 67 #want to give it a shot...
66 # 68 #
67 #ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \ 69 #ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \
68 # -o /dev/null -xc /dev/null && $(LD) --gc-sections -v >/dev/null && echo 1),1) 70 # -o /dev/null -xc /dev/null 2>/dev/null && $(LD) --gc-sections -v >/dev/null && echo 1),1)
69 # CFLAGS += -ffunction-sections -fdata-sections -DFUNCTION_SECTIONS 71 # CFLAGS += -ffunction-sections -fdata-sections
70 # LDFLAGS += --gc-sections 72 # LDFLAGS += --gc-sections
71 #endif 73 #endif
72 #
73 endif 74 endif
74endif 75endif
75 76
@@ -77,6 +78,7 @@ ifndef $(PREFIX)
77 PREFIX = `pwd`/_install 78 PREFIX = `pwd`/_install
78endif 79endif
79 80
81
80LIBRARIES = 82LIBRARIES =
81OBJECTS = $(shell ./busybox.sh) busybox.o messages.o utility.o 83OBJECTS = $(shell ./busybox.sh) busybox.o messages.o utility.o
82CFLAGS += -DBB_VER='"$(VERSION)"' 84CFLAGS += -DBB_VER='"$(VERSION)"'