changeset 38:b707dfcd403c

Reduce flag duplication and make kconfig use HOST_CC.
author Rob Landley <rob@landley.net>
date Sun, 26 Nov 2006 17:18:29 -0500
parents 14d27eab3acf
children 00e73c4dea66
files Makefile kconfig/Makefile
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Nov 25 16:50:00 2006 -0500
+++ b/Makefile	Sun Nov 26 17:18:29 2006 -0500
@@ -2,8 +2,8 @@
 # Copyright 2006 Rob Landley <rob@landley.net>
 
 CFLAGS  = -Wall -Wundef -Os -s
-CC      = $(CROSS_COMPILE)gcc $(CFLAGS)
-HOST_CC = gcc $(CFLAGS)
+CC      = $(CROSS_COMPILE)gcc $(CFLAGS) -funsigned-char
+HOST_CC = gcc $(CFLAGS) -funsigned-char
 
 all: toybox
 
@@ -29,8 +29,8 @@
 
 toyfiles = main.c toys/*.c lib/*.c
 toybox: gen_config.h $(toyfiles) toys/toylist.h lib/lib.h toys.h
-	$(CC) -Wall -Os -s -funsigned-char $(CFLAGS) -I . \
-		$(toyfiles) -o toybox -ffunction-sections -fdata-sections -Wl,--gc-sections
+	$(CC) $(CFLAGS) -I . $(toyfiles) -o toybox \
+		-ffunction-sections -fdata-sections -Wl,--gc-sections
 
 clean::
 	rm -f toybox gen_config.h
--- a/kconfig/Makefile	Sat Nov 25 16:50:00 2006 -0500
+++ b/kconfig/Makefile	Sun Nov 26 17:18:29 2006 -0500
@@ -52,11 +52,11 @@
 gen_config.h: .config
 
 kconfig/mconf: $(SHIPPED)
-	$(CC) -o $@ kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
+	$(HOST_CC) -o $@ kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
 		-lcurses "-DCURSES_LOC=<ncurses.h>"
 
 kconfig/conf: $(SHIPPED)
-	$(CC) -o $@ kconfig/{conf.c,zconf.tab.c}
+	$(HOST_CC) -o $@ kconfig/{conf.c,zconf.tab.c}
 
 clean::
 	rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}