Makefile revision 94a4603481b9fc663a72549b4cd0dcbd95fca062
1# Makefile for toybox. 2# Copyright 2006 Rob Landley <rob@landley.net> 3 4all: toybox 5 6KCONFIG_CONFIG ?= .config 7toybox toybox_unstripped: $(KCONFIG_CONFIG) *.[ch] lib/*.[ch] toys/*.h toys/*/*.c scripts/*.sh 8 scripts/make.sh 9 10.PHONY: clean distclean baseline bloatcheck install install_flat \ 11 uinstall uninstall_flat test tests help 12 13include kconfig/Makefile 14 15$(KCONFIG_TOP): generated/Config.in 16generated/Config.in: toys/*/*.c scripts/genconfig.sh 17 scripts/genconfig.sh 18 19HOSTCC?=cc 20 21# Development targets 22baseline: toybox_unstripped 23 @cp toybox_unstripped toybox_old 24 25bloatcheck: toybox_old toybox_unstripped 26 @scripts/bloatcheck toybox_old toybox_unstripped 27 28generated/instlist: toybox 29 $(HOSTCC) -I . scripts/install.c -o generated/instlist 30 31install_flat: generated/instlist 32 scripts/install.sh --symlink --force 33 34install: 35 scripts/install.sh --long --symlink --force 36 37uninstall_flat: generated/instlist 38 scripts/install.sh --uninstall 39 40uninstall: 41 scripts/install.sh --long --uninstall 42 43clean:: 44 rm -rf toybox toybox_unstripped generated .singleconfig* 45 46distclean: clean 47 rm -f toybox_old .config* 48 49test: tests 50 51tests: 52 scripts/test.sh 53 54help:: 55 @echo ' toybox - Build toybox.' 56 @echo ' baseline - Create busybox_old for use by bloatcheck.' 57 @echo ' bloatcheck - Report size differences between old and current versions' 58 @echo ' test - Run test suite against compiled commands.' 59 @echo ' clean - Delete temporary files.' 60 @echo " distclean - Delete everything that isn't shipped." 61 @echo ' install_flat - Install toybox into $$PREFIX directory.' 62 @echo ' install - Install toybox into subdirectories of $$PREFIX.' 63 @echo ' uninstall_flat - Remove toybox from $$PREFIX directory.' 64 @echo ' uninstall - Remove toybox from subdirectories of $$PREFIX.' 65 @echo '' 66 @echo 'example: CFLAGS="--static" CROSS_COMPILE=armv5l- make defconfig toybox install' 67 @echo '' 68