diff --git a/Makefile b/Makefile index d8af44baf6e..6dc856c31a2 100644 --- a/Makefile +++ b/Makefile @@ -345,6 +345,8 @@ export PLATFORM_NAME SOC_NAME BOARD_NAME ARCH KERNEL_NAME KERNEL_ELF_NAME # Needed to be compatible with the O= option ZEPHYRINCLUDE = \ -I$(srctree)/arch/$(ARCH)/include \ + -I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) \ + -I$(srctree)/boards/$(BOARD_NAME) \ $(if $(KBUILD_SRC), -I$(srctree)/include) \ -I$(srctree)/include \ -I$(CURDIR)/include/generated \ diff --git a/arch/arc/Kbuild b/arch/arc/Kbuild index 08993d0955e..7d7c0ec1fed 100644 --- a/arch/arc/Kbuild +++ b/arch/arc/Kbuild @@ -1,4 +1,3 @@ -subdir-ccflags-y +=-I$(srctree)/arch/arc/platforms/$(PLATFORM_NAME) subdir-ccflags-y +=-I$(srctree)/include/drivers subdir-ccflags-y +=-I$(srctree)/drivers subdir-asflags-y += $(subdir-ccflags-y) diff --git a/arch/arc/platforms/quark_se_ss/Makefile b/arch/arc/platforms/quark_se_ss/Makefile index 37d08295846..c68d6e5e7b3 100644 --- a/arch/arc/platforms/quark_se_ss/Makefile +++ b/arch/arc/platforms/quark_se_ss/Makefile @@ -1,9 +1,7 @@ -ccflags-y +=-I$(srctree)/arch/arc/platforms/$(PLATFORM_NAME) ccflags-y +=-I$(srctree)/arch/x86/platforms/ ccflags-y +=-I$(srctree)/include ccflags-y +=-I$(srctree)/include/drivers ccflags-y +=-I$(srctree)/drivers -asflags-y +=-I$(srctree)/arch/arc/platforms/$(PLATFORM_NAME) ccflags-$(CONFIG_ADC) +=-I$(srctree)/drivers/adc asflags-y := ${ccflags-y} diff --git a/arch/arm/Kbuild b/arch/arm/Kbuild index 0db5c455db9..1e7a4f93c5f 100644 --- a/arch/arm/Kbuild +++ b/arch/arm/Kbuild @@ -1,6 +1,5 @@ subdir-ccflags-y +=-I$(srctree)/include/drivers subdir-ccflags-y +=-I$(srctree)/drivers -subdir-ccflags-y +=-I$(srctree)/arch/arm/platforms/$(PLATFORM_NAME) subdir-asflags-y := ${subdir-ccflags-y} obj-y += core/ diff --git a/arch/x86/platforms/quark_se/Makefile b/arch/x86/platforms/quark_se/Makefile index 9d44c07e089..ef09d983b94 100644 --- a/arch/x86/platforms/quark_se/Makefile +++ b/arch/x86/platforms/quark_se/Makefile @@ -1,5 +1,4 @@ ccflags-y +=-I$(srctree)/arch/x86 -ccflags-y +=-I$(srctree)/arch/x86/platforms/$(PLATFORM_NAME)/ ccflags-y +=-I$(srctree)/include/drivers ccflags-y +=-I$(srctree)/drivers asflags-y := ${ccflags-y} diff --git a/drivers/Makefile b/drivers/Makefile index baf0dbeea54..639f10f4b19 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -1,6 +1,4 @@ subdir-ccflags-y += -I$(srctree)/include/drivers -subdir-ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) -subdir-asflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) obj-y = console/ obj-y += random/ diff --git a/samples/microkernel/apps/nfc_hello/src/Makefile b/samples/microkernel/apps/nfc_hello/src/Makefile index 1ed046534d7..00066e15678 100644 --- a/samples/microkernel/apps/nfc_hello/src/Makefile +++ b/samples/microkernel/apps/nfc_hello/src/Makefile @@ -1,3 +1 @@ -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) - obj-y = main.o diff --git a/samples/nanokernel/apps/watchdog/src/Makefile b/samples/nanokernel/apps/watchdog/src/Makefile index e858937324c..00066e15678 100644 --- a/samples/nanokernel/apps/watchdog/src/Makefile +++ b/samples/nanokernel/apps/watchdog/src/Makefile @@ -1,3 +1 @@ -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) -asflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) obj-y = main.o diff --git a/samples/nanokernel/test/test_atomic/src/Makefile b/samples/nanokernel/test/test_atomic/src/Makefile index 2d10d4403d5..bf74fc80f6b 100644 --- a/samples/nanokernel/test/test_atomic/src/Makefile +++ b/samples/nanokernel/test/test_atomic/src/Makefile @@ -1,4 +1,3 @@ ccflags-y += -I${srctree}/samples/include -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) obj-y = atomic.o diff --git a/samples/nanokernel/test/test_context/src/Makefile b/samples/nanokernel/test/test_context/src/Makefile index 82a9d08a3c0..187cecef301 100644 --- a/samples/nanokernel/test/test_context/src/Makefile +++ b/samples/nanokernel/test/test_context/src/Makefile @@ -1,5 +1,4 @@ ccflags-y += -I${srctree}/samples/include -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) ccflags-$(CONFIG_PLATFORM_QUARK_D2000) += -DFIBER_STACKSIZE=256 obj-y = context.o