diff --git a/Makefile.include b/Makefile.include index 5f7abb1fc0..39a5086b71 100644 --- a/Makefile.include +++ b/Makefile.include @@ -229,7 +229,7 @@ export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-) # Add standard include directories INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include INCLUDES += -I$(RIOTCPU)/$(CPU)/include -INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include +INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/$(BOARD)/include)) # process provided features -include $(RIOTBOARD)/$(BOARD)/Makefile.features diff --git a/makefiles/cflags.inc.mk b/makefiles/cflags.inc.mk index b35ddc98c5..34f878b79b 100644 --- a/makefiles/cflags.inc.mk +++ b/makefiles/cflags.inc.mk @@ -60,6 +60,9 @@ CFLAGS += -fno-common # Enable all default warnings CFLAGS += -Wall +# Warn if a user-supplied include directory does not exist. +CFLAGS += -Wmissing-include-dirs + ifeq (,$(filter -DDEVELHELP,$(CFLAGS))) ifneq (1,$(FORCE_ASSERTS)) CFLAGS += -DNDEBUG diff --git a/pkg/libcoap/Makefile.include b/pkg/libcoap/Makefile.include index 73dd7ce3ce..969fda2c67 100644 --- a/pkg/libcoap/Makefile.include +++ b/pkg/libcoap/Makefile.include @@ -1,3 +1,2 @@ INCLUDES += -I$(PKGDIRBASE)/libcoap \ - -I$(RIOTBASE)/sys/posix/include \ - -I$(RIOTBASE)/sys/net/include + -I$(RIOTBASE)/sys/posix/include diff --git a/pkg/openthread/Makefile.include b/pkg/openthread/Makefile.include index b4eebf4365..7fd2ba782f 100644 --- a/pkg/openthread/Makefile.include +++ b/pkg/openthread/Makefile.include @@ -1,7 +1,6 @@ OPENTHREAD_DIR = $(RIOTBASE)/pkg/openthread INCLUDES += -I$(OPENTHREAD_DIR)/include \ - -I$(OPENTHREAD_DIR)/include/openthread \ -I$(BINDIRBASE)/pkg/$(BOARD)/openthread/output/include \ -I$(BINDIRBASE)/pkg/$(BOARD)/openthread/include/openthread \ diff --git a/pkg/tiny-asn1/Makefile b/pkg/tiny-asn1/Makefile index 61a4bfbaec..3fa3640e9e 100644 --- a/pkg/tiny-asn1/Makefile +++ b/pkg/tiny-asn1/Makefile @@ -3,9 +3,6 @@ PKG_URL = https://gitlab.com/mtausig/tiny-asn1.git PKG_VERSION = 82e3a26273900b532e33e5b377f193fa08ee7d1b PKG_LICENSE = LGPL-3 -export TINYASN1_ROOT=$(CURDIR) -INCLUDES+=-I$(TINYASN1_ROOT)/src - .PHONY: all all: git-download diff --git a/sys/Makefile.include b/sys/Makefile.include index baa5e0b298..55aa6793dc 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -6,10 +6,6 @@ ifneq (,$(filter cbor,$(USEMODULE))) USEMODULE_INCLUDES += $(RIOTBASE)/sys/cbor/include endif -ifneq (,$(filter crypto,$(USEMODULE))) - USEMODULE_INCLUDES += $(RIOTBASE)/include/crypto -endif - ifneq (,$(filter fib,$(USEMODULE))) USEMODULE_INCLUDES += $(RIOTBASE)/sys/posix/include endif