diff --git a/Make.defs b/Make.defs index 83094e891..3bef69a57 100644 --- a/Make.defs +++ b/Make.defs @@ -96,7 +96,7 @@ endef # Standard include path -CFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)$(DELIM)include"} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)$(DELIM)include"} +CFLAGS += ${INCDIR_PREFIX}"$(APPDIR)$(DELIM)include" +CXXFLAGS += ${INCDIR_PREFIX}"$(APPDIR)$(DELIM)include" NUTTXLIB ?= $(call CONVERT_PATH,$(TOPDIR)$(DELIM)staging) diff --git a/boot/mcuboot/Make.defs b/boot/mcuboot/Make.defs index 8b4ae5ff1..f56743811 100644 --- a/boot/mcuboot/Make.defs +++ b/boot/mcuboot/Make.defs @@ -23,12 +23,12 @@ CONFIGURED_APPS += $(APPDIR)/boot/mcuboot # It allows import of NuttX implementation headers for MCUboot interfaces. -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/boot/nuttx/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/boot/nuttx/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/boot/mcuboot/mcuboot/boot/nuttx/include +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/boot/mcuboot/mcuboot/boot/nuttx/include # It allows import of MCUboot's bootutil library headers. -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/boot/bootutil/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/boot/bootutil/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/boot/mcuboot/mcuboot/boot/bootutil/include +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/boot/mcuboot/mcuboot/boot/bootutil/include endif diff --git a/boot/mcuboot/Makefile b/boot/mcuboot/Makefile index f60b0fc81..4b2862417 100644 --- a/boot/mcuboot/Makefile +++ b/boot/mcuboot/Makefile @@ -72,8 +72,8 @@ CSRCS += $(MCUBOOT_UNPACK)/ext/tinycrypt/lib/source/aes_encrypt.c \ $(MCUBOOT_UNPACK)/ext/tinycrypt/lib/source/sha256.c \ $(MCUBOOT_UNPACK)/ext/tinycrypt/lib/source/utils.c -CFLAGS += ${shell $(INCDIR) "$(CC)" mcuboot/ext/tinycrypt/lib/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" mcuboot/ext/tinycrypt/lib/include} +CFLAGS += ${INCDIR_PREFIX}mcuboot/ext/tinycrypt/lib/include +CXXFLAGS += ${INCDIR_PREFIX}mcuboot/ext/tinycrypt/lib/include endif $(MCUBOOT_TARBALL): diff --git a/canutils/candump/Makefile b/canutils/candump/Makefile index 869cbced4..080ca6436 100644 --- a/canutils/candump/Makefile +++ b/canutils/candump/Makefile @@ -28,7 +28,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = $(CONFIG_CANUTILS_CANDUMP_STACKSIZE) MODULE = $(CONFIG_CANUTILS_CANDUMP) -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/canutils/libcanutils} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/canutils/libcanutils MAINSRC = candump.c include $(APPDIR)/Application.mk diff --git a/canutils/cansend/Makefile b/canutils/cansend/Makefile index 0f106276d..52d17f3f8 100644 --- a/canutils/cansend/Makefile +++ b/canutils/cansend/Makefile @@ -28,7 +28,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = $(CONFIG_CANUTILS_CANSEND_STACKSIZE) MODULE = $(CONFIG_CANUTILS_CANSEND) -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/canutils/libcanutils} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/canutils/libcanutils MAINSRC = cansend.c include $(APPDIR)/Application.mk diff --git a/canutils/lely-canopen/Make.defs b/canutils/lely-canopen/Make.defs index 05dcb5161..a762a23a7 100644 --- a/canutils/lely-canopen/Make.defs +++ b/canutils/lely-canopen/Make.defs @@ -23,6 +23,6 @@ CONFIGURED_APPS += $(APPDIR)/canutils/lely-canopen # It allows `` import. -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/canutils/lely-canopen/lely-core/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/canutils/lely-canopen/lely-core/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/canutils/lely-canopen/lely-core/include +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/canutils/lely-canopen/lely-core/include endif diff --git a/canutils/lely-canopen/Makefile b/canutils/lely-canopen/Makefile index 4c6c0c555..8bb3f04e4 100644 --- a/canutils/lely-canopen/Makefile +++ b/canutils/lely-canopen/Makefile @@ -151,7 +151,7 @@ endif # enable config.h -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/include/canutils/lely} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/include/canutils/lely CFLAGS += -DHAVE_CONFIG_H=1 CFLAGS += -Wno-shadow -Wno-undef diff --git a/canutils/libcanardv0/Makefile b/canutils/libcanardv0/Makefile index a337fd3a7..e708e1208 100644 --- a/canutils/libcanardv0/Makefile +++ b/canutils/libcanardv0/Makefile @@ -33,7 +33,7 @@ LIBCANARDV0_DRVDIR = $(LIBCANARDV0_SRCDIR)$(DELIM)drivers$(DELIM)nuttx APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)canutils CFLAGS += -std=c99 -DCANARD_ASSERT=DEBUGASSERT -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPS_INCDIR)} +CFLAGS += ${INCDIR_PREFIX}$(APPS_INCDIR) CSRCS = $(LIBCANARDV0_SRCDIR)$(DELIM)canard.c $(LIBCANARDV0_DRVDIR)$(DELIM)canard_nuttx.c diff --git a/canutils/libcanardv1/Makefile b/canutils/libcanardv1/Makefile index 947d8426a..e32109840 100644 --- a/canutils/libcanardv1/Makefile +++ b/canutils/libcanardv1/Makefile @@ -40,7 +40,7 @@ O1HEAP_DRVDIR = $(O1HEAP_SRCDIR)$(DELIM)o1heap APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)canutils CFLAGS += -std=c11 -DCANARD_ASSERT=DEBUGASSERT -DCANARD_DSDL_CONFIG_LITTLE_ENDIAN=1 -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPS_INCDIR)} +CFLAGS += ${INCDIR_PREFIX}$(APPS_INCDIR) CSRCS = $(LIBCANARDV1_DRVDIR)$(DELIM)canard.c $(LIBCANARDV1_DRVDIR)$(DELIM)canard_dsdl.c CSRCS += $(O1HEAP_DRVDIR)$(DELIM)o1heap.c diff --git a/crypto/libtomcrypt/Make.defs b/crypto/libtomcrypt/Make.defs index 258c9d744..a31d953f1 100644 --- a/crypto/libtomcrypt/Make.defs +++ b/crypto/libtomcrypt/Make.defs @@ -23,6 +23,6 @@ CONFIGURED_APPS += $(APPDIR)/crypto/libtomcrypt # It allows `` import. -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/crypto/libtomcrypt/libtomcrypt/src/headers} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/crypto/libtomcrypt/libtomcrypt/src/headers} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/libtomcrypt/libtomcrypt/src/headers +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/libtomcrypt/libtomcrypt/src/headers endif diff --git a/crypto/mbedtls/Make.defs b/crypto/mbedtls/Make.defs index ee7f7d736..7e0e5178b 100644 --- a/crypto/mbedtls/Make.defs +++ b/crypto/mbedtls/Make.defs @@ -23,8 +23,8 @@ CONFIGURED_APPS += $(APPDIR)/crypto/mbedtls # Allows `.h>` import. -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/crypto/mbedtls/mbedtls/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/crypto/mbedtls/mbedtls/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/mbedtls/mbedtls/include +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/mbedtls/mbedtls/include CFLAGS += ${shell $(DEFINE) "$(CC)" MBEDTLS_CONFIG_FILE='""'} CXXFLAGS += ${shell $(DEFINE) "$(CC)" MBEDTLS_CONFIG_FILE='""'} diff --git a/crypto/tinycrypt/Make.defs b/crypto/tinycrypt/Make.defs index 8a898b399..d9349c9b2 100644 --- a/crypto/tinycrypt/Make.defs +++ b/crypto/tinycrypt/Make.defs @@ -20,6 +20,6 @@ ifneq ($(CONFIG_TINYCRYPT),) CONFIGURED_APPS += $(APPDIR)/crypto/tinycrypt -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/crypto/tinycrypt/tinycrypt/lib/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/crypto/tinycrypt/tinycrypt/lib/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/tinycrypt/tinycrypt/lib/include +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/tinycrypt/tinycrypt/lib/include endif diff --git a/examples/audio_rttl/Makefile b/examples/audio_rttl/Makefile index 62c26f607..e70a50a88 100644 --- a/examples/audio_rttl/Makefile +++ b/examples/audio_rttl/Makefile @@ -37,7 +37,7 @@ AUDIODIR = $(SDKDIR)$(DELIM)modules$(DELIM)audio # Audio Example flags -CXXFLAGS += ${shell $(INCDIR) "$(CC)" "$(AUDIODIR)"} +CXXFLAGS += ${INCDIR_PREFIX}"$(AUDIODIR)" CXXFLAGS += -D_POSIX include $(APPDIR)/Application.mk diff --git a/examples/canardv0/Makefile b/examples/canardv0/Makefile index 00f5f21ae..9e10611ea 100644 --- a/examples/canardv0/Makefile +++ b/examples/canardv0/Makefile @@ -25,7 +25,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = $(CONFIG_EXAMPLES_LIBCANARDV0_STACKSIZE) MODULE = $(CONFIG_EXAMPLES_LIBCANARDV0) -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/include/canutils} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/include/canutils MAINSRC = canard_main.c include $(APPDIR)/Application.mk diff --git a/examples/canardv1/Makefile b/examples/canardv1/Makefile index 646d91792..2ad75d03b 100644 --- a/examples/canardv1/Makefile +++ b/examples/canardv1/Makefile @@ -25,7 +25,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = $(CONFIG_EXAMPLES_LIBCANARDV1_DAEMON_STACK_SIZE) MODULE = $(CONFIG_EXAMPLES_LIBCANARDV1) -CFLAGS += -std=c11 ${shell $(INCDIR) "$(CC)" $(APPDIR)/include/canutils $(APPDIR)/include/o1heap} +CFLAGS += -std=c11 ${INCDIR_PREFIX}$(APPDIR)/include/canutils $(APPDIR)/include/o1heap CSRCS = socketcan.c MAINSRC = canard_main.c diff --git a/examples/pwfb/Makefile b/examples/pwfb/Makefile index efe528f2f..51bc62fb9 100644 --- a/examples/pwfb/Makefile +++ b/examples/pwfb/Makefile @@ -23,7 +23,7 @@ include $(APPDIR)/Make.defs # NuttX per-window frame buffer graphics example. NXGLYPHS = $(APPDIR)$(DELIM)graphics$(DELIM)nxglyphs -CFLAGS += ${shell $(INCDIR) "$(CC)" "$(NXGLYPHS)$(DELIM)include"} +CFLAGS += ${INCDIR_PREFIX}"$(NXGLYPHS)$(DELIM)include" CSRCS = pwfb_events.c pwfb_motion.c MAINSRC = pwfb_main.c diff --git a/examples/tcp_ipc_server/Makefile b/examples/tcp_ipc_server/Makefile index 1744d121d..f181bea62 100644 --- a/examples/tcp_ipc_server/Makefile +++ b/examples/tcp_ipc_server/Makefile @@ -28,7 +28,7 @@ STACKSIZE = $(CONFIG_EXAMPLES_TCP_IPC_SERVER_STACKSIZE) MODULE = $(CONFIG_EXAMPLES_TCP_IPC_SERVER) # SERVIDOR Example -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/examples/server_tcp/lorawan} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/examples/server_tcp/lorawan CSRCS = uart_lorawan_layer.c protocol.c MAINSRC = tcp_ipc_server_main.c diff --git a/gpsutils/minmea/Make.defs b/gpsutils/minmea/Make.defs index e62f10703..849301868 100644 --- a/gpsutils/minmea/Make.defs +++ b/gpsutils/minmea/Make.defs @@ -20,6 +20,5 @@ ifneq ($(CONFIG_GPSUTILS_MINMEA_LIB),) CONFIGURED_APPS += $(APPDIR)/gpsutils/minmea -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/gpsutils/minmea} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/gpsutils/minmea endif diff --git a/graphics/libjpeg/Make.defs b/graphics/libjpeg/Make.defs index 717a2e047..52c1f45d5 100644 --- a/graphics/libjpeg/Make.defs +++ b/graphics/libjpeg/Make.defs @@ -21,6 +21,6 @@ ifneq ($(CONFIG_LIBJPEG),) CONFIGURED_APPS += $(APPDIR)/graphics/libjpeg -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/graphics/libjpeg/libjpeg} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/graphics/libjpeg/libjpeg} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/libjpeg/libjpeg +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/libjpeg/libjpeg endif diff --git a/graphics/lvgl/Make.defs b/graphics/lvgl/Make.defs index 5d289b063..7fa5292ad 100644 --- a/graphics/lvgl/Make.defs +++ b/graphics/lvgl/Make.defs @@ -23,11 +23,11 @@ CONFIGURED_APPS += $(APPDIR)/graphics/lvgl # It allows `` import. -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/graphics/lvgl} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/graphics/lvgl} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/lvgl +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/lvgl # It allows `` import. -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/graphics/lvgl/lvgl} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/graphics/lvgl/lvgl} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/lvgl/lvgl +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/lvgl/lvgl endif diff --git a/graphics/pdcurs34/Makefile b/graphics/pdcurs34/Makefile index 56d3c9bb8..a97e00499 100644 --- a/graphics/pdcurs34/Makefile +++ b/graphics/pdcurs34/Makefile @@ -24,6 +24,6 @@ include $(APPDIR)/Make.defs include pdcurses/Make.defs include nuttx/Make.defs -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/graphics/pdcurs34/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/graphics/pdcurs34/include include $(APPDIR)/Application.mk diff --git a/graphics/twm4nx/Makefile b/graphics/twm4nx/Makefile index f6de5385a..0ec2f883a 100644 --- a/graphics/twm4nx/Makefile +++ b/graphics/twm4nx/Makefile @@ -22,7 +22,7 @@ include $(APPDIR)/Make.defs # Add path to cursor images to CXXFLAGS -CXXFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)/graphics/nxglyphs/include"} +CXXFLAGS += ${INCDIR_PREFIX}"$(APPDIR)/graphics/nxglyphs/include" # Twm4Nx built-in application info diff --git a/import/Make.defs b/import/Make.defs index f3f935188..0405e412b 100644 --- a/import/Make.defs +++ b/import/Make.defs @@ -27,10 +27,10 @@ include $(TOPDIR)/scripts/Make.defs # Compiler ARCHCRT0OBJ = $(call CONVERT_PATH,$(TOPDIR)$(DELIM)startup$(DELIM)crt0$(OBJEXT)) -ARCHINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include} +ARCHINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include -ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include} -ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)cxx} +ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include +ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)cxx ARCHCFLAGS += -fno-common -pipe ARCHCXXFLAGS += -fno-common -nostdinc++ -pipe diff --git a/interpreters/duktape/Make.defs b/interpreters/duktape/Make.defs index 405b4516c..b9d4fbfd6 100644 --- a/interpreters/duktape/Make.defs +++ b/interpreters/duktape/Make.defs @@ -22,9 +22,7 @@ ifneq ($(CONFIG_INTERPRETERS_DUKTAPE),) CONFIGURED_APPS += $(APPDIR)/interpreters/duktape # It allows `` import. -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/duktape/duktape/src-noline} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/duktape/duktape/src-noline} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/duktape/duktape/src-noline +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/duktape/duktape/src-noline endif diff --git a/interpreters/ficl/Makefile b/interpreters/ficl/Makefile index c478b10d4..6b3308c6f 100644 --- a/interpreters/ficl/Makefile +++ b/interpreters/ficl/Makefile @@ -30,7 +30,7 @@ include $(APPDIR)/Make.defs # Include paths -CFLAGS += ${shell $(INCDIR) "$(CC)" $(BUILDDIR)/$(FICL_SUBDIR) $(BUILDDIR)/src} +CFLAGS += ${INCDIR_PREFIX}$(BUILDDIR)/$(FICL_SUBDIR) $(BUILDDIR)/src # Source Files diff --git a/interpreters/lua/Make.defs b/interpreters/lua/Make.defs index 0ab12140c..277e48f5f 100644 --- a/interpreters/lua/Make.defs +++ b/interpreters/lua/Make.defs @@ -23,9 +23,9 @@ CONFIGURED_APPS += $(APPDIR)/interpreters/lua # Enable and includes. -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/lua/lua-$(CONFIG_INTERPRETER_LUA_VERSION)/src} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/lua/lua-$(CONFIG_INTERPRETER_LUA_VERSION)/src} +CFLAGS += ${INCDIR_PREFIX}\ + $(APPDIR)/interpreters/lua/lua-$(CONFIG_INTERPRETER_LUA_VERSION)/src +CXXFLAGS += ${INCDIR_PREFIX}\ + $(APPDIR)/interpreters/lua/lua-$(CONFIG_INTERPRETER_LUA_VERSION)/src endif diff --git a/interpreters/quickjs/Make.defs b/interpreters/quickjs/Make.defs index c0f9a7da6..d08b683fa 100644 --- a/interpreters/quickjs/Make.defs +++ b/interpreters/quickjs/Make.defs @@ -22,9 +22,7 @@ ifneq ($(CONFIG_INTERPRETERS_QUICKJS),) CONFIGURED_APPS += $(APPDIR)/interpreters/quickjs # It allows `` import. -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/quickjs} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/quickjs} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/quickjs +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/quickjs endif diff --git a/interpreters/wamr/Make.defs b/interpreters/wamr/Make.defs index c09e5d2cb..0c53a3614 100644 --- a/interpreters/wamr/Make.defs +++ b/interpreters/wamr/Make.defs @@ -21,9 +21,7 @@ ifneq ($(CONFIG_INTERPRETERS_WAMR),) CONFIGURED_APPS += $(APPDIR)/interpreters/wamr -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/wamr/wamr/core/iwasm/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/wamr/wamr/core/iwasm/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/wamr/wamr/core/iwasm/include +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/wamr/wamr/core/iwasm/include endif diff --git a/interpreters/wasm3/Make.defs b/interpreters/wasm3/Make.defs index a9c7c3c04..db0e96c8c 100644 --- a/interpreters/wasm3/Make.defs +++ b/interpreters/wasm3/Make.defs @@ -21,9 +21,7 @@ ifneq ($(CONFIG_INTERPRETERS_WASM3),) CONFIGURED_APPS += $(APPDIR)/interpreters/wasm3 -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/wasm3/wasm3/source} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/interpreters/wasm3/wasm3/source} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/wasm3/wasm3/source +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/wasm3/wasm3/source endif diff --git a/math/libtommath/Make.defs b/math/libtommath/Make.defs index 2fc71d5ae..6531ad3ae 100644 --- a/math/libtommath/Make.defs +++ b/math/libtommath/Make.defs @@ -23,6 +23,6 @@ CONFIGURED_APPS += $(APPDIR)/math/libtommath # It allows `` import. -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/math/libtommath/libtommath} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/math/libtommath/libtommath} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/math/libtommath/libtommath +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/math/libtommath/libtommath endif diff --git a/mlearning/cmsis/Make.defs b/mlearning/cmsis/Make.defs index 3ec875379..e36031b92 100644 --- a/mlearning/cmsis/Make.defs +++ b/mlearning/cmsis/Make.defs @@ -23,6 +23,6 @@ CONFIGURED_APPS += $(APPDIR)/mlearning/cmsis include $(wildcard $(APPDIR)/mlearning/cmsis/*/Make.defs) -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/Core/Include/} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/Core/Include/} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/Core/Include/ +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/Core/Include/ endif diff --git a/mlearning/cmsis/libcmsisdsp/Make.defs b/mlearning/cmsis/libcmsisdsp/Make.defs index efafee7d1..de9d8ea51 100644 --- a/mlearning/cmsis/libcmsisdsp/Make.defs +++ b/mlearning/cmsis/libcmsisdsp/Make.defs @@ -21,6 +21,6 @@ ifneq ($(CONFIG_CMSIS_DSP),) CONFIGURED_APPS += $(APPDIR)/mlearning/cmsis/libcmsisdsp -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/Include/} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/Include/} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/Include/ +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/Include/ endif diff --git a/mlearning/cmsis/libcmsisdsp/Makefile b/mlearning/cmsis/libcmsisdsp/Makefile index d6ec0c813..8fd731685 100644 --- a/mlearning/cmsis/libcmsisdsp/Makefile +++ b/mlearning/cmsis/libcmsisdsp/Makefile @@ -31,8 +31,8 @@ CFLAGS += -D__FPU_PRESENT=1U CXXFLAGS += -D__FPU_PRESENT=1U endif -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/PrivateInclude/} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/PrivateInclude/} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/PrivateInclude/ +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/DSP/PrivateInclude/ CMSIS5_DSP := ../CMSIS_5/CMSIS/DSP/Source CSRCS += SVMFunctions.c diff --git a/mlearning/cmsis/libcmsisnn/Make.defs b/mlearning/cmsis/libcmsisnn/Make.defs index 5953c5a94..187ff5557 100644 --- a/mlearning/cmsis/libcmsisnn/Make.defs +++ b/mlearning/cmsis/libcmsisnn/Make.defs @@ -21,6 +21,6 @@ ifneq ($(CONFIG_CMSIS_NN),) CONFIGURED_APPS += $(APPDIR)/mlearning/cmsis/libcmsisnn -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/NN/Include/} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/NN/Include/} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/NN/Include/ +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/cmsis/CMSIS_5/CMSIS/NN/Include/ endif diff --git a/mlearning/darknet/Make.defs b/mlearning/darknet/Make.defs index 0e95563bd..b06d5b534 100644 --- a/mlearning/darknet/Make.defs +++ b/mlearning/darknet/Make.defs @@ -21,6 +21,6 @@ ifneq ($(CONFIG_DARKNET_YOLO),) CONFIGURED_APPS += $(APPDIR)/mlearning/darknet -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/darknet/darknet/include/} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/darknet/darknet/include/} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/darknet/darknet/include/ +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/darknet/darknet/include/ endif diff --git a/mlearning/libnnablart/Make.defs b/mlearning/libnnablart/Make.defs index b4979b7ac..8733fa2c9 100644 --- a/mlearning/libnnablart/Make.defs +++ b/mlearning/libnnablart/Make.defs @@ -21,6 +21,6 @@ ifneq ($(CONFIG_NNABLA_RT),) CONFIGURED_APPS += $(APPDIR)/mlearning/libnnablart -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/libnnablart/nnabla-c-runtime/include/} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/mlearning/libnnablart/nnabla-c-runtime/include/} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/libnnablart/nnabla-c-runtime/include/ +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/mlearning/libnnablart/nnabla-c-runtime/include/ endif diff --git a/modbus/ascii/Make.defs b/modbus/ascii/Make.defs index fb1975938..15647c900 100644 --- a/modbus/ascii/Make.defs +++ b/modbus/ascii/Make.defs @@ -24,6 +24,6 @@ CSRCS += mbascii.c DEPPATH += --dep-path ascii VPATH += :ascii -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/modbus/ascii} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/ascii endif diff --git a/modbus/functions/Make.defs b/modbus/functions/Make.defs index 75e3c009a..9027dce62 100644 --- a/modbus/functions/Make.defs +++ b/modbus/functions/Make.defs @@ -31,4 +31,4 @@ endif DEPPATH += --dep-path functions VPATH += :functions -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/modbus/functions} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/functions diff --git a/modbus/rtu/Make.defs b/modbus/rtu/Make.defs index 5051c6c40..bc5ce1829 100644 --- a/modbus/rtu/Make.defs +++ b/modbus/rtu/Make.defs @@ -38,6 +38,6 @@ endif DEPPATH += --dep-path rtu VPATH += :rtu -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/modbus/rtu} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/rtu endif diff --git a/modbus/tcp/Make.defs b/modbus/tcp/Make.defs index f38291084..9503ca16b 100644 --- a/modbus/tcp/Make.defs +++ b/modbus/tcp/Make.defs @@ -24,6 +24,6 @@ CSRCS += mbtcp.c DEPPATH += --dep-path tcp VPATH += :tcp -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/modbus/tcp} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/tcp endif diff --git a/netutils/cjson/Makefile b/netutils/cjson/Makefile index f2b551087..d5ad647a0 100644 --- a/netutils/cjson/Makefile +++ b/netutils/cjson/Makefile @@ -40,7 +40,7 @@ CJSON_SRCDIR = $(CJSON_UNPACKNAME) APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPS_INCDIR)} +CFLAGS += ${INCDIR_PREFIX}$(APPS_INCDIR) CFLAGS += -DCJSON_INCLUDE_CONFIG_H CSRCS = $(CJSON_SRCDIR)$(DELIM)cJSON.c diff --git a/netutils/cwebsocket/Make.defs b/netutils/cwebsocket/Make.defs index 0c421cd37..9d068ef8e 100644 --- a/netutils/cwebsocket/Make.defs +++ b/netutils/cwebsocket/Make.defs @@ -21,6 +21,6 @@ ifneq ($(CONFIG_CWEBSOCKET),) CONFIGURED_APPS += $(APPDIR)/netutils/cwebsocket -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/netutils/cwebsocket/cwebsocket} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/netutils/cwebsocket/cwebsocket} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/netutils/cwebsocket/cwebsocket +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/netutils/cwebsocket/cwebsocket endif diff --git a/netutils/mqttc/Make.defs b/netutils/mqttc/Make.defs index b3401b7cb..7c9d235d2 100644 --- a/netutils/mqttc/Make.defs +++ b/netutils/mqttc/Make.defs @@ -21,10 +21,8 @@ ifneq ($(CONFIG_NETUTILS_MQTTC),) CONFIGURED_APPS += $(APPDIR)/netutils/mqttc -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/netutils/mqttc/MQTT-C/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/netutils/mqttc/MQTT-C/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/netutils/mqttc/MQTT-C/include +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/netutils/mqttc/MQTT-C/include ifneq ($(CONFIG_NETUTILS_MQTTC_WITH_MBEDTLS),) CFLAGS += -DMQTT_USE_MBEDTLS diff --git a/netutils/thttpd/Makefile b/netutils/thttpd/Makefile index 4fc574160..8c637ec79 100644 --- a/netutils/thttpd/Makefile +++ b/netutils/thttpd/Makefile @@ -38,7 +38,7 @@ endif ifeq ($(CONFIG_THTTPD_BINFS),y) CSRCS += phf.c redirect.c ssi.c - CFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)$(DELIM)netutils$(DELIM)thttpd"} + CFLAGS += ${INCDIR_PREFIX}"$(APPDIR)$(DELIM)netutils$(DELIM)thttpd" DEPPATHS += --dep-path cgi-src VPATH += :cgi-src diff --git a/netutils/thttpd/cgi-src/Makefile b/netutils/thttpd/cgi-src/Makefile index 73bd0d614..1d215c4fc 100644 --- a/netutils/thttpd/cgi-src/Makefile +++ b/netutils/thttpd/cgi-src/Makefile @@ -20,7 +20,7 @@ include $(APPDIR)/Make.defs -CFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)$(DELIM)netutils$(DELIM)thttpd"} +CFLAGS += ${INCDIR_PREFIX}"$(APPDIR)$(DELIM)netutils$(DELIM)thttpd" CGIBINDIR = $(APPDIR)/netutils/thttpd/cgi-bin CLEANFILES = *.o redirect ssi phf diff --git a/system/argtable3/Make.defs b/system/argtable3/Make.defs index 524feef89..8ee817972 100644 --- a/system/argtable3/Make.defs +++ b/system/argtable3/Make.defs @@ -21,6 +21,6 @@ ifneq ($(CONFIG_SYSTEM_ARGTABLE3),) CONFIGURED_APPS += $(APPDIR)/system/argtable3 -CFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)/system/argtable3/argtable3/src"} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)/system/argtable3/argtable3/src"} +CFLAGS += ${INCDIR_PREFIX}"$(APPDIR)/system/argtable3/argtable3/src" +CXXFLAGS += ${INCDIR_PREFIX}"$(APPDIR)/system/argtable3/argtable3/src" endif diff --git a/system/embedlog/Makefile b/system/embedlog/Makefile index a4741deb1..91c4a8c17 100644 --- a/system/embedlog/Makefile +++ b/system/embedlog/Makefile @@ -32,7 +32,7 @@ EMBEDLOG_EXT = tar.gz EMBEDLOG_SOURCES = embedlog-$(EMBEDLOG_VERSION) EMBEDLOG_TARBALL = $(EMBEDLOG_SOURCES).$(EMBEDLOG_EXT) -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)system} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)$(DELIM)include$(DELIM)system CSRCS = $(EMBEDLOG_SOURCES)/src/el-options.c \ $(EMBEDLOG_SOURCES)/src/el-perror.c \ diff --git a/system/hexed/Makefile b/system/hexed/Makefile index 45f9f8e62..aa80b4ad6 100644 --- a/system/hexed/Makefile +++ b/system/hexed/Makefile @@ -31,7 +31,7 @@ CSRCS = bfile.c cmdargs.c hexcopy.c hexdump.c hexenter.c hexhelp.c CSRCS += hexinsert.c hexmove.c hexremove.c hexword.c MAINSRC = hexed.c -CFLAGS += ${shell $(INCDIR) "$(CC)" include} +CFLAGS += ${INCDIR_PREFIX}include VPATH += :src DEPPATH += --dep-path src diff --git a/system/libuv/Make.defs b/system/libuv/Make.defs index 77ecc7fee..740c5ef84 100644 --- a/system/libuv/Make.defs +++ b/system/libuv/Make.defs @@ -23,9 +23,7 @@ CONFIGURED_APPS += $(APPDIR)/system/libuv # Enable include. -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/system/libuv/libuv/include} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/system/libuv/libuv/include} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/system/libuv/libuv/include +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/system/libuv/libuv/include endif diff --git a/system/psmq/Makefile b/system/psmq/Makefile index 258d3156c..72afd35a2 100644 --- a/system/psmq/Makefile +++ b/system/psmq/Makefile @@ -32,8 +32,8 @@ PSMQ_EXT = tar.gz PSMQ_SOURCES = psmq-$(PSMQ_VERSION) PSMQ_TARBALL = $(PSMQ_SOURCES).$(PSMQ_EXT) -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)system} -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)$(DELIM)system$(DELIM)psmq$(DELIM)$(PSMQ_SOURCES)} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)$(DELIM)include$(DELIM)system +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)$(DELIM)system$(DELIM)psmq$(DELIM)$(PSMQ_SOURCES) # mandatory source files to compile CSRCS = $(PSMQ_SOURCES)/lib/psmq.c \ diff --git a/system/uorb/Make.defs b/system/uorb/Make.defs index c80bbdf4a..5d4e230ce 100644 --- a/system/uorb/Make.defs +++ b/system/uorb/Make.defs @@ -20,8 +20,6 @@ ifneq ($(CONFIG_UORB),) CONFIGURED_APPS += $(APPDIR)/system/uorb -CFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/system/uorb/} -CXXFLAGS += ${shell $(INCDIR) "$(CC)" \ - $(APPDIR)/system/uorb/} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/system/uorb/ +CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/system/uorb/ endif diff --git a/testing/unity/Makefile b/testing/unity/Makefile index f57624f34..4a3790328 100644 --- a/testing/unity/Makefile +++ b/testing/unity/Makefile @@ -40,7 +40,7 @@ UNITY_SRCDIR = $(UNITY_UNPACKNAME)$(DELIM)src APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)testing -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPS_INCDIR)} +CFLAGS += ${INCDIR_PREFIX}$(APPS_INCDIR) CFLAGS += -DUNITY_INCLUDE_CONFIG_H CSRCS = $(UNITY_SRCDIR)$(DELIM)unity.c diff --git a/wireless/iwpan/src/Make.defs b/wireless/iwpan/src/Make.defs index 3be4d58db..3725a4110 100644 --- a/wireless/iwpan/src/Make.defs +++ b/wireless/iwpan/src/Make.defs @@ -24,6 +24,6 @@ MAINSRC = iwpan.c DEPPATH += --dep-path src VPATH += :src -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/wireless/iwpan/src} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/wireless/iwpan/src endif diff --git a/wireless/wapi/src/Make.defs b/wireless/wapi/src/Make.defs index 6ee9c36a4..df2ddb3ad 100644 --- a/wireless/wapi/src/Make.defs +++ b/wireless/wapi/src/Make.defs @@ -28,6 +28,6 @@ endif DEPPATH += --dep-path src VPATH += :src -CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/wireless/wapi/src} +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/wireless/wapi/src endif