diff --git a/arch/arm/src/Makefile b/arch/arm/src/Makefile index c8c7de57c1..557f84250c 100644 --- a/arch/arm/src/Makefile +++ b/arch/arm/src/Makefile @@ -37,10 +37,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/arm64/src/Makefile b/arch/arm64/src/Makefile index 1df237ecd0..5ccb375012 100644 --- a/arch/arm64/src/Makefile +++ b/arch/arm64/src/Makefile @@ -23,9 +23,9 @@ include chip/Make.defs ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/avr/src/Makefile b/arch/avr/src/Makefile index a36f65831b..22d5465791 100644 --- a/arch/avr/src/Makefile +++ b/arch/avr/src/Makefile @@ -29,10 +29,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/hc/src/Makefile b/arch/hc/src/Makefile index c0a2d7235f..a96d88ca3f 100644 --- a/arch/hc/src/Makefile +++ b/arch/hc/src/Makefile @@ -30,10 +30,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/mips/src/Makefile b/arch/mips/src/Makefile index 986478509c..67437f36a7 100644 --- a/arch/mips/src/Makefile +++ b/arch/mips/src/Makefile @@ -27,10 +27,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/misoc/src/Makefile b/arch/misoc/src/Makefile index ca36e02dcf..172fa55722 100644 --- a/arch/misoc/src/Makefile +++ b/arch/misoc/src/Makefile @@ -31,10 +31,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/or1k/src/Makefile b/arch/or1k/src/Makefile index c7fb12b676..d0210d1a15 100644 --- a/arch/or1k/src/Makefile +++ b/arch/or1k/src/Makefile @@ -29,10 +29,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/renesas/src/Makefile b/arch/renesas/src/Makefile index a1c1396b92..fc8ab64081 100644 --- a/arch/renesas/src/Makefile +++ b/arch/renesas/src/Makefile @@ -23,10 +23,10 @@ include chip/Make.defs ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/risc-v/src/Makefile b/arch/risc-v/src/Makefile index 76c79feb32..fc83e3b82f 100644 --- a/arch/risc-v/src/Makefile +++ b/arch/risc-v/src/Makefile @@ -32,9 +32,9 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/risc-v/src/common/supervisor/Make.defs b/arch/risc-v/src/common/supervisor/Make.defs index 3fbca963e9..11c80358e2 100644 --- a/arch/risc-v/src/common/supervisor/Make.defs +++ b/arch/risc-v/src/common/supervisor/Make.defs @@ -24,5 +24,5 @@ CMN_ASRCS += riscv_syscall.S CMN_CSRCS += riscv_perform_syscall.c CMN_CSRCS += riscv_percpu.c riscv_sbi.c -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common$(DELIM)supervisor} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common$(DELIM)supervisor VPATH += common$(DELIM)supervisor diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index 43eb20b061..0357923b0b 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -22,9 +22,9 @@ ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR) +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) @@ -88,8 +88,8 @@ HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCFLAGS) $(HOSTINCLUDES) $(EXTRAFLAGS) -D__SIM__ -pipe \ -fvisibility=default -HOSTCFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)} -HOSTCFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} +HOSTCFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR) +HOSTCFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip ifeq ($(CONFIG_HOST_MACOS),y) HOSTCFLAGS += -Wno-deprecated-declarations endif diff --git a/arch/x86/src/Makefile b/arch/x86/src/Makefile index 4ec6d2b98d..6f0e3d4fff 100644 --- a/arch/x86/src/Makefile +++ b/arch/x86/src/Makefile @@ -27,10 +27,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/x86_64/src/Makefile b/arch/x86_64/src/Makefile index 73e0204841..7c61aa405c 100644 --- a/arch/x86_64/src/Makefile +++ b/arch/x86_64/src/Makefile @@ -27,10 +27,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/xtensa/src/Makefile b/arch/xtensa/src/Makefile index 04d891dbf1..222f23f1d7 100644 --- a/arch/xtensa/src/Makefile +++ b/arch/xtensa/src/Makefile @@ -31,10 +31,10 @@ endif ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR) +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES) diff --git a/arch/z16/src/Makefile b/arch/z16/src/Makefile index 4eeda54e30..e1fcce7738 100644 --- a/arch/z16/src/Makefile +++ b/arch/z16/src/Makefile @@ -24,9 +24,9 @@ include chip/Make.defs COMPILER = ${shell basename "$(CC)"} ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCHSRCDIR)$(DELIM)chip} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCHSRCDIR)$(DELIM)common} -INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +INCLUDES += ${INCDIR_PREFIX}$(ARCHSRCDIR)$(DELIM)chip +INCLUDES += ${INCDIR_PREFIX}$(ARCHSRCDIR)$(DELIM)common +INCLUDES += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CFLAGS += $(INCLUDES) CPPFLAGS += $(INCLUDES) diff --git a/arch/z80/src/Makefile.clang b/arch/z80/src/Makefile.clang index b05076366c..8db1427c63 100644 --- a/arch/z80/src/Makefile.clang +++ b/arch/z80/src/Makefile.clang @@ -25,9 +25,9 @@ BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board # Tools -CFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CFLAGS += -I. CPPFLAGS += -D__ASSEMBLY__ diff --git a/arch/z80/src/Makefile.sdccl b/arch/z80/src/Makefile.sdccl index c6cb4a16b3..f5db1f0c3d 100644 --- a/arch/z80/src/Makefile.sdccl +++ b/arch/z80/src/Makefile.sdccl @@ -23,10 +23,10 @@ ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src -CFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM) +CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += -D__ASSEMBLY__ diff --git a/arch/z80/src/Makefile.sdccw b/arch/z80/src/Makefile.sdccw index 23afbd42e4..fd2ec08247 100644 --- a/arch/z80/src/Makefile.sdccw +++ b/arch/z80/src/Makefile.sdccw @@ -21,9 +21,9 @@ # Tools # CFLAGS, CPPFLAGS, ASFLAGS, LDFLAGS are set in $(TOPDIR)\Make.defs -CFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)chip +CFLAGS += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched CPPFLAGS += -D__ASSEMBLY__ diff --git a/binfmt/libelf/Make.defs b/binfmt/libelf/Make.defs index 1f9cb16c69..a32f93228e 100644 --- a/binfmt/libelf/Make.defs +++ b/binfmt/libelf/Make.defs @@ -33,7 +33,7 @@ CSRCS += libelf_uninit.c libelf_unload.c libelf_verify.c ifeq ($(CONFIG_ELF_COREDUMP),y) CSRCS += libelf_coredump.c -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched endif ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y) diff --git a/boards/Board.mk b/boards/Board.mk index f04e656b63..e0cc563a3e 100644 --- a/boards/Board.mk +++ b/boards/Board.mk @@ -58,13 +58,13 @@ ifneq ($(CONFIG_ARCH_FAMILY),) ARCH_FAMILY = $(patsubst "%",%,$(CONFIG_ARCH_FAMILY)) endif -CFLAGS += ${shell $(INCDIR) "$(CC)" "$(SCHEDSRCDIR)"} -CFLAGS += ${shell $(INCDIR) "$(CC)" "$(ARCHSRCDIR)$(DELIM)chip"} +CFLAGS += ${INCDIR_PREFIX}"$(SCHEDSRCDIR)" +CFLAGS += ${INCDIR_PREFIX}"$(ARCHSRCDIR)$(DELIM)chip" ifneq ($(CONFIG_ARCH_SIM),y) - CFLAGS += ${shell $(INCDIR) "$(CC)" "$(ARCHSRCDIR)$(DELIM)common"} + CFLAGS += ${INCDIR_PREFIX}"$(ARCHSRCDIR)$(DELIM)common" endif ifneq ($(ARCH_FAMILY),) - CFLAGS += ${shell $(INCDIR) "$(CC)" "$(ARCHSRCDIR)$(DELIM)$(ARCH_FAMILY)"} + CFLAGS += ${INCDIR_PREFIX}"$(ARCHSRCDIR)$(DELIM)$(ARCH_FAMILY)" endif all: libboard$(LIBEXT) diff --git a/drivers/1wire/Make.defs b/drivers/1wire/Make.defs index 39cb289495..32961e2f6e 100644 --- a/drivers/1wire/Make.defs +++ b/drivers/1wire/Make.defs @@ -30,5 +30,5 @@ endif DEPPATH += --dep-path 1wire VPATH += :1wire -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)1wire} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)1wire endif diff --git a/drivers/analog/Make.defs b/drivers/analog/Make.defs index b54613d1f7..c649266018 100644 --- a/drivers/analog/Make.defs +++ b/drivers/analog/Make.defs @@ -114,22 +114,22 @@ endif ifeq ($(CONFIG_DAC),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} + CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)analog else ifeq ($(CONFIG_ADC),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} + CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)analog else ifeq ($(CONFIG_COMP),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} + CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)analog else ifeq ($(CONFIG_OPAMP),y) DEPPATH += --dep-path analog VPATH += :analog - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)analog} + CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)analog endif endif endif diff --git a/drivers/bch/Make.defs b/drivers/bch/Make.defs index 42993e2d69..aefb6a6efd 100644 --- a/drivers/bch/Make.defs +++ b/drivers/bch/Make.defs @@ -30,6 +30,6 @@ CSRCS += bchdev_driver.c DEPPATH += --dep-path bch VPATH += :bch -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)bch} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)bch endif diff --git a/drivers/can/Make.defs b/drivers/can/Make.defs index a98c94f492..5d4014e7f1 100644 --- a/drivers/can/Make.defs +++ b/drivers/can/Make.defs @@ -32,5 +32,5 @@ endif DEPPATH += --dep-path can VPATH += :can -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)can} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)can endif diff --git a/drivers/clk/Make.defs b/drivers/clk/Make.defs index 9b46b1c309..348e17184d 100644 --- a/drivers/clk/Make.defs +++ b/drivers/clk/Make.defs @@ -32,6 +32,6 @@ endif DEPPATH += --dep-path clk VPATH += :clk -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)clk} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)clk endif diff --git a/drivers/contactless/Make.defs b/drivers/contactless/Make.defs index c746d72caf..62b6728c65 100644 --- a/drivers/contactless/Make.defs +++ b/drivers/contactless/Make.defs @@ -34,5 +34,5 @@ endif DEPPATH += --dep-path contactless VPATH += :contactless -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)contactless} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)contactless endif diff --git a/drivers/crypto/Make.defs b/drivers/crypto/Make.defs index 958c75f334..9f5a90f77e 100644 --- a/drivers/crypto/Make.defs +++ b/drivers/crypto/Make.defs @@ -28,4 +28,4 @@ endif DEPPATH += --dep-path crypto VPATH += :crypto -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)crypto} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)crypto diff --git a/drivers/i2c/Make.defs b/drivers/i2c/Make.defs index 2a5c8248d8..d069ad80dc 100644 --- a/drivers/i2c/Make.defs +++ b/drivers/i2c/Make.defs @@ -46,6 +46,6 @@ endif DEPPATH += --dep-path i2c VPATH += :i2c -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)i2c} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)i2c endif # CONFIG_I2C diff --git a/drivers/input/Make.defs b/drivers/input/Make.defs index 5d77492155..c6e58d8b19 100644 --- a/drivers/input/Make.defs +++ b/drivers/input/Make.defs @@ -104,5 +104,5 @@ endif DEPPATH += --dep-path input VPATH += :input -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)input} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)input endif diff --git a/drivers/ioexpander/Make.defs b/drivers/ioexpander/Make.defs index e8b47c1c5e..9c5d2daa28 100644 --- a/drivers/ioexpander/Make.defs +++ b/drivers/ioexpander/Make.defs @@ -71,7 +71,7 @@ ifeq ($(CONFIG_IOEXPANDER),y) DEPPATH += --dep-path ioexpander VPATH += :ioexpander -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander else ifeq ($(CONFIG_DEV_GPIO),y) @@ -79,6 +79,6 @@ else ifeq ($(CONFIG_DEV_GPIO),y) DEPPATH += --dep-path ioexpander VPATH += :ioexpander -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander endif diff --git a/drivers/lcd/Make.defs b/drivers/lcd/Make.defs index 131996f771..182b612bdc 100644 --- a/drivers/lcd/Make.defs +++ b/drivers/lcd/Make.defs @@ -175,13 +175,13 @@ endif ifeq ($(CONFIG_LCD),y) DEPPATH += --dep-path lcd VPATH += :lcd - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} + CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)lcd else ifeq ($(CONFIG_SLCD),y) DEPPATH += --dep-path lcd VPATH += :lcd - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} + CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)lcd else ifeq ($(CONFIG_LCD_OTHER),y) DEPPATH += --dep-path lcd VPATH += :lcd - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} + CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)lcd endif diff --git a/drivers/loop/Make.defs b/drivers/loop/Make.defs index 9cc609b7b3..e6e411845e 100644 --- a/drivers/loop/Make.defs +++ b/drivers/loop/Make.defs @@ -34,6 +34,6 @@ CSRCS += losetup.c DEPPATH += --dep-path loop VPATH += :loop -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)loop} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)loop endif diff --git a/drivers/mmcsd/Make.defs b/drivers/mmcsd/Make.defs index b908d716e8..54a5c50492 100644 --- a/drivers/mmcsd/Make.defs +++ b/drivers/mmcsd/Make.defs @@ -34,6 +34,6 @@ endif DEPPATH += --dep-path mmcsd VPATH += :mmcsd -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)mmcsd} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)mmcsd endif diff --git a/drivers/modem/Make.defs b/drivers/modem/Make.defs index 5e2061f235..55de4aa908 100644 --- a/drivers/modem/Make.defs +++ b/drivers/modem/Make.defs @@ -30,6 +30,6 @@ include modem/alt1250/Make.defs DEPPATH += --dep-path modem VPATH += :modem -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)modem} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)modem endif diff --git a/drivers/modem/alt1250/Make.defs b/drivers/modem/alt1250/Make.defs index c04bdcf0cc..f1864cdf7f 100644 --- a/drivers/modem/alt1250/Make.defs +++ b/drivers/modem/alt1250/Make.defs @@ -33,6 +33,6 @@ endif DEPPATH += --dep-path modem$(DELIM)alt1250 VPATH += :modem$(DELIM)alt1250 -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)modem} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)modem endif diff --git a/drivers/motor/Make.defs b/drivers/motor/Make.defs index 40080e5aa9..f109531592 100644 --- a/drivers/motor/Make.defs +++ b/drivers/motor/Make.defs @@ -34,8 +34,8 @@ endif MOTOR_DEPPATH := --dep-path motor MOTOR_VPATH := :motor -MOTOR_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)motor} +MOTOR_CFLAGS := ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)motor DEPPATH += $(MOTOR_DEPPATH) VPATH += $(MOTOR_VPATH) -CFLAGS += $(MOTOR_CFLAGS) \ No newline at end of file +CFLAGS += $(MOTOR_CFLAGS) diff --git a/drivers/motor/foc/Make.defs b/drivers/motor/foc/Make.defs index b9b17d3945..0a78c0ef87 100644 --- a/drivers/motor/foc/Make.defs +++ b/drivers/motor/foc/Make.defs @@ -30,4 +30,4 @@ endif DEPPATH += --dep-path motor$(DELIM)foc VPATH += :motor$(DELIM)foc -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)motor$(DELIM)foc} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)motor$(DELIM)foc diff --git a/drivers/rc/Make.defs b/drivers/rc/Make.defs index cd52d0430c..1ecf647ac3 100644 --- a/drivers/rc/Make.defs +++ b/drivers/rc/Make.defs @@ -32,6 +32,6 @@ endif DEPPATH += --dep-path rc VPATH += :rc -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)rc} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)rc endif # CONFIG_REMOTE_CONTROL diff --git a/drivers/rptun/Make.defs b/drivers/rptun/Make.defs index 03446ec9ac..a3fcfdbb2f 100644 --- a/drivers/rptun/Make.defs +++ b/drivers/rptun/Make.defs @@ -30,6 +30,6 @@ endif DEPPATH += --dep-path rptun VPATH += :rptun -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)rptun} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)openamp$(DELIM)open-amp$(DELIM)lib} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)rptun +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)openamp$(DELIM)open-amp$(DELIM)lib endif diff --git a/drivers/segger/Make.defs b/drivers/segger/Make.defs index 54085a515e..722c3d3bc6 100644 --- a/drivers/segger/Make.defs +++ b/drivers/segger/Make.defs @@ -34,11 +34,11 @@ ifeq ($(CONFIG_SEGGER_RTT),y) CFLAGS += ${DEFINE_PREFIX}SEGGER_RTT_BUFFER_SECTION=CONFIG_SEGGER_RTT_BUFFER_SECTION endif - CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)config} - CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)RTT$(DELIM)RTT} + CFLAGS += ${INCDIR_PREFIX}segger$(DELIM)config + CFLAGS += ${INCDIR_PREFIX}segger$(DELIM)RTT$(DELIM)RTT ifeq ($(CONFIG_ARCH_ARMV7M),y) - AFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)config} + AFLAGS += ${INCDIR_PREFIX}segger$(DELIM)config ASRCS += segger/RTT/RTT/SEGGER_RTT_ASM_ARMv7M.S endif @@ -62,9 +62,9 @@ ifeq ($(CONFIG_SEGGER_SYSVIEW),y) CSRCS += segger/note_sysview.c CSRCS += segger/SystemView/SYSVIEW/SEGGER_SYSVIEW.c - CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} - CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)SystemView$(DELIM)SEGGER} - CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)SystemView$(DELIM)SYSVIEW} + CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched + CFLAGS += ${INCDIR_PREFIX}segger$(DELIM)SystemView$(DELIM)SEGGER + CFLAGS += ${INCDIR_PREFIX}segger$(DELIM)SystemView$(DELIM)SYSVIEW SYSVIEW_VERSION ?= 3.30 diff --git a/drivers/sensors/Make.defs b/drivers/sensors/Make.defs index 4543a3e9a3..4fb4c3ec45 100644 --- a/drivers/sensors/Make.defs +++ b/drivers/sensors/Make.defs @@ -344,6 +344,6 @@ endif DEPPATH += --dep-path sensors VPATH += :sensors -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)sensors} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)sensors endif # CONFIG_SENSORS diff --git a/drivers/spi/Make.defs b/drivers/spi/Make.defs index d75a299c51..f5600a368d 100644 --- a/drivers/spi/Make.defs +++ b/drivers/spi/Make.defs @@ -51,5 +51,5 @@ endif DEPPATH += --dep-path spi VPATH += :spi -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)spi} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)spi endif diff --git a/drivers/usbdev/Make.defs b/drivers/usbdev/Make.defs index 334c717f48..820b1be869 100644 --- a/drivers/usbdev/Make.defs +++ b/drivers/usbdev/Make.defs @@ -64,5 +64,5 @@ CSRCS += usbdev_trace.c usbdev_trprintf.c DEPPATH += --dep-path usbdev VPATH += :usbdev -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbdev} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)usbdev endif diff --git a/drivers/usbhost/Make.defs b/drivers/usbhost/Make.defs index 668278a277..1aa8cb8090 100644 --- a/drivers/usbhost/Make.defs +++ b/drivers/usbhost/Make.defs @@ -85,4 +85,4 @@ endif DEPPATH += --dep-path usbhost VPATH += :usbhost -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbhost} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)usbhost diff --git a/drivers/usbmisc/Make.defs b/drivers/usbmisc/Make.defs index 4feb8e95f5..3cafc3c280 100644 --- a/drivers/usbmisc/Make.defs +++ b/drivers/usbmisc/Make.defs @@ -34,5 +34,5 @@ endif DEPPATH += --dep-path usbmisc VPATH += :usbmisc -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbmisc} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)usbmisc endif diff --git a/drivers/usbmonitor/Make.defs b/drivers/usbmonitor/Make.defs index 5a3feb3873..17d251b223 100644 --- a/drivers/usbmonitor/Make.defs +++ b/drivers/usbmonitor/Make.defs @@ -30,6 +30,6 @@ CSRCS += usbmonitor.c DEPPATH += --dep-path usbmonitor VPATH += :usbmonitor -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)usbmonitor} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)usbmonitor endif diff --git a/drivers/video/Make.defs b/drivers/video/Make.defs index de29436788..515099495d 100644 --- a/drivers/video/Make.defs +++ b/drivers/video/Make.defs @@ -64,6 +64,6 @@ include video/vnc/Make.defs DEPPATH += --dep-path video VPATH += :video -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)video} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)video endif diff --git a/drivers/video/vnc/Make.defs b/drivers/video/vnc/Make.defs index 15951ef852..1ca46a7c5c 100644 --- a/drivers/video/vnc/Make.defs +++ b/drivers/video/vnc/Make.defs @@ -32,7 +32,7 @@ CSRCS += vnc_kbd.c endif DEPPATH += --dep-path video/vnc -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)video$(DELIM)vnc} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)video$(DELIM)vnc VPATH += :video/vnc endif diff --git a/drivers/wireless/Make.defs b/drivers/wireless/Make.defs index f04eb436e5..0cff34b2f1 100644 --- a/drivers/wireless/Make.defs +++ b/drivers/wireless/Make.defs @@ -67,5 +67,5 @@ endif DEPPATH += --dep-path wireless VPATH += :wireless -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless endif diff --git a/drivers/wireless/bluetooth/Make.defs b/drivers/wireless/bluetooth/Make.defs index f3b37b4fd2..0b7ab95ab7 100644 --- a/drivers/wireless/bluetooth/Make.defs +++ b/drivers/wireless/bluetooth/Make.defs @@ -52,6 +52,6 @@ endif DEPPATH += --dep-path wireless$(DELIM)bluetooth VPATH += :wireless$(DELIM)bluetooth -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)bluetooth} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)bluetooth endif # CONFIG_DRIVERS_BLUETOOTH diff --git a/drivers/wireless/ieee80211/bcm43xxx/Make.defs b/drivers/wireless/ieee80211/bcm43xxx/Make.defs index 0041d73e88..418e8a1a70 100644 --- a/drivers/wireless/ieee80211/bcm43xxx/Make.defs +++ b/drivers/wireless/ieee80211/bcm43xxx/Make.defs @@ -67,6 +67,6 @@ endif DEPPATH += --dep-path wireless$(DELIM)ieee80211$(DELIM)bcm43xxx VPATH += :wireless$(DELIM)ieee80211$(DELIM)bcm43xxx -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee80211$(DELIM)bcm43xxx} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee80211$(DELIM)bcm43xxx endif # CONFIG_IEEE80211_BROADCOM_FULLMAC diff --git a/drivers/wireless/ieee802154/Make.defs b/drivers/wireless/ieee802154/Make.defs index 0fa3200a0c..f7507cdc8d 100644 --- a/drivers/wireless/ieee802154/Make.defs +++ b/drivers/wireless/ieee802154/Make.defs @@ -34,6 +34,6 @@ include wireless/ieee802154/xbee/Make.defs DEPPATH += --dep-path wireless$(DELIM)ieee802154 VPATH += :wireless$(DELIM)ieee802154 -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154 endif # CONFIG_DRIVERS_IEEE802154 diff --git a/drivers/wireless/ieee802154/at86rf23x/Make.defs b/drivers/wireless/ieee802154/at86rf23x/Make.defs index 239c4128a3..c33419d87e 100644 --- a/drivers/wireless/ieee802154/at86rf23x/Make.defs +++ b/drivers/wireless/ieee802154/at86rf23x/Make.defs @@ -28,6 +28,6 @@ CSRCS += at86rf23x.c DEPPATH += --dep-path wireless$(DELIM)ieee802154$(DELIM)at86rf23x VPATH += :wireless$(DELIM)ieee802154$(DELIM)at86rf23x -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)at86rf23x} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)at86rf23x endif # CONFIG_IEEE802154_AT86RF233 diff --git a/drivers/wireless/ieee802154/mrf24j40/Make.defs b/drivers/wireless/ieee802154/mrf24j40/Make.defs index dc6d6f178b..4ead845a9b 100644 --- a/drivers/wireless/ieee802154/mrf24j40/Make.defs +++ b/drivers/wireless/ieee802154/mrf24j40/Make.defs @@ -29,6 +29,6 @@ CSRCS += mrf24j40_regops.c mrf24j40.c DEPPATH += --dep-path wireless$(DELIM)ieee802154$(DELIM)mrf24j40 VPATH += :wireless$(DELIM)ieee802154$(DELIM)mrf24j40 -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)mrf24j40} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)mrf24j40 endif # CONFIG_IEEE802154_MRF24J40 diff --git a/drivers/wireless/ieee802154/xbee/Make.defs b/drivers/wireless/ieee802154/xbee/Make.defs index 5ac1fc52ce..3b06007428 100644 --- a/drivers/wireless/ieee802154/xbee/Make.defs +++ b/drivers/wireless/ieee802154/xbee/Make.defs @@ -28,6 +28,6 @@ CSRCS += xbee_ioctl.c xbee_mac.c xbee_netdev.c xbee.c DEPPATH += --dep-path wireless$(DELIM)ieee802154$(DELIM)xbee VPATH += :wireless$(DELIM)ieee802154$(DELIM)xbee -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)xbee} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)ieee802154$(DELIM)xbee endif # CONFIG_IEEE802154_XBEE diff --git a/drivers/wireless/lpwan/sx127x/Make.defs b/drivers/wireless/lpwan/sx127x/Make.defs index 92f50ed6f3..3d85ef7a17 100644 --- a/drivers/wireless/lpwan/sx127x/Make.defs +++ b/drivers/wireless/lpwan/sx127x/Make.defs @@ -28,6 +28,6 @@ CSRCS += sx127x.c DEPPATH += --dep-path wireless$(DELIM)lpwan$(DELIM)sx127x VPATH += :wireless$(DELIM)lpwan$(DELIM)sx127x -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)lpwan$(DELIM)sx127x} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)lpwan$(DELIM)sx127x endif # CONFIG_LPWAN_SX127X diff --git a/drivers/wireless/spirit/drivers/Make.defs b/drivers/wireless/spirit/drivers/Make.defs index 66e407c6ad..0f2207731b 100644 --- a/drivers/wireless/spirit/drivers/Make.defs +++ b/drivers/wireless/spirit/drivers/Make.defs @@ -28,7 +28,7 @@ CSRCS += spirit_netdev.c DEPPATH += --dep-path wireless$(DELIM)spirit$(DELIM)drivers VPATH += :wireless$(DELIM)spirit$(DELIM)drivers -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)spirit$(DELIM)drivers} +CFLAGS += ${INCDIR_PREFIX}\ + $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)spirit$(DELIM)drivers endif # CONFIG_SPIRIT_NETDEV diff --git a/drivers/wireless/spirit/include/Make.defs b/drivers/wireless/spirit/include/Make.defs index 07d0f468fa..2c2b8b4fc6 100644 --- a/drivers/wireless/spirit/include/Make.defs +++ b/drivers/wireless/spirit/include/Make.defs @@ -20,5 +20,5 @@ # Add path to include Spirit header files in CFLAGS -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)spirit$(DELIM)include} +CFLAGS += ${INCDIR_PREFIX}\ + $(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)spirit$(DELIM)include diff --git a/fs/Makefile b/fs/Makefile index e3a1bd3794..ed682f45fe 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -59,8 +59,8 @@ include rpmsgfs/Make.defs endif -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)fs} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)fs +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/fs/spiffs/Make.defs b/fs/spiffs/Make.defs index 0088c57946..77a22238f7 100644 --- a/fs/spiffs/Make.defs +++ b/fs/spiffs/Make.defs @@ -28,6 +28,6 @@ CSRCS += spiffs_cache.c spiffs_check.c spiffs_mtd.c DEPPATH += --dep-path spiffs/src VPATH += :spiffs/src -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)fs$(DELIM)spiffs$(DELIM)src} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)fs$(DELIM)spiffs$(DELIM)src endif diff --git a/graphics/Makefile b/graphics/Makefile index b92b270783..9adc8f2237 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -25,7 +25,7 @@ include nxbe/Make.defs include nxmu/Make.defs include nxterm/Make.defs -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)graphics} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)graphics AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/graphics/nxbe/Make.defs b/graphics/nxbe/Make.defs index 94a8360474..de4d4849e3 100644 --- a/graphics/nxbe/Make.defs +++ b/graphics/nxbe/Make.defs @@ -40,5 +40,5 @@ CSRCS += nxbe_notify_rectangle.c endif DEPPATH += --dep-path nxbe -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/nxbe} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)/graphics/nxbe VPATH += :nxbe diff --git a/graphics/nxglib/Make.defs b/graphics/nxglib/Make.defs index c942064013..4295e1bbd8 100644 --- a/graphics/nxglib/Make.defs +++ b/graphics/nxglib/Make.defs @@ -96,6 +96,6 @@ CSRCS += nxglib_cursor_backup_24bpp.c nxglib_cursor_backup_32bpp.c endif DEPPATH += --dep-path nxglib -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/nxglib} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)/graphics/nxglib #VPATH += :nxglib VPATH = nxglib diff --git a/graphics/nxglib/Makefile.cursor b/graphics/nxglib/Makefile.cursor index a1b81e4564..572dc5e79e 100644 --- a/graphics/nxglib/Makefile.cursor +++ b/graphics/nxglib/Makefile.cursor @@ -20,7 +20,7 @@ include $(TOPDIR)/Make.defs -CPPFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)graphics$(DELIM)nxglib} +CPPFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)graphics$(DELIM)nxglib ifeq ($(NXGLIB_BITSPERPIXEL),8) NXGLIB_SUFFIX := _8bpp diff --git a/graphics/nxglib/Makefile.devblit b/graphics/nxglib/Makefile.devblit index 69416c7510..d1461d523e 100644 --- a/graphics/nxglib/Makefile.devblit +++ b/graphics/nxglib/Makefile.devblit @@ -20,7 +20,7 @@ include $(TOPDIR)/Make.defs -CPPFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)graphics$(DELIM)nxglib} +CPPFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)graphics$(DELIM)nxglib ifeq ($(NXGLIB_BITSPERPIXEL),1) NXGLIB_SUFFIX := _1bpp diff --git a/graphics/nxglib/Makefile.pwfb b/graphics/nxglib/Makefile.pwfb index 63a62eff42..7872021bfc 100644 --- a/graphics/nxglib/Makefile.pwfb +++ b/graphics/nxglib/Makefile.pwfb @@ -20,7 +20,7 @@ include $(TOPDIR)/Make.defs -CPPFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)graphics$(DELIM)nxglib} +CPPFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)graphics$(DELIM)nxglib ifeq ($(NXGLIB_BITSPERPIXEL),1) NXGLIB_SUFFIX := _1bpp diff --git a/graphics/nxmu/Make.defs b/graphics/nxmu/Make.defs index 6e23b9d699..f111041224 100644 --- a/graphics/nxmu/Make.defs +++ b/graphics/nxmu/Make.defs @@ -24,5 +24,5 @@ CSRCS += nxmu_sendclient.c nxmu_sendclientwindow.c nxmu_server.c CSRCS += nxmu_start.c DEPPATH += --dep-path nxmu -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/nxmu} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)/graphics/nxmu VPATH += :nxmu diff --git a/graphics/nxterm/Make.defs b/graphics/nxterm/Make.defs index 1842dbff19..1bdec82439 100644 --- a/graphics/nxterm/Make.defs +++ b/graphics/nxterm/Make.defs @@ -33,7 +33,7 @@ CSRCS += nxterm_kbdin.c endif DEPPATH += --dep-path nxterm -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)/graphics/nxterm} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)/graphics/nxterm VPATH += :nxterm endif diff --git a/libs/libc/Makefile b/libs/libc/Makefile index e69d32323d..466d71a06d 100644 --- a/libs/libc/Makefile +++ b/libs/libc/Makefile @@ -67,7 +67,7 @@ include wchar/Make.defs include wctype/Make.defs include wqueue/Make.defs -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)libs$(DELIM)libc} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc # Rule for the symbol table generation diff --git a/libs/libc/audio/libsrc/Make.defs b/libs/libc/audio/libsrc/Make.defs index 78d956bc76..13048d209d 100644 --- a/libs/libc/audio/libsrc/Make.defs +++ b/libs/libc/audio/libsrc/Make.defs @@ -38,7 +38,7 @@ CSRCS += src_zoh.c CFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio ifeq ($(CONFIG_SINC_FAST_CONVERTER),y) CFLAGS += -DENABLE_SINC_FAST_CONVERTER diff --git a/libs/libnx/Makefile b/libs/libnx/Makefile index 81a36263e0..dd5bb2005e 100644 --- a/libs/libnx/Makefile +++ b/libs/libnx/Makefile @@ -28,7 +28,7 @@ include nxtk/Make.defs BINDIR ?= bin -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)libs$(DELIM)libnx} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libnx AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)%$(OBJEXT), $(ASRCS)) COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS)) diff --git a/mm/Makefile b/mm/Makefile index 928bab1fdf..f58f7efc0d 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -35,7 +35,7 @@ include ubsan/Make.defs BINDIR ?= bin -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)mm} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)mm AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)%$(OBJEXT), $(ASRCS)) COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS)) diff --git a/mm/iob/Make.defs b/mm/iob/Make.defs index fab7171de0..f80edfc8a4 100644 --- a/mm/iob/Make.defs +++ b/mm/iob/Make.defs @@ -46,6 +46,6 @@ endif DEPPATH += --dep-path iob VPATH += :iob -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)mm$(DELIM)iob} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)mm$(DELIM)iob endif # CONFIG_MM_IOB diff --git a/net/Makefile b/net/Makefile index 3e627e432d..b9b596a80a 100644 --- a/net/Makefile +++ b/net/Makefile @@ -53,7 +53,7 @@ include usrsock/Make.defs include utils/Make.defs endif -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)net} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)net ASRCS = $(SOCK_ASRCS) $(NETDEV_ASRCS) $(NET_ASRCS) AOBJS = $(ASRCS:.S=$(OBJEXT)) diff --git a/sched/Makefile b/sched/Makefile index f79387de7f..efe74efc5b 100644 --- a/sched/Makefile +++ b/sched/Makefile @@ -38,7 +38,7 @@ include tls/Make.defs include wdog/Make.defs include wqueue/Make.defs -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/tools/Config.mk b/tools/Config.mk index 73a0601889..9e4f8da962 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -333,7 +333,7 @@ endef define COMPILEZIG @echo "ZIG: $1" - $(Q) $(ZIG) build-obj $(ZIGFLAGS) $($(strip $1)_ZIGFLAGS) --name $(basename $2) $1 + $(Q) $(ZIG) build-obj $(ZIGFLAGS) $($(strip $1)_ZIGFLAGS) --name $(basename $2) $1 endef # ASSEMBLE - Default macro to assemble one assembly language file @@ -578,6 +578,8 @@ $(1)_$(2): endef export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"}) +export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X"}) +export INCSYSDIR_PREFIX := $(subst "X",,${shell $(INCDIR) -s "$(CC)" "X"}) # ARCHxxx means the predefined setting(either toolchain, arch, or system specific) ARCHDEFINES += ${DEFINE_PREFIX}__NuttX__ @@ -587,19 +589,19 @@ endif # The default C/C++ search path -ARCHINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include} +ARCHINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include ifeq ($(CONFIG_LIBCXX),y) - ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)libcxx} + ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)libcxx else ifeq ($(CONFIG_UCLIBCXX),y) - ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)uClibc++} + ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)uClibc++ else - ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)cxx} + ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)cxx ifeq ($(CONFIG_ETL),y) - ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)etl} + ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)etl endif endif -ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include} +ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include # Convert filepaths to their proper system format (i.e. Windows/Unix) diff --git a/wireless/bluetooth/Make.defs b/wireless/bluetooth/Make.defs index 93de199917..e16fb7b08d 100644 --- a/wireless/bluetooth/Make.defs +++ b/wireless/bluetooth/Make.defs @@ -36,6 +36,6 @@ endif DEPPATH += --dep-path bluetooth VPATH += :bluetooth -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)bluetooth} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)wireless$(DELIM)bluetooth endif # CONFIG_WIRELESS_BLUETOOTH diff --git a/wireless/ieee802154/Make.defs b/wireless/ieee802154/Make.defs index bfe0941605..0ef702d90f 100644 --- a/wireless/ieee802154/Make.defs +++ b/wireless/ieee802154/Make.defs @@ -51,6 +51,6 @@ endif DEPPATH += --dep-path ieee802154 VPATH += :ieee802154 -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)ieee802154} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)wireless$(DELIM)ieee802154 endif # CONFIG_WIRELESS_IEEE802154 diff --git a/wireless/pktradio/Make.defs b/wireless/pktradio/Make.defs index cc4f14e231..8dd86f4943 100644 --- a/wireless/pktradio/Make.defs +++ b/wireless/pktradio/Make.defs @@ -30,6 +30,6 @@ endif DEPPATH += --dep-path pktradio VPATH += :pktradio -CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)wireless$(DELIM)pktradio} +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)wireless$(DELIM)pktradio endif # CONFIG_WIRELESS_PKTRADIO