From f5c66bdb1843dd84a899da6bc34a46563e5847f0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 11 Mar 2014 11:05:18 +0900 Subject: kbuild: use $(KBUILD_SRC) to check out-of-tree build Non-empty $(KBUILD_SRC) means out-of-tree build. Signed-off-by: Masahiro Yamada --- Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8a1fe9b..1b1cfb8 100644 --- a/Makefile +++ b/Makefile @@ -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) -- cgit v1.1