annotate Makefile @ 243:6d13d06ec0ac

Might as well make the dependencies slightly more paranoid. (The only reason to have dependencies at all is so "make install" doesn't trigger a rebuild. A rebuild is always a build all anyway.)
author Rob Landley <rob@landley.net>
date Tue, 22 Jan 2008 19:20:06 -0600
parents 362e7550a1c4
children 10d6a8148339
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
1 # Makefile for toybox.
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
2 # Copyright 2006 Rob Landley <rob@landley.net>
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
3
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
4 all: toybox
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
5
243
6d13d06ec0ac Might as well make the dependencies slightly more paranoid.
Rob Landley <rob@landley.net>
parents: 240
diff changeset
6 toybox toybox_unstripped: *.[ch] lib/*.[ch] toys/*.[ch] scripts/*
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
7 scripts/make.sh
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
8
240
362e7550a1c4 Hit makefile dependencies so install step doesn't rebuild toybox.
Rob Landley <rob@landley.net>
parents: 237
diff changeset
9 .PHONY: clean distclean baseline bloatcheck install_flat test tests help
14
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
10
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
11 include kconfig/Makefile
1
59d58fab67c6 Next snapshot. Tries to grab something out of lib in order to build, I have
landley@driftwood
parents:
diff changeset
12
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
13 $(KCONFIG_TOP): generated/Config.in
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
14 generated/Config.in:
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
15 scripts/genconfig.sh
19
414625f97667 Better dependencies, and feed the linker --gc-sections. (Which is not an
Rob Landley <rob@landley.net>
parents: 14
diff changeset
16
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
17 HOSTCC:=cc
14
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
18
41
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
19 # Development targets
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
20 baseline: toybox_unstripped
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
21 @cp toybox_unstripped toybox_old
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
22
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
23 bloatcheck: toybox_old toybox_unstripped
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
24 @scripts/bloat-o-meter toybox_old toybox_unstripped
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
25
89
4f5cdc6552da Add make install_flat.
Rob Landley <rob@landley.net>
parents: 47
diff changeset
26 instlist: toybox
119
8b5ae5f607af Make it easier to specify which compiler to use.
Rob Landley <rob@landley.net>
parents: 109
diff changeset
27 $(HOSTCC) $(CCFLAGS) -I . scripts/install.c -o instlist
89
4f5cdc6552da Add make install_flat.
Rob Landley <rob@landley.net>
parents: 47
diff changeset
28
4f5cdc6552da Add make install_flat.
Rob Landley <rob@landley.net>
parents: 47
diff changeset
29 install_flat: instlist
4f5cdc6552da Add make install_flat.
Rob Landley <rob@landley.net>
parents: 47
diff changeset
30 @mkdir -p $(PREFIX)/
4f5cdc6552da Add make install_flat.
Rob Landley <rob@landley.net>
parents: 47
diff changeset
31 @cp toybox $(PREFIX)/
4f5cdc6552da Add make install_flat.
Rob Landley <rob@landley.net>
parents: 47
diff changeset
32 @for i in `./instlist`; do ln -s toybox "$(PREFIX)/$$i"; done
4f5cdc6552da Add make install_flat.
Rob Landley <rob@landley.net>
parents: 47
diff changeset
33
14
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
34 clean::
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
35 rm -f toybox toybox_unstripped generated/config.h generated/Config.in \
237
7cb15eae1664 Zap toylist.h, moving contents of global structures into DEFINE_GLOBALS()
Rob Landley <rob@landley.net>
parents: 234
diff changeset
36 generated/newtoys.h generated/globals.h instlist
14
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
37
f8e628f61f16 Make the config generate gen_config.h with CFG_ and USE() macros.
Rob Landley <rob@landley.net>
parents: 7
diff changeset
38 distclean: clean
232
cd4d5630c978 Move some generated files into the "generated" subdirectory.
Rob Landley <rob@landley.net>
parents: 196
diff changeset
39 rm -f toybox_old .config* generated/help.h
41
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
40
133
a459c6b39645 Fix makefile to defconfig properly, and leak in a bit of the new test
Rob Landley <rob@landley.net>
parents: 123
diff changeset
41 test: tests
a459c6b39645 Fix makefile to defconfig properly, and leak in a bit of the new test
Rob Landley <rob@landley.net>
parents: 123
diff changeset
42
a459c6b39645 Fix makefile to defconfig properly, and leak in a bit of the new test
Rob Landley <rob@landley.net>
parents: 123
diff changeset
43 tests:
a459c6b39645 Fix makefile to defconfig properly, and leak in a bit of the new test
Rob Landley <rob@landley.net>
parents: 123
diff changeset
44 scripts/testall.sh
a459c6b39645 Fix makefile to defconfig properly, and leak in a bit of the new test
Rob Landley <rob@landley.net>
parents: 123
diff changeset
45
41
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
46 help::
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
47 @echo ' toybox - Build toybox.'
41
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
48 @echo ' baseline - Create busybox_old for use by bloatcheck.'
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
49 @echo ' bloatcheck - Report size differences between old and current versions'
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
50 @echo ' test - Run test suite against compiled commands.'
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
51 @echo ' clean - Delete temporary files.'
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
52 @echo ' distclean - Delete everything that isn't shipped.'
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 232
diff changeset
53 @echo ' install_flat - Install toybox into $PREFIX directory.'