1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/esp32_sdk: add requirements to PKG_PREPARE

The shared `build-libs` directory needs to be available for
modules/packages that depend on the SDK before that package
is eventually compiled.

This also includes header files such as `esp32_idf_version.h`.

Packages are downloaded, patched, prepared before any module
is compiled. By adding the directory creation and header as
a dependency of `PKG_PREPARE` we make sure the rules are ran
before compilation starts.
This commit is contained in:
NikLeberg 2022-01-28 12:41:18 +00:00 committed by Francisco Molina
parent 044701d3cc
commit 18dca48510

View File

@ -20,11 +20,13 @@ ESP32_SDK_LIBS = $(addprefix $(ESP32_SDK_BUILD_DIR)/, $(ESP32_SDK_COMPONENT_LIBS
all: $(ESP32_SDK_LIBS) $(ESP32_SDK_VER_FILE)
$(ESP32_SDK_BUILD_DIR):
$(PKG_PREPARED): $(ESP32_SDK_BUILD_DIR) $(ESP32_SDK_VER_FILE)
$(ESP32_SDK_BUILD_DIR): $(PKG_PATCHED)
$(Q)mkdir -p $(ESP32_SDK_BUILD_DIR)
# Set the SDK version from the SDK hash/tag. For example "v3.1-51-g913a06a9".
$(ESP32_SDK_VER_FILE):
$(ESP32_SDK_VER_FILE): $(PKG_PATCHED) | $(ESP32_SDK_BUILD_DIR)
$(Q)echo "#define IDF_VER \"$(ESP32_SDK_VER_CMD)\"" > $@
$(ESP32_SDK_BUILD_DIR)/lib%.a: \