summaryrefslogtreecommitdiffstats
path: root/project
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-08-31 20:23:47 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-08-31 20:23:47 +0000
commit0732b8cc840efb5927bc143f5091a1da4c6e0dce (patch)
tree40daf37226fe4fc897dffad1f5c56569e6613649 /project
parentd5007ac67b7df21bc3d6b5ebd2453a420354425b (diff)
downloadbuildroot-novena-0732b8cc840efb5927bc143f5091a1da4c6e0dce.tar.gz
buildroot-novena-0732b8cc840efb5927bc143f5091a1da4c6e0dce.zip
buildroot: support out-of-tree builds
Add support and documentation for out-of-tree builds with syntax like the Linux kernel (make O=<dir>).
Diffstat (limited to 'project')
-rw-r--r--project/Makefile.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/project/Makefile.in b/project/Makefile.in
index c4188505b..034b1fa6c 100644
--- a/project/Makefile.in
+++ b/project/Makefile.in
@@ -25,7 +25,14 @@ TAR_OPTIONS=$(subst ",, $(BR2_TAR_OPTIONS)) -xf
#")
+# Buildroot supports building out of tree similarly to the Linux kernel.
+# To use, add O= to the make command line (make O=/tmp/build)
BASE_DIR:=$(shell pwd)
+ifdef O
+ifeq ("$(origin O)", "command line")
+BASE_DIR := $(O)
+endif
+endif
TOPDIR_PREFIX:=$(strip $(subst ",, $(BR2_TOPDIR_PREFIX)))_
#"))