2 # Copyright 2006 Rob Landley <rob@landley.net>
6 KCONFIG_CONFIG ?= .config
7 toybox toybox_unstripped: $(KCONFIG_CONFIG) *.[ch] lib/*.[ch] toys/*.h toys/*/*.c scripts/*.sh
10 .PHONY: clean distclean baseline bloatcheck install install_flat \
11 uinstall uninstall_flat test tests help scripts/test
13 include kconfig/Makefile
15 $(KCONFIG_TOP): generated/Config.in
16 generated/Config.in: toys/*/*.c scripts/genconfig.sh
22 baseline: toybox_unstripped
23 @cp toybox_unstripped toybox_old
25 bloatcheck: toybox_old toybox_unstripped
26 @scripts/bloatcheck toybox_old toybox_unstripped
28 generated/instlist: toybox
29 $(HOSTCC) -I . scripts/install.c -o generated/instlist
31 install_flat: generated/instlist
32 scripts/install.sh --symlink --force
35 scripts/install.sh --long --symlink --force
37 uninstall_flat: generated/instlist
38 scripts/install.sh --uninstall
41 scripts/install.sh --long --uninstall
44 rm -rf toybox toybox_unstripped testdir generated/build.sh \
45 .singleconfig .singleconfig.old generated/obj \
46 generated/Config.* generated/*.h generated/*.dat \
47 generated/instlist generated/mkflags generated/config2help
50 rm -f toybox_old .config*
58 @echo ' toybox - Build toybox.'
59 @echo ' baseline - Create busybox_old for use by bloatcheck.'
60 @echo ' bloatcheck - Report size differences between old and current versions'
61 @echo ' test - Run test suite against compiled commands.'
62 @echo ' clean - Delete temporary files.'
63 @echo " distclean - Delete everything that isn't shipped."
64 @echo ' install_flat - Install toybox into $$PREFIX directory.'
65 @echo ' install - Install toybox into subdirectories of $$PREFIX.'
66 @echo ' uninstall_flat - Remove toybox from $$PREFIX directory.'
67 @echo ' uninstall - Remove toybox from subdirectories of $$PREFIX.'
69 @echo 'example: CFLAGS="--static" CROSS_COMPILE=armv5l- make defconfig toybox install'