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 | 3681622 | 2009-03-28 23:24:42 -0500 | [diff] [blame] | 15 | generated/Config.in: toys/*.c |
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 | 2896480 | 2008-01-19 17:08:39 -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 |
| 25 | @scripts/bloat-o-meter toybox_old toybox_unstripped |
| 26 | |
Rob Landley | bcfad87 | 2007-01-31 14:18:05 -0500 | [diff] [blame] | 27 | instlist: toybox |
Rob Landley | 30d79a1 | 2007-05-29 16:26:47 -0400 | [diff] [blame] | 28 | $(HOSTCC) $(CCFLAGS) -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 \ |
| 44 | generated/newtoys.h generated/globals.h instlist testdir |
Rob Landley | 401ae8f | 2006-11-01 22:26:25 -0500 | [diff] [blame] | 45 | |
| 46 | distclean: clean |
Rob Landley | 58ecc3e | 2008-01-10 14:40:13 -0600 | [diff] [blame] | 47 | rm -f toybox_old .config* generated/help.h |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 48 | |
Rob Landley | e35f2b8 | 2007-06-18 01:09:00 -0400 | [diff] [blame] | 49 | test: tests |
| 50 | |
| 51 | tests: |
Rob Landley | 9d243a2 | 2008-03-28 00:44:44 -0500 | [diff] [blame] | 52 | scripts/test.sh |
Rob Landley | e35f2b8 | 2007-06-18 01:09:00 -0400 | [diff] [blame] | 53 | |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 54 | help:: |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 55 | @echo ' toybox - Build toybox.' |
Rob Landley | cd2edfd | 2006-11-26 18:47:14 -0500 | [diff] [blame] | 56 | @echo ' baseline - Create busybox_old for use by bloatcheck.' |
| 57 | @echo ' bloatcheck - Report size differences between old and current versions' |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 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.' |
Rob Landley | 9d243a2 | 2008-03-28 00:44:44 -0500 | [diff] [blame] | 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." |