blob: cd9fa41314238f8e188dde2aa78c8848b5216343 [file] [log] [blame]
Bernhard Reutner-Fischer5c071bc2005-10-05 07:40:46 +00001Building:
2=========
3
4You will usually build in the source-tree.
5
6Alternatively you can build out-of-tree to have the object files separated
7from the source. This allows for building several different configurations
8from the same set of sources.
9
10A) Building in the source-tree:
11-------------------------------
12
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000131) Run 'make config' or 'make menuconfig' and select the
Eric Andersencd8c4362001-11-10 11:22:46 +000014 functionality that you wish to enable.
Matt Kraai6e91f692001-05-10 14:12:20 +000015
Mike Frysinger0ec71bf2005-09-16 04:21:25 +0000162) Run 'make'
Matt Kraai6e91f692001-05-10 14:12:20 +000017
Bernhard Reutner-Fischer5c071bc2005-10-05 07:40:46 +0000183) Run 'make install' or 'make PREFIX=/target install' to
Eric Andersencb81e642003-07-14 21:21:08 +000019 install busybox and all the needed links. Some people
20 will prefer to install using hardlinks and will instead
21 want to run 'make install-hardlinks'....
Bernhard Reutner-Fischer5c071bc2005-10-05 07:40:46 +000022
23B) Building out-of-tree:
24------------------------
25
Bernhard Reutner-Fischerb8faa7e2005-10-07 17:44:14 +000026Note that top_srcdir, O and top_builddir have to be given as absolute paths.
27
Bernhard Reutner-Fischer5c071bc2005-10-05 07:40:46 +0000281) make the directory to hold the object files and chdir to it:
29 'mkdir /tmp/bb ; cd /tmp/bb'
30 Then prepare the config giving the full path to the source in top_srcdir:
31 make top_srcdir=/path/busybox -f /path/busybox/Makefile O=/tmp/b allyesconfig
32
33 Note that O=$(pwd) is the default if no O= was specified.
34
35 You now have a buildable tree in $O and can run 'make' without the need
36 to specify any paths.
37
38 Proceed with step #A2 above.
39
40
41Installation:
42=============
43
44After the build is complete, a busybox.links file is generated. This is
45used by 'make install' to create symlinks to the BusyBox binary for all
46compiled in functions. By default, 'make install' will place the symlink
47forest into `pwd`/_install unless you have defined the PREFIX environment
48variable (i.e., 'make PREFIX=/tmp/foo install')
49
50If you wish to install hard links, rather than symlinks, you can use
51'make PREFIX=/tmp/foo install-hardlinks' instead.
52