changeset 119:8b5ae5f607af

Make it easier to specify which compiler to use.
author Rob Landley <rob@landley.net>
date Tue, 29 May 2007 16:26:47 -0400
parents 93da7cc220e6
children 4dc8017fdb0e
files Makefile
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu May 17 02:38:27 2007 -0400
+++ b/Makefile	Tue May 29 16:26:47 2007 -0400
@@ -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 @@
 
 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)/