Skip to content
Snippets Groups Projects
Commit f5c66bdb authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

kbuild: use $(KBUILD_SRC) to check out-of-tree build


Non-empty $(KBUILD_SRC) means out-of-tree build.

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
parent 4ab3fc5e
No related branches found
No related tags found
No related merge requests found
...@@ -556,11 +556,9 @@ export CONFIG_SYS_TEXT_BASE ...@@ -556,11 +556,9 @@ export CONFIG_SYS_TEXT_BASE
# Use UBOOTINCLUDE when you must reference the include/ directory. # Use UBOOTINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option # Needed to be compatible with the O= option
UBOOTINCLUDE := UBOOTINCLUDE := \
ifneq ($(OBJTREE),$(SRCTREE)) -Iinclude \
UBOOTINCLUDE += -I$(OBJTREE)/include $(if $(KBUILD_SRC), -I$(srctree)/include) \
endif
UBOOTINCLUDE += -I$(srctree)/include \
-I$(srctree)/arch/$(ARCH)/include -I$(srctree)/arch/$(ARCH)/include
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
......
...@@ -103,7 +103,7 @@ fi ...@@ -103,7 +103,7 @@ fi
# #
# Create link to architecture specific headers # Create link to architecture specific headers
# #
if [ "$SRCTREE" != "$OBJTREE" ] ; then if [ -n "$KBUILD_SRC" ] ; then
mkdir -p ${OBJTREE}/include mkdir -p ${OBJTREE}/include
LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/ LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/
cd ${OBJTREE}/include cd ${OBJTREE}/include
...@@ -125,7 +125,7 @@ if [ "${arch}" = "arm" ] ; then ...@@ -125,7 +125,7 @@ if [ "${arch}" = "arm" ] ; then
ln -s ${LNPREFIX}proc-armv asm/proc ln -s ${LNPREFIX}proc-armv asm/proc
fi fi
if [ "$SRCTREE" = "$OBJTREE" ] ; then if [ -z "$KBUILD_SRC" ] ; then
cd ${SRCTREE}/include cd ${SRCTREE}/include
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment