2 # Copyright 2006 Rob Landley <rob@landley.net>
6 KCONFIG_CONFIG ?= .config
8 toybox_stuff: $(KCONFIG_CONFIG) *.[ch] lib/*.[ch] toys/*.h toys/*/*.c scripts/*.sh
10 toybox toybox_unstripped: toybox_stuff
13 .PHONY: clean distclean baseline bloatcheck install install_flat \
14 uinstall uninstall_flat test tests help toybox_stuff change
16 include kconfig/Makefile
18 $(KCONFIG_CONFIG): $(KCONFIG_TOP)
19 $(KCONFIG_TOP): generated/Config.in
20 generated/Config.in: toys/*/*.c scripts/genconfig.sh
26 baseline: toybox_unstripped
27 @cp toybox_unstripped toybox_old
29 bloatcheck: toybox_old toybox_unstripped
30 @scripts/bloatcheck toybox_old toybox_unstripped
32 generated/instlist: toybox_stuff
33 NOBUILD=1 scripts/make.sh
34 $(HOSTCC) -I . scripts/install.c -o generated/instlist
36 install_flat: generated/instlist
37 scripts/install.sh --symlink --force
40 scripts/install.sh --long --symlink --force
42 uninstall_flat: generated/instlist
43 scripts/install.sh --uninstall
46 scripts/install.sh --long --uninstall
52 rm -rf toybox toybox_unstripped generated change .singleconfig*
55 rm -f toybox_old .config*
63 @echo ' toybox - Build toybox.'
64 @echo ' change - Build each command standalone under change/.'
65 @echo ' baseline - Create toybox_old for use by bloatcheck.'
66 @echo ' bloatcheck - Report size differences between old and current versions'
67 @echo ' test - Run test suite against compiled commands.'
68 @echo ' clean - Delete temporary files.'
69 @echo " distclean - Delete everything that isn't shipped."
70 @echo ' install_flat - Install toybox into $$PREFIX directory.'
71 @echo ' install - Install toybox into subdirectories of $$PREFIX.'
72 @echo ' uninstall_flat - Remove toybox from $$PREFIX directory.'
73 @echo ' uninstall - Remove toybox from subdirectories of $$PREFIX.'
75 @echo 'example: CFLAGS="--static" CROSS_COMPILE=armv5l- make defconfig toybox install'