From 8a840850883ba05ad3ab7732e9f3423ed99de7fb Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Thu, 30 Dec 2021 09:31:37 +0100 Subject: [PATCH] cpu/esp32: use INCLUDES as defined in pkg/esp32_sdk The include pathes for the ESP32 SDK are now defined by `pkg/esp32_sdk`. They can be used in Makefiles directly. --- cpu/esp32/Makefile.include | 7 ------- .../vendor/esp-idf/wpa_supplicant/port/Makefile | 12 ++++++------ .../esp-idf/wpa_supplicant/src/crypto/Makefile | 17 +++++++++-------- .../wpa_supplicant/src/wpa2/eap_peer/Makefile | 17 +++++++++-------- .../wpa_supplicant/src/wpa2/tls/Makefile | 17 +++++++++-------- .../wpa_supplicant/src/wpa2/utils/Makefile | 17 +++++++++-------- 6 files changed, 42 insertions(+), 45 deletions(-) diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index 85594d97aa98..1c5d66e41d54 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -26,17 +26,10 @@ INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/esp32 INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/heap INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/spi_flash INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/tcpip_adapter -INCLUDES += -I$(ESP32_SDK_DIR)/components/ -INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/esp32/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/heap/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/esp32/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/include INCLUDES += -I$(RIOTCPU)/$(CPU) ifneq (,$(filter esp_eth,$(USEMODULE))) INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/ethernet - INCLUDES += -I$(ESP32_SDK_DIR)/components/ethernet/include endif CFLAGS += -DSDK_NOT_USED -DCONFIG_FREERTOS_UNICORE=1 -DESP_PLATFORM diff --git a/cpu/esp32/vendor/esp-idf/wpa_supplicant/port/Makefile b/cpu/esp32/vendor/esp-idf/wpa_supplicant/port/Makefile index 4b3204e6a35b..16e355bce52c 100644 --- a/cpu/esp32/vendor/esp-idf/wpa_supplicant/port/Makefile +++ b/cpu/esp32/vendor/esp-idf/wpa_supplicant/port/Makefile @@ -4,13 +4,13 @@ include $(RIOTBASE)/Makefile.base # we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto # is found first -INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include CFLAGS += -D__ets__ include $(RIOTCPU)/$(CPU)/Makefile.include -INCLUDES += -I$(RIOTBASE)/core/include -INCLUDES += -I$(RIOTBASE)/drivers/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/include +# This converts INCLUDES to a simply evaluated variable instead of a recursively +# one but only for this module. +INCLUDES := $(PRE_INCLUDES) $(INCLUDES) diff --git a/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/crypto/Makefile b/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/crypto/Makefile index 7d7982674303..2f695b58fa50 100644 --- a/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/crypto/Makefile +++ b/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/crypto/Makefile @@ -4,15 +4,16 @@ include $(RIOTBASE)/Makefile.base # we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto # is found first -INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1 include $(RIOTCPU)/$(CPU)/Makefile.include -INCLUDES += -I$(RIOTBASE)/core/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log -INCLUDES += -I$(RIOTCPU)/$(CPU)/include +# This converts INCLUDES to a simply evaluated variable instead of a recursively +# one but only for this module. +INCLUDES := $(PRE_INCLUDES) $(INCLUDES) diff --git a/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/eap_peer/Makefile b/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/eap_peer/Makefile index 08b06f799ff4..0a283c17b5f8 100644 --- a/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/eap_peer/Makefile +++ b/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/eap_peer/Makefile @@ -4,16 +4,17 @@ include $(RIOTBASE)/Makefile.base # we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto # is found first -INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1 CFLAGS += -DEAP_PEER_METHOD -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MSCHAPv2 -DUSE_WPA2_TASK include $(RIOTCPU)/$(CPU)/Makefile.include -INCLUDES += -I$(RIOTBASE)/core/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log -INCLUDES += -I$(RIOTCPU)/$(CPU)/include +# This converts INCLUDES to a simply evaluated variable instead of a recursively +# one but only for this module. +INCLUDES := $(PRE_INCLUDES) $(INCLUDES) diff --git a/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/tls/Makefile b/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/tls/Makefile index 2cfbec160b34..eb9e4bffeb23 100644 --- a/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/tls/Makefile +++ b/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/tls/Makefile @@ -4,15 +4,16 @@ include $(RIOTBASE)/Makefile.base # we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto # is found first -INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1 include $(RIOTCPU)/$(CPU)/Makefile.include -INCLUDES += -I$(RIOTBASE)/core/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log -INCLUDES += -I$(RIOTCPU)/$(CPU)/include +# This converts INCLUDES to a simply evaluated variable instead of a recursively +# one but only for this module. +INCLUDES := $(PRE_INCLUDES) $(INCLUDES) diff --git a/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/utils/Makefile b/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/utils/Makefile index 589e299ab77f..6056f6e58a4f 100644 --- a/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/utils/Makefile +++ b/cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/utils/Makefile @@ -4,15 +4,16 @@ include $(RIOTBASE)/Makefile.base # we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto # is found first -INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include -INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa +PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include +PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1 include $(RIOTCPU)/$(CPU)/Makefile.include -INCLUDES += -I$(RIOTBASE)/core/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log -INCLUDES += -I$(RIOTCPU)/$(CPU)/include +# This converts INCLUDES to a simply evaluated variable instead of a recursively +# one but only for this module. +INCLUDES := $(PRE_INCLUDES) $(INCLUDES)