# HG changeset patch # User Rob Landley # Date 1188964978 18000 # Node ID 478d3c77068b0a809d5573f608972d05e9373e7c # Parent 5361f654fb5fe4975bb54730a169786e907bd62d Move optimizer flags to OPTIMIZE, so "make CC=tcc OPTIMIZE=" is an option. diff -r 5361f654fb5f -r 478d3c77068b Makefile --- a/Makefile Sat Sep 01 16:27:31 2007 -0500 +++ b/Makefile Tue Sep 04 23:02:58 2007 -0500 @@ -1,8 +1,9 @@ # Makefile for toybox. # Copyright 2006 Rob Landley -CFLAGS := $(CFLAGS) -Wall -Wundef -Wno-char-subscripts -Os +CFLAGS := $(CFLAGS) -Wall -Wundef -Wno-char-subscripts CCFLAGS = $(CFLAGS) -funsigned-char +OPTIMIZE = -Os -ffunction-sections -fdata-sections -Wl,--gc-sections CC = $(CROSS_COMPILE)gcc STRIP = $(CROSS_COMPILE)strip HOSTCC = gcc @@ -46,8 +47,7 @@ $(shell scripts/cfg2files.sh < .config | sed 's@\(.*\)@toys/\1.c@') toybox_unstripped: gen_config.h $(toyfiles) toys/toylist.h lib/*.h toys.h - $(CC) $(CCFLAGS) -I . $(toyfiles) -o toybox_unstripped \ - -ffunction-sections -fdata-sections -Wl,--gc-sections + $(CC) $(CCFLAGS) -I . $(toyfiles) -o toybox_unstripped $(OPTIMIZE) toybox: toybox_unstripped $(STRIP) toybox_unstripped -o toybox