# HG changeset patch # User Rob Landley # Date 1162515002 18000 # Node ID 414625f9766768a0ebd8ba66b51f9508bc77ef85 # Parent 7e7ae6e9a28ea457e3ce5d7c1351dbe869c9f6a9 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.) diff -r 7e7ae6e9a28e -r 414625f97667 Makefile --- a/Makefile Thu Nov 02 11:59:25 2006 -0500 +++ b/Makefile Thu Nov 02 19:50:02 2006 -0500 @@ -11,6 +11,8 @@ 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 @@ # 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