Rob Landley | 401ae8f | 2006-11-01 22:26:25 -0500 | [diff] [blame] | 1 | # Makefile for toybox. |
| 2 | # Copyright 2006 Rob Landley <rob@landley.net> |
landley | c562150 | 2006-09-28 17:18:51 -0400 | [diff] [blame] | 3 | |
Rob Landley | 401ae8f | 2006-11-01 22:26:25 -0500 | [diff] [blame] | 4 | all: toybox |
| 5 | |
Rob Landley | 87df5f6 | 2008-05-04 16:20:15 -0500 | [diff] [blame] | 6 | toybox toybox_unstripped: .config *.[ch] lib/*.[ch] toys/*.[ch] scripts/*.sh |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 7 | scripts/make.sh |
| 8 | |
Rob Landley | bf081b9 | 2008-03-28 00:40:57 -0500 | [diff] [blame] | 9 | .PHONY: clean distclean baseline bloatcheck install install_flat \ |
Rob Landley | 09c13c9 | 2008-03-29 17:25:28 -0500 | [diff] [blame] | 10 | uinstall uninstall_flat test tests help scripts/test |
Rob Landley | 401ae8f | 2006-11-01 22:26:25 -0500 | [diff] [blame] | 11 | |
| 12 | include kconfig/Makefile |
| 13 | |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 14 | $(KCONFIG_TOP): generated/Config.in |
Rob Landley | 27f5779 | 2012-02-03 23:16:28 -0600 | [diff] [blame] | 15 | generated/Config.in: toys/*.c scripts/genconfig.sh |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 16 | scripts/genconfig.sh |
Rob Landley | de05a70 | 2007-01-31 14:37:01 -0500 | [diff] [blame] | 17 | |
Rob Landley | fcf188f | 2012-02-19 22:21:45 -0600 | [diff] [blame] | 18 | HOSTCC?=cc |
Rob Landley | 401ae8f | 2006-11-01 22:26:25 -0500 | [diff] [blame] | 19 | |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 20 | # Development targets |
| 21 | baseline: toybox_unstripped |
| 22 | @cp toybox_unstripped toybox_old |
| 23 | |
| 24 | bloatcheck: toybox_old toybox_unstripped |
Rob Landley | 7a4551f | 2012-02-21 21:27:10 -0600 | [diff] [blame] | 25 | @scripts/bloatcheck toybox_old toybox_unstripped |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 26 | |
Rob Landley | bcfad87 | 2007-01-31 14:18:05 -0500 | [diff] [blame] | 27 | instlist: toybox |
Rob Landley | 97abd4a | 2012-06-18 23:23:24 -0500 | [diff] [blame^] | 28 | $(HOSTCC) -I . scripts/install.c -o instlist |
Rob Landley | bcfad87 | 2007-01-31 14:18:05 -0500 | [diff] [blame] | 29 | |
| 30 | install_flat: instlist |
Rob Landley | 05fbd1e | 2008-03-28 00:09:31 -0500 | [diff] [blame] | 31 | scripts/install.sh --symlink --force |
| 32 | |
| 33 | install: |
| 34 | scripts/install.sh --long --symlink --force |
Rob Landley | bcfad87 | 2007-01-31 14:18:05 -0500 | [diff] [blame] | 35 | |
Rob Landley | bf081b9 | 2008-03-28 00:40:57 -0500 | [diff] [blame] | 36 | uninstall_flat: instlist |
| 37 | scripts/install.sh --uninstall |
| 38 | |
| 39 | uninstall: |
| 40 | scripts/install.sh --long --uninstall |
| 41 | |
Rob Landley | 401ae8f | 2006-11-01 22:26:25 -0500 | [diff] [blame] | 42 | clean:: |
Rob Landley | 7a585c6 | 2008-02-23 15:02:11 -0600 | [diff] [blame] | 43 | rm -rf toybox toybox_unstripped generated/config.h generated/Config.in \ |
Rob Landley | f2e61cb | 2012-02-28 06:34:35 -0600 | [diff] [blame] | 44 | generated/newtoys.h generated/globals.h instlist testdir \ |
| 45 | generated/Config.probed |
Rob Landley | 401ae8f | 2006-11-01 22:26:25 -0500 | [diff] [blame] | 46 | |
| 47 | distclean: clean |
Rob Landley | 58ecc3e | 2008-01-10 14:40:13 -0600 | [diff] [blame] | 48 | rm -f toybox_old .config* generated/help.h |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 49 | |
Rob Landley | e35f2b8 | 2007-06-18 01:09:00 -0400 | [diff] [blame] | 50 | test: tests |
| 51 | |
| 52 | tests: |
Rob Landley | 9d243a2 | 2008-03-28 00:44:44 -0500 | [diff] [blame] | 53 | scripts/test.sh |
Rob Landley | e35f2b8 | 2007-06-18 01:09:00 -0400 | [diff] [blame] | 54 | |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 55 | help:: |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 56 | @echo ' toybox - Build toybox.' |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 57 | @echo ' baseline - Create busybox_old for use by bloatcheck.' |
| 58 | @echo ' bloatcheck - Report size differences between old and current versions' |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 59 | @echo ' test - Run test suite against compiled commands.' |
| 60 | @echo ' clean - Delete temporary files.' |
Rob Landley | e614ee1 | 2011-12-28 16:17:13 -0600 | [diff] [blame] | 61 | @echo " distclean - Delete everything that isn't shipped." |
| 62 | @echo ' install_flat - Install toybox into $$PREFIX directory.' |
| 63 | @echo ' install - Install toybox into subdirectories of $$PREFIX.' |
| 64 | @echo ' uninstall_flat - Remove toybox from $$PREFIX directory.' |
| 65 | @echo ' uninstall - Remove toybox from subdirectories of $$PREFIX.' |
Rob Landley | 09e8bde | 2012-02-04 12:20:39 -0600 | [diff] [blame] | 66 | @echo '' |
| 67 | @echo 'example: CFLAGS="--static" CROSS_COMPILE=armv5l- make defconfig toybox install' |
| 68 | @echo '' |