aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-09-04 23:02:58 -0500
committerRob Landley <rob@landley.net>2007-09-04 23:02:58 -0500
commit34d4ce7d0720687131dcc97cf64ec14687d7c4ec (patch)
tree0f3ce966848e373395290a53d1b2898111872fbf /Makefile
parenta76f82c7f64fa413737507992aaa466ce91c656c (diff)
downloadtoybox-34d4ce7d0720687131dcc97cf64ec14687d7c4ec.tar.gz
Move optimizer flags to OPTIMIZE, so "make CC=tcc OPTIMIZE=" is an option.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d3436fee..5a99a876 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
# Makefile for toybox.
# Copyright 2006 Rob Landley <rob@landley.net>
-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 @@ toyfiles = main.c lib/*.c \
$(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