diff --git a/pkg/ccn-lite/Makefile.include b/pkg/ccn-lite/Makefile.include index bab9bba358..c7f9313396 100644 --- a/pkg/ccn-lite/Makefile.include +++ b/pkg/ccn-lite/Makefile.include @@ -1,7 +1,8 @@ -INCLUDES += -I$(PKGDIRBASE)/ccn-lite/src/ccnl-riot/include -INCLUDES += -I$(PKGDIRBASE)/ccn-lite/src/ccnl-core/include -INCLUDES += -I$(PKGDIRBASE)/ccn-lite/src/ccnl-pkt/include -INCLUDES += -I$(PKGDIRBASE)/ccn-lite/src/ccnl-fwd/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/ccn-lite/src/ccnl-riot/include +INCLUDES += -isystem$(PKGDIRBASE)/ccn-lite/src/ccnl-core/include +INCLUDES += -isystem$(PKGDIRBASE)/ccn-lite/src/ccnl-pkt/include +INCLUDES += -isystem$(PKGDIRBASE)/ccn-lite/src/ccnl-fwd/include CFLAGS += -DCCNL_RIOT ARCHIVES += $(BINDIR)/ccn-lite.a diff --git a/pkg/cmsis/Makefile.include b/pkg/cmsis/Makefile.include index faef2c8f65..d8ed837d4f 100644 --- a/pkg/cmsis/Makefile.include +++ b/pkg/cmsis/Makefile.include @@ -1,14 +1,15 @@ -INCLUDES += -I$(PKGDIRBASE)/cmsis/CMSIS/Core/Include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/cmsis/CMSIS/Core/Include ifneq (,$(filter cmsis-dsp,$(USEMODULE))) - INCLUDES += -I$(PKGDIRBASE)/cmsis/CMSIS/DSP/Include - INCLUDES += -I$(PKGDIRBASE)/cmsis/CMSIS/DSP/PrivateInclude + INCLUDES += -isystem$(PKGDIRBASE)/cmsis/CMSIS/DSP/Include + INCLUDES += -isystem$(PKGDIRBASE)/cmsis/CMSIS/DSP/PrivateInclude CFLAGS += -DARM_CPU="cortex-m4" endif ifneq (,$(filter cmsis-nn,$(USEMODULE))) - INCLUDES += -I$(PKGDIRBASE)/cmsis/CMSIS/DSP/Include - INCLUDES += -I$(PKGDIRBASE)/cmsis/CMSIS/NN/Include + INCLUDES += -isystem$(PKGDIRBASE)/cmsis/CMSIS/DSP/Include + INCLUDES += -isystem$(PKGDIRBASE)/cmsis/CMSIS/NN/Include # Required for some basic math functions CFLAGS += -Wno-sign-compare endif diff --git a/pkg/cn-cbor/Makefile.include b/pkg/cn-cbor/Makefile.include index 026202fe34..db4d456037 100644 --- a/pkg/cn-cbor/Makefile.include +++ b/pkg/cn-cbor/Makefile.include @@ -1,4 +1,5 @@ -INCLUDES += -I$(PKGDIRBASE)/cn-cbor/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/cn-cbor/include #enable context pointer CFLAGS += -DUSE_CBOR_CONTEXT diff --git a/pkg/cryptoauthlib/Makefile.include b/pkg/cryptoauthlib/Makefile.include index 2acafea0c6..05cc3fe643 100644 --- a/pkg/cryptoauthlib/Makefile.include +++ b/pkg/cryptoauthlib/Makefile.include @@ -1,30 +1,31 @@ PKG_SOURCE_DIR ?= $(PKGDIRBASE)/cryptoauthlib PKG_TESTINCLDIR = $(PKG_SOURCE_DIR)/test -INCLUDES += -I$(PKG_SOURCE_DIR) -INCLUDES += -I$(PKG_SOURCE_DIR)/lib -INCLUDES += -I$(PKG_SOURCE_DIR)/app -INCLUDES += -I$(PKG_SOURCE_DIR)/lib/calib -INCLUDES += -I$(RIOTPKG)/cryptoauthlib/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKG_SOURCE_DIR) +INCLUDES += -isystem$(PKG_SOURCE_DIR)/lib +INCLUDES += -isystem$(PKG_SOURCE_DIR)/app +INCLUDES += -isystem$(PKG_SOURCE_DIR)/lib/calib +INCLUDES += -isystem$(RIOTPKG)/cryptoauthlib/include ifneq (,$(filter psa_crypto, $(USEMODULE))) DIRS += $(RIOTPKG)/cryptoauthlib/psa_atca_driver - INCLUDES += -I$(RIOTBASE)/sys/psa_crypto/include + INCLUDES += -isystem$(RIOTBASE)/sys/psa_crypto/include endif DIRS += $(RIOTPKG)/cryptoauthlib/contrib ARCHIVES += $(BINDIR)/cryptoauthlib.a ifneq (,$(filter cryptoauthlib_test,$(USEMODULE))) - INCLUDES += -I$(PKG_TESTINCLDIR) - INCLUDES += -I$(PKG_TESTINCLDIR)/jwt - INCLUDES += -I$(PKG_TESTINCLDIR)/tng - INCLUDES += -I$(PKG_TESTINCLDIR)/atcacert - INCLUDES += -I$(PKG_TESTINCLDIR)/api_atcab - INCLUDES += -I$(PKG_TESTINCLDIR)/api_calib - INCLUDES += -I$(PKG_TESTINCLDIR)/api_crypto - INCLUDES += -I$(PKG_TESTINCLDIR)/vectors - INCLUDES += -I$(PKG_SOURCE_DIR)/third_party/unity + INCLUDES += -isystem$(PKG_TESTINCLDIR) + INCLUDES += -isystem$(PKG_TESTINCLDIR)/jwt + INCLUDES += -isystem$(PKG_TESTINCLDIR)/tng + INCLUDES += -isystem$(PKG_TESTINCLDIR)/atcacert + INCLUDES += -isystem$(PKG_TESTINCLDIR)/api_atcab + INCLUDES += -isystem$(PKG_TESTINCLDIR)/api_calib + INCLUDES += -isystem$(PKG_TESTINCLDIR)/api_crypto + INCLUDES += -isystem$(PKG_TESTINCLDIR)/vectors + INCLUDES += -isystem$(PKG_SOURCE_DIR)/third_party/unity endif PSEUDOMODULES += psa_secure_element_ateccx08a diff --git a/pkg/driver_atwinc15x0/Makefile.include b/pkg/driver_atwinc15x0/Makefile.include index 280d4fc67a..4d0a178a80 100644 --- a/pkg/driver_atwinc15x0/Makefile.include +++ b/pkg/driver_atwinc15x0/Makefile.include @@ -1 +1,2 @@ -INCLUDES += -I$(PKGDIRBASE)/driver_atwinc15x0/src +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/driver_atwinc15x0/src diff --git a/pkg/driver_bme680/Makefile.include b/pkg/driver_bme680/Makefile.include index 91522faa40..1c5aa51a50 100644 --- a/pkg/driver_bme680/Makefile.include +++ b/pkg/driver_bme680/Makefile.include @@ -1,4 +1,5 @@ -INCLUDES += -I$(PKGDIRBASE)/driver_bme680 -INCLUDES += -I$(RIOTPKG)/driver_bme680/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/driver_bme680 +INCLUDES += -isystem$(RIOTPKG)/driver_bme680/include DIRS += $(RIOTPKG)/driver_bme680/contrib diff --git a/pkg/driver_cryptocell_310/Makefile.include b/pkg/driver_cryptocell_310/Makefile.include index a6424efe04..009ec9a338 100644 --- a/pkg/driver_cryptocell_310/Makefile.include +++ b/pkg/driver_cryptocell_310/Makefile.include @@ -1,5 +1,6 @@ -INCLUDES += -I$(PKGDIRBASE)/driver_cryptocell_310/include -INCLUDES += -I$(RIOTPKG)/driver_cryptocell_310/include +# using -isystem instead of -I to avoid warnings on the following headers +INCLUDES += -isystem$(PKGDIRBASE)/driver_cryptocell_310/include +INCLUDES += -isystem$(RIOTPKG)/driver_cryptocell_310/include DIRS += $(RIOTPKG)/driver_cryptocell_310/contrib ARCHIVES += $(PKGDIRBASE)/driver_cryptocell_310/libnrf_cc310_0.9.13.a diff --git a/pkg/driver_sen5x/Makefile.include b/pkg/driver_sen5x/Makefile.include index 45ba6ae1a2..6ec7ca695e 100644 --- a/pkg/driver_sen5x/Makefile.include +++ b/pkg/driver_sen5x/Makefile.include @@ -1 +1,2 @@ -INCLUDES += -I$(PKGDIRBASE)/driver_sen5x \ No newline at end of file +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/driver_sen5x diff --git a/pkg/driver_sx126x/Makefile.include b/pkg/driver_sx126x/Makefile.include index 1dc9126938..b5f9164f7f 100644 --- a/pkg/driver_sx126x/Makefile.include +++ b/pkg/driver_sx126x/Makefile.include @@ -1,3 +1,4 @@ -INCLUDES += -I$(PKGDIRBASE)/driver_sx126x/src +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/driver_sx126x/src DIRS += $(RIOTBASE)/pkg/driver_sx126x/contrib diff --git a/pkg/edhoc-c/Makefile.include b/pkg/edhoc-c/Makefile.include index ebd90a09f1..c1c9f49707 100644 --- a/pkg/edhoc-c/Makefile.include +++ b/pkg/edhoc-c/Makefile.include @@ -1,6 +1,7 @@ -INCLUDES += -I$(PKGDIRBASE)/EDHOC-C/include \ - -I$(PKGDIRBASE)/EDHOC-C/src \ - -I$(RIOTBASE)/pkg/edhoc-c/include \ +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/EDHOC-C/include \ + -isystem$(PKGDIRBASE)/EDHOC-C/src \ + -isystem$(RIOTBASE)/pkg/edhoc-c/include \ # ifneq (,$(filter edhoc-c_crypto_wolfssl,$(USEMODULE))) diff --git a/pkg/etl/Makefile.include b/pkg/etl/Makefile.include index a8ae45fa15..e1c075b8d4 100644 --- a/pkg/etl/Makefile.include +++ b/pkg/etl/Makefile.include @@ -1,5 +1,15 @@ -INCLUDES += -I$(PKGDIRBASE)/etl/include -INCLUDES += -I$(RIOTPKG)/etl/config +# Hack: On LLVM, use `-isystem` instead of -I to ignore warnings about the +# package's headers. On g++ (at least the AVR variant), `-system` is C +# only. But luckily, g++ does not emit the warnings we need to ignore +# anyway. + +ifeq (llvm,$(TOOLCHAIN)) + INCLUDES += -isystem$(PKGDIRBASE)/etl/include + INCLUDES += -isystem$(RIOTPKG)/etl/config +else + INCLUDES += -I$(PKGDIRBASE)/etl/include + INCLUDES += -I$(RIOTPKG)/etl/config +endif # There's nothing to build in this package, it's used as a header only library. # So it's declared as a pseudo-module diff --git a/pkg/gecko_sdk/Makefile.include b/pkg/gecko_sdk/Makefile.include index 54d410cf96..b3eb610ec8 100644 --- a/pkg/gecko_sdk/Makefile.include +++ b/pkg/gecko_sdk/Makefile.include @@ -1,16 +1,17 @@ -INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/common/inc -INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/emlib/inc -INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/emlib-extra/inc +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/gecko_sdk/dist/common/inc +INCLUDES += -isystem$(PKGDIRBASE)/gecko_sdk/dist/emlib/inc +INCLUDES += -isystem$(PKGDIRBASE)/gecko_sdk/dist/emlib-extra/inc ifneq (,$(filter gecko_sdk_librail,$(USEMODULE))) ARCHIVES += $(BINDIR)/gecko_sdk_librail.a - INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/common - INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/chip/efr32/$(EFM32_LIBRAIL_HEADER_NAME) + INCLUDES += -isystem$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/common + INCLUDES += -isystem$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/chip/efr32/$(EFM32_LIBRAIL_HEADER_NAME) endif ifneq (,$(filter gecko_sdk_librail_pa,$(USEMODULE))) - INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/plugin/pa-conversions - INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/plugin/pa-conversions/$(EFM32_LIBRAIL_PA_HEADER_NAME)/config + INCLUDES += -isystem$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/plugin/pa-conversions + INCLUDES += -isystem$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/plugin/pa-conversions/$(EFM32_LIBRAIL_PA_HEADER_NAME)/config endif ifeq ($(CPU_CORE),cortex-m33) diff --git a/pkg/libcose/Makefile.include b/pkg/libcose/Makefile.include index ebe77d953c..18bb47e25d 100644 --- a/pkg/libcose/Makefile.include +++ b/pkg/libcose/Makefile.include @@ -1,5 +1,6 @@ -INCLUDES += -I$(PKGDIRBASE)/libcose/include \ - -I$(RIOTBASE)/pkg/libcose/include \ +# using -isystem to avoid warnings about these headers +INCLUDES += -isystem$(PKGDIRBASE)/libcose/include \ + -isystem$(RIOTBASE)/pkg/libcose/include \ # CFLAGS += -DUSE_CBOR_CONTEXT diff --git a/pkg/lorabasics/Makefile.include b/pkg/lorabasics/Makefile.include index ff41b54cc7..9f772768cc 100644 --- a/pkg/lorabasics/Makefile.include +++ b/pkg/lorabasics/Makefile.include @@ -1,4 +1,5 @@ -INCLUDES += -I$(PKGDIRBASE)/lorabasicsmodem \ +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/lorabasicsmodem \ # ifneq (,$(filter lorabasics_driver_sx1280_hal,$(USEMODULE))) diff --git a/pkg/lua/Makefile.include b/pkg/lua/Makefile.include index ab9d3759b2..6d1169056d 100644 --- a/pkg/lua/Makefile.include +++ b/pkg/lua/Makefile.include @@ -1,3 +1,4 @@ -INCLUDES += -I$(PKGDIRBASE)/lua -INCLUDES += -I$(RIOTPKG)/lua/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/lua +INCLUDES += -isystem$(RIOTPKG)/lua/include DIRS += $(RIOTPKG)/lua/contrib diff --git a/pkg/lua/include/lua_run.h b/pkg/lua/include/lua_run.h index 40376b8600..f898d6e9e8 100644 --- a/pkg/lua/include/lua_run.h +++ b/pkg/lua/include/lua_run.h @@ -182,14 +182,14 @@ LUALIB_API int lua_riot_openlibs(lua_State *L, uint16_t modmask); * or to manually reset the heap (only if there's no other thread using it). * * @param modname name of the module. - * @param memory @see lua_riot_newstate() - * @param mem_size @see lua_riot_newstate() - * @param modmask @see lua_riot_newstate() + * @param memory See @ref lua_riot_newstate() + * @param mem_size See @ref lua_riot_newstate() + * @param modmask See @ref lua_riot_newstate() * @param[out] retval Value returned by the lua code, if it is a number, * or zero if no value is returned or the value is not * a number. If retval is null, the value is not stored. * - * @return An error code ( @see LUAR_ERRORS). LUAR_EXIT indicates no error. + * @return An error code ( See @ref LUAR_ERRORS). LUAR_EXIT indicates no error. */ LUALIB_API int lua_riot_do_module(const char *modname, void *memory, size_t mem_size, uint16_t modmask, int *retval); @@ -200,16 +200,16 @@ LUALIB_API int lua_riot_do_module(const char *modname, void *memory, size_t mem_ * Only text data (i.e. lua source code) can be loaded by this function. The * lua interpreter is not robust against corrupt binary code. * - * @see lua_riot_do_module() for more information on internal errors. + * See @ref lua_riot_do_module() for more information on internal errors. * * @param buf Text data (lua source code). * @param buflen Size of the text data in bytes. If buf is * a zero-terminated string, the zero must not be counted. - * @param memory @see lua_riot_newstate() - * @param mem_size @see lua_riot_newstate() - * @param modmask @see lua_riot_newstate() - * @param[out] retval @see lua_riot_do_module() - * @return @see lua_riot_do_module(). + * @param memory See @ref lua_riot_newstate() + * @param mem_size See @ref lua_riot_newstate() + * @param modmask See @ref lua_riot_newstate() + * @param[out] retval See @ref lua_riot_do_module() + * @return See @ref lua_riot_do_module(). */ LUALIB_API int lua_riot_do_buffer(const uint8_t *buf, size_t buflen, void *memory, size_t mem_size, uint16_t modmask, int *retval); diff --git a/pkg/lv_drivers/Makefile.include b/pkg/lv_drivers/Makefile.include index 1f192e2d21..9047bfe855 100644 --- a/pkg/lv_drivers/Makefile.include +++ b/pkg/lv_drivers/Makefile.include @@ -1,5 +1,6 @@ -INCLUDES += -I$(PKGDIRBASE)/lv_drivers \ - -I$(RIOTBASE)/pkg/lv_drivers/include \ +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/lv_drivers \ + -isystem$(RIOTBASE)/pkg/lv_drivers/include \ # # Don't use relative includes in lv_drivers, already set in LVGL package diff --git a/pkg/lvgl/Makefile.include b/pkg/lvgl/Makefile.include index f900ae4af1..5bbacbda94 100644 --- a/pkg/lvgl/Makefile.include +++ b/pkg/lvgl/Makefile.include @@ -1,5 +1,6 @@ -INCLUDES += -I$(RIOTBASE)/pkg/lvgl/include -INCLUDES += -I$(PKGDIRBASE) +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(RIOTBASE)/pkg/lvgl/include +INCLUDES += -isystem$(PKGDIRBASE) # Don't use relative includes in lvgl CFLAGS += -DLV_CONF_INCLUDE_SIMPLE diff --git a/pkg/mynewt-core/Makefile.include b/pkg/mynewt-core/Makefile.include index 6a5cfa3145..f60eb9a419 100644 --- a/pkg/mynewt-core/Makefile.include +++ b/pkg/mynewt-core/Makefile.include @@ -1,8 +1,9 @@ -INCLUDES += -I$(RIOTPKG)/mynewt-core/include \ - -I$(PKGDIRBASE)/mynewt-core/kernel/os/include \ - -I$(PKGDIRBASE)/mynewt-core/hw/hal/include \ - -I$(PKGDIRBASE)/mynewt-core/util/mem/include \ - -I$(PKGDIRBASE)/mynewt-core/sys/stats/stub/include \ +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(RIOTPKG)/mynewt-core/include \ + -isystem$(PKGDIRBASE)/mynewt-core/kernel/os/include \ + -isystem$(PKGDIRBASE)/mynewt-core/hw/hal/include \ + -isystem$(PKGDIRBASE)/mynewt-core/util/mem/include \ + -isystem$(PKGDIRBASE)/mynewt-core/sys/stats/stub/include \ # DIRS += $(RIOTPKG)/mynewt-core/contrib \ diff --git a/pkg/nimble/Makefile.include b/pkg/nimble/Makefile.include index ed2efc569d..9579939d79 100644 --- a/pkg/nimble/Makefile.include +++ b/pkg/nimble/Makefile.include @@ -1,7 +1,8 @@ -NIMIBASE = -I$(PKGDIRBASE)/nimble +# Using -isystem instead of -I to prevent warnings for the following headers +NIMIBASE = -isystem$(PKGDIRBASE)/nimble # include RIOT glue code headers -INCLUDES += -I$(RIOTPKG)/nimble/contrib/include +INCLUDES += -isystem$(RIOTPKG)/nimble/contrib/include # include generic nimble headers INCLUDES += $(NIMIBASE)/nimble/include @@ -11,7 +12,7 @@ ifneq (,$(filter nimble_npl_riot,$(USEMODULE))) INCLUDES += $(NIMIBASE)/porting/npl/riot/include else INCLUDES += $(NIMIBASE)/porting/npl/riot/include/npl_syscfg - INCLUDES += -I$(RIOTPKG)/nimble/npl/include + INCLUDES += -isystem$(RIOTPKG)/nimble/npl/include endif INCLUDES += $(NIMIBASE)/porting/nimble/include @@ -85,16 +86,16 @@ endif # include additional headers for RIOT specific NimBLE submodules ifneq (,$(filter nimble_addr,$(USEMODULE))) - INCLUDES += -I$(RIOTPKG)/nimble/addr/include + INCLUDES += -isystem$(RIOTPKG)/nimble/addr/include endif ifneq (,$(filter nimble_autoadv,$(USEMODULE))) - INCLUDES += -I$(RIOTPKG)/nimble/autoadv/include + INCLUDES += -isystem$(RIOTPKG)/nimble/autoadv/include DIRS += $(RIOTPKG)/nimble/autoadv endif ifneq (,$(filter nimble_autoconn,$(USEMODULE))) - INCLUDES += -I$(RIOTPKG)/nimble/autoconn/include + INCLUDES += -isystem$(RIOTPKG)/nimble/autoconn/include endif ifneq (,$(filter nimble_adv_ext,$(USEMODULE))) @@ -124,7 +125,7 @@ else endif ifneq (,$(filter nimble_netif,$(USEMODULE))) - INCLUDES += -I$(RIOTPKG)/nimble/netif/include + INCLUDES += -isystem$(RIOTPKG)/nimble/netif/include # configure NimBLE's internals NIMBLE_MAX_CONN ?= 3 @@ -166,17 +167,17 @@ else endif ifneq (,$(filter nimble_rpble,$(USEMODULE))) - INCLUDES += -I$(RIOTPKG)/nimble/rpble/include + INCLUDES += -isystem$(RIOTPKG)/nimble/rpble/include endif ifneq (,$(filter nimble_scanlist,$(USEMODULE))) - INCLUDES += -I$(RIOTPKG)/nimble/scanlist/include + INCLUDES += -isystem$(RIOTPKG)/nimble/scanlist/include endif ifneq (,$(filter nimble_scanner,$(USEMODULE))) - INCLUDES += -I$(RIOTPKG)/nimble/scanner/include + INCLUDES += -isystem$(RIOTPKG)/nimble/scanner/include endif ifneq (,$(filter nimble_statconn,$(USEMODULE))) - INCLUDES += -I$(RIOTPKG)/nimble/statconn/include + INCLUDES += -isystem$(RIOTPKG)/nimble/statconn/include endif diff --git a/pkg/opendsme/Makefile.include b/pkg/opendsme/Makefile.include index ee5671f31a..8414228c8f 100644 --- a/pkg/opendsme/Makefile.include +++ b/pkg/opendsme/Makefile.include @@ -1,4 +1,5 @@ -INCLUDES += -I$(PKGDIRBASE)/opendsme -INCLUDES += -I$(RIOTBASE)/pkg/opendsme/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/opendsme +INCLUDES += -isystem$(RIOTBASE)/pkg/opendsme/include DIRS += $(RIOTBASE)/pkg/opendsme/contrib diff --git a/pkg/openwsn/Makefile.include b/pkg/openwsn/Makefile.include index 24be1a5db1..d26c2da122 100644 --- a/pkg/openwsn/Makefile.include +++ b/pkg/openwsn/Makefile.include @@ -15,32 +15,33 @@ PSEUDOMODULES += openwsn_serial \ DIRS += $(RIOTBASE)/pkg/openwsn/contrib -INCLUDES += -I$(PKGDIRBASE)/openwsn \ - -I$(PKGDIRBASE)/openwsn/kernel \ - -I$(PKGDIRBASE)/openwsn/inc \ - -I$(PKGDIRBASE)/openwsn/drivers/common \ - -I$(PKGDIRBASE)/openwsn/drivers/common/crypto \ - -I$(PKGDIRBASE)/openwsn/bsp/boards/ \ - -I$(PKGDIRBASE)/openwsn/openstack/ \ - -I$(PKGDIRBASE)/openwsn/openstack/02a-MAClow \ - -I$(PKGDIRBASE)/openwsn/openstack/02b-MAChigh \ - -I$(PKGDIRBASE)/openwsn/openstack/03a-IPHC \ - -I$(PKGDIRBASE)/openwsn/openstack/03b-IPv6 \ - -I$(PKGDIRBASE)/openwsn/openstack/04-TRAN \ - -I$(PKGDIRBASE)/openwsn/openstack/cross-layers \ - -I$(PKGDIRBASE)/openwsn/openapps \ - -I$(PKGDIRBASE)/openwsn/openapps/cjoin \ - -I$(PKGDIRBASE)/openwsn/openweb \ - -I$(PKGDIRBASE)/openwsn/openweb/opencoap \ - -I$(RIOTBASE)/pkg/openwsn/include \ +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/openwsn \ + -isystem$(PKGDIRBASE)/openwsn/kernel \ + -isystem$(PKGDIRBASE)/openwsn/inc \ + -isystem$(PKGDIRBASE)/openwsn/drivers/common \ + -isystem$(PKGDIRBASE)/openwsn/drivers/common/crypto \ + -isystem$(PKGDIRBASE)/openwsn/bsp/boards/ \ + -isystem$(PKGDIRBASE)/openwsn/openstack/ \ + -isystem$(PKGDIRBASE)/openwsn/openstack/02a-MAClow \ + -isystem$(PKGDIRBASE)/openwsn/openstack/02b-MAChigh \ + -isystem$(PKGDIRBASE)/openwsn/openstack/03a-IPHC \ + -isystem$(PKGDIRBASE)/openwsn/openstack/03b-IPv6 \ + -isystem$(PKGDIRBASE)/openwsn/openstack/04-TRAN \ + -isystem$(PKGDIRBASE)/openwsn/openstack/cross-layers \ + -isystem$(PKGDIRBASE)/openwsn/openapps \ + -isystem$(PKGDIRBASE)/openwsn/openapps/cjoin \ + -isystem$(PKGDIRBASE)/openwsn/openweb \ + -isystem$(PKGDIRBASE)/openwsn/openweb/opencoap \ + -isystem$(RIOTBASE)/pkg/openwsn/include \ ifneq (,$(filter openwsn_riotos,$(USEMODULE))) - INCLUDES += -I$(RIOTBASE)/pkg/openwsn/scheduler + INCLUDES += -isystem$(RIOTBASE)/pkg/openwsn/scheduler DIRS += $(RIOTBASE)/pkg/openwsn/scheduler endif ifneq (,$(filter openwsn_sock_udp,$(USEMODULE))) - INCLUDES += -I$(RIOTBASE)/pkg/openwsn/sock + INCLUDES += -isystem$(RIOTBASE)/pkg/openwsn/sock DIRS += $(RIOTBASE)/pkg/openwsn/sock endif diff --git a/pkg/paho-mqtt/Makefile.include b/pkg/paho-mqtt/Makefile.include index cdcf5597c8..1a9b65f0fc 100644 --- a/pkg/paho-mqtt/Makefile.include +++ b/pkg/paho-mqtt/Makefile.include @@ -1,6 +1,7 @@ -INCLUDES += -I$(PKGDIRBASE)/paho-mqtt/MQTTClient-C/src/ -INCLUDES += -I$(PKGDIRBASE)/paho-mqtt/MQTTPacket/src -INCLUDES += -I$(RIOTBASE)/pkg/paho-mqtt/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/paho-mqtt/MQTTClient-C/src/ +INCLUDES += -isystem$(PKGDIRBASE)/paho-mqtt/MQTTPacket/src +INCLUDES += -isystem$(RIOTBASE)/pkg/paho-mqtt/include DIRS += $(RIOTBASE)/pkg/paho-mqtt/contrib diff --git a/pkg/relic/Makefile.include b/pkg/relic/Makefile.include index f94915aee0..e7d48ead02 100644 --- a/pkg/relic/Makefile.include +++ b/pkg/relic/Makefile.include @@ -1,3 +1,4 @@ -INCLUDES += -I$(PKGDIRBASE)/relic/include -INCLUDES += -I$(BINDIR)/pkg-build/relic/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/relic/include +INCLUDES += -isystem$(BINDIR)/pkg-build/relic/include ARCHIVES += $(BINDIR)/relic.a diff --git a/pkg/semtech-loramac/Makefile b/pkg/semtech-loramac/Makefile index 111e607274..5a80c99fbe 100644 --- a/pkg/semtech-loramac/Makefile +++ b/pkg/semtech-loramac/Makefile @@ -5,10 +5,11 @@ PKG_LICENSE=BSD-3-Clause include $(RIOTBASE)/pkg/pkg.mk -INCLUDES += -I$(PKGDIRBASE)/semtech-loramac/src/mac \ - -I$(PKGDIRBASE)/semtech-loramac/src/boards/mcu \ - -I$(PKGDIRBASE)/semtech-loramac/src/system/crypto \ - -I$(PKGDIRBASE)/semtech-loramac/src +# Use -isystem instead of -I to disable warnings for these headers +INCLUDES += -isystem$(PKGDIRBASE)/semtech-loramac/src/mac \ + -isystem$(PKGDIRBASE)/semtech-loramac/src/boards/mcu \ + -isystem$(PKGDIRBASE)/semtech-loramac/src/system/crypto \ + -isystem$(PKGDIRBASE)/semtech-loramac/src LORAMAC_MODULES = loramac_arch loramac_crypto loramac_mac loramac_region diff --git a/pkg/semtech-loramac/Makefile.include b/pkg/semtech-loramac/Makefile.include index 1ed77e70ec..3cb8b067b0 100644 --- a/pkg/semtech-loramac/Makefile.include +++ b/pkg/semtech-loramac/Makefile.include @@ -1,4 +1,5 @@ -INCLUDES += -I$(RIOTBASE)/pkg/semtech-loramac/include +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(RIOTBASE)/pkg/semtech-loramac/include DIRS += $(RIOTBASE)/pkg/semtech-loramac/contrib diff --git a/pkg/semtech-loramac/contrib/Makefile b/pkg/semtech-loramac/contrib/Makefile index baadd04b0b..d2e353da14 100644 --- a/pkg/semtech-loramac/contrib/Makefile +++ b/pkg/semtech-loramac/contrib/Makefile @@ -1,9 +1,10 @@ MODULE := semtech_loramac_contrib -INCLUDES += -I$(PKGDIRBASE)/semtech-loramac/src/mac \ - -I$(PKGDIRBASE)/semtech-loramac/src/boards \ - -I$(PKGDIRBASE)/semtech-loramac/src/radio \ - -I$(PKGDIRBASE)/semtech-loramac/src/system/crypto \ - -I$(PKGDIRBASE)/semtech-loramac/src +# Use -isystem instead of -I to disable warnings about these headers +INCLUDES += -isystem$(PKGDIRBASE)/semtech-loramac/src/mac \ + -isystem$(PKGDIRBASE)/semtech-loramac/src/boards \ + -isystem$(PKGDIRBASE)/semtech-loramac/src/radio \ + -isystem$(PKGDIRBASE)/semtech-loramac/src/system/crypto \ + -isystem$(PKGDIRBASE)/semtech-loramac/src include $(RIOTBASE)/Makefile.base diff --git a/pkg/tinycrypt/Makefile.include b/pkg/tinycrypt/Makefile.include index ac7a28bc30..2899d47cee 100644 --- a/pkg/tinycrypt/Makefile.include +++ b/pkg/tinycrypt/Makefile.include @@ -1 +1,2 @@ -INCLUDES += -I$(PKGDIRBASE)/tinycrypt/lib/include +# Using -isyste instead of -I to avoid warnings about these headers +INCLUDES += -isystem$(PKGDIRBASE)/tinycrypt/lib/include diff --git a/pkg/tinydtls/Makefile.include b/pkg/tinydtls/Makefile.include index 9d4add6ccf..2db314b02f 100644 --- a/pkg/tinydtls/Makefile.include +++ b/pkg/tinydtls/Makefile.include @@ -1,13 +1,14 @@ PKG_BUILDDIR ?= $(PKGDIRBASE)/tinydtls -INCLUDES += -I$(PKG_BUILDDIR) +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKG_BUILDDIR) ifeq ($(TOOLCHAIN), llvm) CFLAGS += -Wno-gnu-zero-variadic-macro-arguments -Wno-unused-function endif -INCLUDES += -I$(RIOTBASE)/pkg/tinydtls/include -INCLUDES += -I$(PKG_BUILDDIR) +INCLUDES += -isystem$(RIOTBASE)/pkg/tinydtls/include +INCLUDES += -isystem$(PKG_BUILDDIR) # Mandatory for tinyDTLS CFLAGS += -DDTLSv12 -DWITH_SHA256 diff --git a/pkg/umorse/Makefile.include b/pkg/umorse/Makefile.include index f3fc9946a6..3b806ca8b9 100644 --- a/pkg/umorse/Makefile.include +++ b/pkg/umorse/Makefile.include @@ -1 +1,2 @@ -INCLUDES += -I$(PKGDIRBASE)/umorse +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/umorse diff --git a/pkg/uwb-core/Makefile.include b/pkg/uwb-core/Makefile.include index 1a03d51b5b..7a166f7787 100644 --- a/pkg/uwb-core/Makefile.include +++ b/pkg/uwb-core/Makefile.include @@ -1,17 +1,18 @@ -INCLUDES += -I$(PKGDIRBASE)/uwb-core/hw/drivers/uwb/include/ \ - -I$(PKGDIRBASE)/uwb-core/lib/euclid/include \ - -I$(PKGDIRBASE)/uwb-core/lib/dsp/include \ - -I$(PKGDIRBASE)/uwb-core/lib/json/include \ - -I$(PKGDIRBASE)/uwb-core/lib/rng_math/include \ - -I$(PKGDIRBASE)/uwb-core/lib/twr_ss/include \ - -I$(PKGDIRBASE)/uwb-core/lib/twr_ss_ext/include \ - -I$(PKGDIRBASE)/uwb-core/lib/twr_ss_ack/include \ - -I$(PKGDIRBASE)/uwb-core/lib/twr_ds/include \ - -I$(PKGDIRBASE)/uwb-core/lib/twr_ds_ext/include \ - -I$(PKGDIRBASE)/uwb-core/lib/uwb_rng/include \ - -I$(PKGDIRBASE)/uwb-core/porting/dpl/riot/include/ \ - -I$(PKGDIRBASE)/uwb-core/sys/uwbcfg/include \ - -I$(RIOTPKG)/uwb-core/include \ +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(PKGDIRBASE)/uwb-core/hw/drivers/uwb/include/ \ + -isystem$(PKGDIRBASE)/uwb-core/lib/euclid/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/dsp/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/json/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/rng_math/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/twr_ss/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/twr_ss_ext/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/twr_ss_ack/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/twr_ds/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/twr_ds_ext/include \ + -isystem$(PKGDIRBASE)/uwb-core/lib/uwb_rng/include \ + -isystem$(PKGDIRBASE)/uwb-core/porting/dpl/riot/include/ \ + -isystem$(PKGDIRBASE)/uwb-core/sys/uwbcfg/include \ + -isystem$(RIOTPKG)/uwb-core/include \ # PSEUDOMODULES += uwb-core_dpl diff --git a/pkg/wakaama/Makefile.include b/pkg/wakaama/Makefile.include index 69ca42848e..8ace74b629 100644 --- a/pkg/wakaama/Makefile.include +++ b/pkg/wakaama/Makefile.include @@ -1,10 +1,11 @@ DIRS += $(RIOTBASE)/pkg/wakaama/contrib -INCLUDES += -I$(RIOTBASE)/pkg/wakaama/include -INCLUDES += -I$(PKGDIRBASE)/wakaama/include -INCLUDES += -I$(PKGDIRBASE)/wakaama/core -INCLUDES += -I$(PKGDIRBASE)/wakaama/data -INCLUDES += -I$(PKGDIRBASE)/wakaama/coap/er-coap-13 +# Using -isystem instead of -I to prevent warnings for the following headers +INCLUDES += -isystem$(RIOTBASE)/pkg/wakaama/include +INCLUDES += -isystem$(PKGDIRBASE)/wakaama/include +INCLUDES += -isystem$(PKGDIRBASE)/wakaama/core +INCLUDES += -isystem$(PKGDIRBASE)/wakaama/data +INCLUDES += -isystem$(PKGDIRBASE)/wakaama/coap/er-coap-13 # NOTE: Use wakaama in client mode CFLAGS += -DLWM2M_CLIENT_MODE