aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-05-29 16:26:47 -0400
committerRob Landley <rob@landley.net>2007-05-29 16:26:47 -0400
commit30d79a1411d584cbb46f8356c82bbbf8702df58d (patch)
tree615a539d0703de01b09f69b721a24eddb9e97d15 /Makefile
parentf2f98fa34e9c00c2b5366fb6a9a912cf94f9a157 (diff)
downloadtoybox-30d79a1411d584cbb46f8356c82bbbf8702df58d.tar.gz
Make it easier to specify which compiler to use.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index fe23a332..dec52d8b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,10 @@
# Copyright 2006 Rob Landley <rob@landley.net>
CFLAGS = -Wall -Wundef -Wno-char-subscripts -Os
-CC = $(CROSS_COMPILE)gcc $(CFLAGS) -funsigned-char
+CCFLAGS = $(CFLAGS) -funsigned-char
+CC = $(CROSS_COMPILE)gcc
STRIP = $(CROSS_COMPILE)strip
-HOSTCC = gcc $(CFLAGS) -funsigned-char
+HOSTCC = gcc
all: toybox
@@ -45,14 +46,14 @@ toysfiles = $(shell sed -nre 's/^CONFIG_(.*)=y/\1/;t skip;b;:skip;s/_.*//;p' .co
toyfiles = main.c lib/*.c $(toysfiles)
toybox_unstripped: gen_config.h $(toyfiles) toys/toylist.h lib/*.h toys.h
- $(CC) $(CFLAGS) -I . $(toyfiles) -o toybox_unstripped \
+ $(CC) $(CCFLAGS) -I . $(toyfiles) -o toybox_unstripped \
-ffunction-sections -fdata-sections -Wl,--gc-sections
toybox: toybox_unstripped
$(STRIP) toybox_unstripped -o toybox
instlist: toybox
- $(HOSTCC) -I . scripts/install.c -o instlist
+ $(HOSTCC) $(CCFLAGS) -I . scripts/install.c -o instlist
install_flat: instlist
@mkdir -p $(PREFIX)/