summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2012-11-30 06:53:53 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-12-03 09:38:26 +0100
commita620f2b259ca966e27b95d312f930e48635fdcea (patch)
tree14184bb5c54e7f656f4812c506b46047427bee93 /arch
parent159109f5ff2e3b0ee7c44685e2241605ae41b662 (diff)
downloadbarebox-a620f2b259ca966e27b95d312f930e48635fdcea.tar.gz
barebox-a620f2b259ca966e27b95d312f930e48635fdcea.tar.xz
MIPS: fix out-of-tree build
The commit commit d25d94bea67308e29db895d418f3f1f8153ae2ea Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Fri Jun 1 13:23:20 2012 +0400 MIPS: make possible board-specific header files This patch makes possible to put a board-specific header file (e. g. foobar.h) to arch/mips/boards/*/include/board/. breaks the out-of-tree build for the boards that use it (rzx50). Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 5e40de760f..f32089d827 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -88,14 +88,18 @@ else
BOARD :=
endif
+ifeq ($(KBUILD_SRC),)
+CPPFLAGS += -I$(BOARD)/include
+else
+CPPFLAGS += -I$(srctree)/$(BOARD)/include
+endif
+
ifneq ($(machine-y),)
MACH := arch/mips/mach-$(machine-y)/
else
MACH :=
endif
-CPPFLAGS += -I$(BOARD)/include
-
common-y += $(BOARD) $(MACH)
common-y += arch/mips/lib/
common-y += arch/mips/boot/