提交 f5c66bdb 编写于 作者: M Masahiro Yamada 提交者: Tom Rini

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

Non-empty $(KBUILD_SRC) means out-of-tree build.
Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
上级 4ab3fc5e
......@@ -556,11 +556,9 @@ export CONFIG_SYS_TEXT_BASE
# Use UBOOTINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
UBOOTINCLUDE :=
ifneq ($(OBJTREE),$(SRCTREE))
UBOOTINCLUDE += -I$(OBJTREE)/include
endif
UBOOTINCLUDE += -I$(srctree)/include \
UBOOTINCLUDE := \
-Iinclude \
$(if $(KBUILD_SRC), -I$(srctree)/include) \
-I$(srctree)/arch/$(ARCH)/include
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
......
......@@ -103,7 +103,7 @@ fi
#
# Create link to architecture specific headers
#
if [ "$SRCTREE" != "$OBJTREE" ] ; then
if [ -n "$KBUILD_SRC" ] ; then
mkdir -p ${OBJTREE}/include
LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/
cd ${OBJTREE}/include
......@@ -125,7 +125,7 @@ if [ "${arch}" = "arm" ] ; then
ln -s ${LNPREFIX}proc-armv asm/proc
fi
if [ "$SRCTREE" = "$OBJTREE" ] ; then
if [ -z "$KBUILD_SRC" ] ; then
cd ${SRCTREE}/include
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册