2024-02-26 19:18:56 -08:00
|
|
|
include $(PROJECT_DIR)/../java_tools/java_tools.mk
|
2024-02-09 05:21:42 -08:00
|
|
|
|
2024-02-09 19:12:24 -08:00
|
|
|
INI_FILE = $(PROJECT_DIR)/$(META_OUTPUT_ROOT_FOLDER)tunerstudio/generated/rusefi_$(SHORT_BOARD_NAME).ini
|
2024-02-07 15:28:56 -08:00
|
|
|
SIG_FILE = $(PROJECT_DIR)/tunerstudio/generated/signature_$(SHORT_BOARD_NAME).txt
|
2024-02-06 19:17:06 -08:00
|
|
|
|
2024-02-09 19:12:24 -08:00
|
|
|
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
|
|
|
|
|
2024-02-28 13:02:07 -08:00
|
|
|
RAMDISK = \
|
|
|
|
$(PROJECT_DIR)/hw_layer/mass_storage/ramdisk_image.h \
|
|
|
|
$(PROJECT_DIR)/hw_layer/mass_storage/ramdisk_image_compressed.h
|
|
|
|
|
2024-02-06 19:17:06 -08:00
|
|
|
CONFIG_FILES = \
|
2024-02-28 13:02:07 -08:00
|
|
|
$(INI_FILE) \
|
2024-02-28 05:36:50 -08:00
|
|
|
$(PROJECT_DIR)/controllers/generated/rusefi_generated_$(SHORT_BOARD_NAME).h \
|
2024-02-06 19:17:06 -08:00
|
|
|
$(PROJECT_DIR)/controllers/generated/signature_$(SHORT_BOARD_NAME).h \
|
2024-02-09 19:12:24 -08:00
|
|
|
$(FIELDS) \
|
|
|
|
$(PIN_FILES)
|
2024-02-06 19:17:06 -08:00
|
|
|
|
|
|
|
.FORCE:
|
|
|
|
|
2024-02-07 15:28:56 -08:00
|
|
|
$(TCOBJS): $(CONFIG_FILES)
|
2024-02-28 13:02:07 -08:00
|
|
|
$(TCPPOBJS): $(RAMDISK)
|
2024-02-07 15:28:56 -08:00
|
|
|
|
|
|
|
$(SIG_FILE): .FORCE
|
|
|
|
bash $(PROJECT_DIR)/gen_signature.sh $(SHORT_BOARD_NAME)
|
2024-02-06 19:17:06 -08:00
|
|
|
|
2024-02-28 19:46:19 -08:00
|
|
|
.target-sentinel: .FORCE
|
|
|
|
if [ "$$(cat $@ 2>/dev/null)" != $(SHORT_BOARD_NAME) ]; then \
|
|
|
|
echo $(SHORT_BOARD_NAME) >$@; fi
|
|
|
|
|
2024-02-28 13:02:07 -08:00
|
|
|
$(RAMDISK): .ramdisk-sentinel ;
|
|
|
|
|
2024-02-28 19:46:19 -08:00
|
|
|
.ramdisk-sentinel: $(INI_FILE) .target-sentinel
|
2024-02-28 13:02:07 -08:00
|
|
|
bash $(PROJECT_DIR)/bin/gen_image_board.sh $(BOARD_DIR) $(SHORT_BOARD_NAME)
|
2024-02-09 19:12:24 -08:00
|
|
|
@touch $@
|
2024-02-28 13:02:07 -08:00
|
|
|
|
2024-02-06 19:17:06 -08:00
|
|
|
$(CONFIG_FILES): .config-sentinel ;
|
|
|
|
|
2024-02-28 19:46:19 -08:00
|
|
|
.config-sentinel: $(CONFIG_INPUTS) $(CONFIG_DEFINITION) .target-sentinel
|
2024-02-06 19:17:06 -08:00
|
|
|
ifneq (,$(CUSTOM_GEN_CONFIG))
|
2024-02-26 19:18:56 -08:00
|
|
|
bash $(BOARD_DIR)/$(CUSTOM_GEN_CONFIG)
|
2024-02-06 19:17:06 -08:00
|
|
|
else
|
|
|
|
bash $(PROJECT_DIR)/gen_config_board.sh $(BOARD_DIR) $(SHORT_BOARD_NAME)
|
|
|
|
endif
|
|
|
|
@touch $@
|