OSDN Git Service

Add autodetect for container support.
[android-x86/external-toybox.git] / Makefile
1 # Makefile for toybox.
2 # Copyright 2006 Rob Landley <rob@landley.net>
3
4 all: toybox
5
6 toybox toybox_unstripped: .config *.[ch] lib/*.[ch] toys/*.[ch] scripts/*.sh
7         scripts/make.sh
8
9 .PHONY: clean distclean baseline bloatcheck install install_flat \
10         uinstall uninstall_flat test tests help scripts/test
11
12 include kconfig/Makefile
13
14 $(KCONFIG_TOP): generated/Config.in
15 generated/Config.in: toys/*.c scripts/genconfig.sh
16         scripts/genconfig.sh
17
18 HOSTCC:=cc
19
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
27 instlist: toybox
28         $(HOSTCC) $(CCFLAGS) -I . scripts/install.c -o instlist
29
30 install_flat: instlist
31         scripts/install.sh --symlink --force
32
33 install:
34         scripts/install.sh --long --symlink --force
35
36 uninstall_flat: instlist
37         scripts/install.sh --uninstall
38
39 uninstall:
40         scripts/install.sh --long --uninstall
41
42 clean::
43         rm -rf toybox toybox_unstripped generated/config.h generated/Config.in \
44                 generated/newtoys.h generated/globals.h instlist testdir
45
46 distclean: clean
47         rm -f toybox_old .config* generated/help.h
48
49 test: tests
50
51 tests:
52         scripts/test.sh
53
54 help::
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.'