Commit 9e41403
kbuild: change out-of-tree build
This commit changes the working directory
where the build process occurs.
Before this commit, build process occurred under the source
tree for both in-tree and out-of-tree build.
That's why we needed to add $(obj) prefix to all generated
files in makefiles like follows:
$(obj)u-boot.bin: $(obj)u-boot
Here, $(obj) is empty for in-tree build, whereas it points
to the output directory for out-of-tree build.
And our old build system changes the current working directory
with "make -C <sub-dir>" syntax when descending into the
sub-directories.
On the other hand, Kbuild uses a different idea
to handle out-of-tree build and directory descending.
The build process of Kbuild always occurs under the output tree.
When "O=dir/to/store/output/files" is given, the build system
changes the current working directory to that directory and
restarts the make.
Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>"
syntax for descending into sub-directories.
(We can write it like "make $(obj)=<sub-dir>" with a shorthand.)
This means the current working directory is always the top
of the output directory.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>1 parent d958002 commit 9e41403
File tree
64 files changed
+612
-744
lines changed- arch
- arm/cpu
- arm1136
- arm926ejs
- davinci
- armv7
- am33xx
- omap3
- omap4
- omap5
- socfpga
- blackfin
- cpu
- mips/cpu
- mips32
- mips64
- xburst
- nds32
- powerpc/lib
- sandbox/cpu
- sparc
- x86/lib
- board
- ait/cam_enc_4xx
- avionic-design
- medcom-wide
- plutux
- tec-ng
- tec
- compal/paz00
- compulab/trimslice
- cray/L1
- h2200
- matrix_vision
- mvblm7
- mvsmr
- nvidia/common
- pcs440ep
- samsung/origen
- common
- doc/DocBook
- drivers/bios_emulator
- dts
- examples
- api
- standalone
- fs/ubifs
- lib
- nand_spl/board
- amcc
- acadia
- bamboo
- canyonlands
- kilauea
- sequoia
- freescale
- mpc8315erdb
- mpc8536ds
- mpc8569mds
- mpc8572ds
- p1023rds
- p1_p2_rdb
- sheldon/simpc8313
- post/lib_powerpc/fpu
- scripts
- spl
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
64 files changed
+612
-744
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
677 | | - | |
678 | | - | |
679 | 677 | | |
680 | 678 | | |
681 | 679 | | |
| |||
686 | 684 | | |
687 | 685 | | |
688 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
689 | 691 | | |
690 | 692 | | |
691 | 693 | | |
| |||
0 commit comments