diff --git a/firmware/rusefi_config.mk b/firmware/rusefi_config.mk index 8f299045f4..99eda46846 100644 --- a/firmware/rusefi_config.mk +++ b/firmware/rusefi_config.mk @@ -1,8 +1,23 @@ include $(PROJECT_DIR)/../java_tools/java_tools.mk -INI_FILE = $(META_OUTPUT_ROOT_FOLDER)tunerstudio/generated/rusefi_$(SHORT_BOARD_NAME).ini +INI_FILE = $(PROJECT_DIR)/$(META_OUTPUT_ROOT_FOLDER)tunerstudio/generated/rusefi_$(SHORT_BOARD_NAME).ini SIG_FILE = $(PROJECT_DIR)/tunerstudio/generated/signature_$(SHORT_BOARD_NAME).txt +CONFIG_INPUTS = \ + $(SIG_FILE) \ + $(PROJECT_DIR)/integration/rusefi_config.txt \ + $(PROJECT_DIR)/console/binary/generated/output_channels.ini \ + $(PROJECT_DIR)/console/binary/generated/data_logs.ini \ + $(PROJECT_DIR)/console/binary/generated/fancy_content.ini \ + $(PROJECT_DIR)/console/binary/generated/gauges.ini + +# Build the generated pin code only if the connector directory exists +ifneq ("$(wildcard $(BOARD_DIR)/connectors)","") + PIN_FILES = \ + $(PROJECT_DIR)/$(BOARD_DIR)/connectors/generated_outputs.h \ + $(PROJECT_DIR)/$(BOARD_DIR)/connectors/generated_ts_name_by_pin.cpp +endif + RAMDISK = \ $(PROJECT_DIR)/hw_layer/mass_storage/ramdisk_image.h \ $(PROJECT_DIR)/hw_layer/mass_storage/ramdisk_image_compressed.h @@ -11,9 +26,8 @@ CONFIG_FILES = \ $(INI_FILE) \ $(PROJECT_DIR)/controllers/generated/rusefi_generated_$(SHORT_BOARD_NAME).h \ $(PROJECT_DIR)/controllers/generated/signature_$(SHORT_BOARD_NAME).h \ - $(PROJECT_DIR)/$(BOARD_DIR)/connectors/generated_outputs.h \ - $(PROJECT_DIR)/$(BOARD_DIR)/connectors/generated_ts_name_by_pin.cpp \ - $(FIELDS) + $(FIELDS) \ + $(PIN_FILES) .FORCE: @@ -27,10 +41,11 @@ $(RAMDISK): .ramdisk-sentinel ; .ramdisk-sentinel: $(INI_FILE) bash $(PROJECT_DIR)/bin/gen_image_board.sh $(BOARD_DIR) $(SHORT_BOARD_NAME) + @touch $@ $(CONFIG_FILES): .config-sentinel ; -.config-sentinel: $(SIG_FILE) .FORCE +.config-sentinel: $(CONFIG_INPUTS) $(CONFIG_DEFINITION) ifneq (,$(CUSTOM_GEN_CONFIG)) bash $(BOARD_DIR)/$(CUSTOM_GEN_CONFIG) else