espressif: fix dependencies in esp-idf modules
while developing esp-camera I had the problem that firmware.elf was not regenerated if the only file I edited was in the esp32-camera submodule. By telling make that $(IDF_CMAKE_TARGETS), the list of .a fliles produced by ninja-building esp-idf, depend on esp-idf-stamp and that firmware.elf in turn depends on these files, the ninja build is re-run on each make, which is reasonably quick if nothing needs to be rebuilt.
This commit is contained in:
parent
cfbfd53b00
commit
2b0f1cd087
@ -446,11 +446,13 @@ else
|
||||
all: $(BUILD)/firmware.bin
|
||||
endif
|
||||
|
||||
$(IDF_CMAKE_TARGETS): esp-idf-stamp
|
||||
|
||||
.PHONY: esp-idf-stamp
|
||||
esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
$(Q)ninja -C $(BUILD)/esp-idf $(IDF_CMAKE_TARGETS)
|
||||
|
||||
$(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp
|
||||
$(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp $(IDF_CMAKE_TARGETS)
|
||||
$(STEPECHO) "LINK $@"
|
||||
$(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(BUILD)/esp-idf/esp-idf/newlib/libnewlib.a -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -Wl,--start-group $(LIBS) -Wl,--end-group $(BUILD)/esp-idf/esp-idf/pthread/libpthread.a -u __cxx_fatal_exception
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user