aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-11-02 19:50:02 -0500
committerRob Landley <rob@landley.net>2006-11-02 19:50:02 -0500
commit7fc43f79783658a38be23ca8b3cdac5f11e397d1 (patch)
treea62aedb354d707e20d0a337a9d9580632440d5a2 /Makefile
parent63d41686d828ab729841e5902a0ace1d57e08439 (diff)
downloadtoybox-7fc43f79783658a38be23ca8b3cdac5f11e397d1.tar.gz
Better dependencies, and feed the linker --gc-sections. (Which is not an
substitute for building just the stuff we need, but is easy to do for now.)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7c7dd087..881e2c30 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,8 @@ all: toybox
include kconfig/Makefile
+.config: Config.in toys/Config.in
+
# The long and roundabout sed is to make old versions of sed happy. New ones
# have '\n' so can replace one line with two without all the branches and
# mucking about with hold space.
@@ -26,9 +28,9 @@ gen_config.h: .config
# Actual build
toyfiles = main.c toys/*.c lib/*.c
-toybox: gen_config.h $(toyfiles)
+toybox: gen_config.h $(toyfiles) lib/lib.h toys.h
$(CC) -Wall -Os -s -funsigned-char $(CFLAGS) -I . \
- $(toyfiles) -o toybox
+ $(toyfiles) -o toybox -ffunction-sections -fdata-sections -Wl,--gc-sections
clean::
rm -f toybox gen_config.h