2015-07-10 06:01:56 -07:00
|
|
|
##############################################################################
|
|
|
|
# Build global options
|
|
|
|
# NOTE: Can be overridden externally.
|
|
|
|
#
|
|
|
|
|
2021-05-06 07:04:21 -07:00
|
|
|
PROJECT_DIR = ../firmware
|
|
|
|
UNIT_TESTS_DIR=$(PROJECT_DIR)/../unit_tests
|
2019-08-25 17:15:14 -07:00
|
|
|
|
2024-05-01 16:33:39 -07:00
|
|
|
US_TO_NT_MULTIPLIER = 100
|
|
|
|
|
2024-08-02 00:07:21 -07:00
|
|
|
BOARDS_DIR = $(PROJECT_DIR)/config/boards
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
# Imported source files and paths
|
2020-05-25 10:42:55 -07:00
|
|
|
include $(PROJECT_DIR)/console/console.mk
|
2020-11-15 08:55:26 -08:00
|
|
|
include $(PROJECT_DIR)/console/binary/tunerstudio.mk
|
2021-05-06 07:04:21 -07:00
|
|
|
include $(UNIT_TESTS_DIR)/test.mk
|
|
|
|
include $(UNIT_TESTS_DIR)/tests/tests.mk
|
2021-05-07 19:14:22 -07:00
|
|
|
include $(PROJECT_DIR)/../unit_tests/tests/util/test_util.mk
|
2022-01-06 16:02:35 -08:00
|
|
|
include $(PROJECT_DIR)/common.mk
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2024-08-01 13:45:04 -07:00
|
|
|
ifneq ("$(wildcard $(BOARD_DIR)/board_unit_tests.mk)","")
|
2024-08-02 00:07:21 -07:00
|
|
|
# could depend on BOARDS_DIR
|
2024-08-01 13:45:04 -07:00
|
|
|
include $(BOARD_DIR)/board_unit_tests.mk
|
|
|
|
endif
|
|
|
|
|
2022-07-15 23:22:51 -07:00
|
|
|
RUSEFI_LIB = $(PROJECT_DIR)/libfirmware
|
|
|
|
include $(RUSEFI_LIB)/util/util.mk
|
2022-08-08 05:53:08 -07:00
|
|
|
include $(RUSEFI_LIB)/pt2001/pt2001.mk
|
2022-07-15 23:22:51 -07:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
|
|
|
# setting.
|
2021-05-07 19:14:22 -07:00
|
|
|
CSRC += $(ALLCSRC) \
|
2022-08-08 05:53:08 -07:00
|
|
|
$(RUSEFI_LIB_C) \
|
2019-03-12 07:12:37 -07:00
|
|
|
$(HW_LAYER_DRIVERS_CORE) \
|
2015-07-10 06:01:56 -07:00
|
|
|
$(TEST_SRC_C)
|
|
|
|
|
|
|
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
|
|
|
# setting.
|
2021-05-07 19:14:22 -07:00
|
|
|
CPPSRC += $(ALLCPPSRC) \
|
2021-05-16 22:42:56 -07:00
|
|
|
$(HW_LAYER_DRIVERS_CORE_CPP) \
|
2019-06-15 13:43:30 -07:00
|
|
|
$(FRAMEWORK_SRC_CPP) \
|
|
|
|
$(TESTS_SRC_CPP) \
|
2021-04-04 19:41:38 -07:00
|
|
|
$(DEVELOPMENT_DIR)/engine_sniffer.cpp \
|
2022-11-06 08:28:25 -08:00
|
|
|
$(DEVELOPMENT_DIR)/sensor_chart.cpp \
|
2022-03-15 10:05:24 -07:00
|
|
|
$(CONSOLE_COMMON_SRC_CPP) \
|
2022-02-03 08:24:31 -08:00
|
|
|
$(PROJECT_DIR)/config/boards/hellen/hellen_board_id.cpp \
|
2022-08-21 19:31:52 -07:00
|
|
|
$(PROJECT_DIR)/hw_layer/drivers/can/can_hw.cpp \
|
2022-01-06 18:48:48 -08:00
|
|
|
$(PROJECT_DIR)/../unit_tests/logicdata.cpp \
|
|
|
|
$(PROJECT_DIR)/../unit_tests/main.cpp \
|
|
|
|
$(PROJECT_DIR)/../unit_tests/global_mocks.cpp \
|
2021-10-30 17:31:09 -07:00
|
|
|
$(PROJECT_DIR)/../unit_tests/mocks.cpp \
|
2023-08-30 20:11:24 -07:00
|
|
|
$(RUSEFI_LIB)/mock/lib-time-mocks.cpp \
|
2022-07-15 23:22:51 -07:00
|
|
|
$(RUSEFI_LIB_CPP) \
|
2022-07-16 21:16:22 -07:00
|
|
|
$(RUSEFI_LIB_CPP_TEST) \
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2021-07-25 18:23:23 -07:00
|
|
|
INCDIR += \
|
|
|
|
$(PCH_DIR) \
|
2024-08-02 17:00:59 -07:00
|
|
|
$(BOARDINC) \
|
2021-07-25 18:23:23 -07:00
|
|
|
$(UNIT_TESTS_DIR) \
|
2021-04-28 19:41:25 -07:00
|
|
|
$(ALLINC) \
|
2022-02-03 08:24:31 -08:00
|
|
|
$(PROJECT_DIR)/config/boards/hellen \
|
2023-08-08 17:11:24 -07:00
|
|
|
$(FRAMEWORK_INC) \
|
2021-05-06 07:04:21 -07:00
|
|
|
$(UNIT_TESTS_DIR)/test_data_structures \
|
2021-05-15 02:27:33 -07:00
|
|
|
$(UNIT_TESTS_DIR)/chibios-mock \
|
2022-02-26 13:19:57 -08:00
|
|
|
$(UNIT_TESTS_DIR)/native \
|
2021-05-06 07:09:18 -07:00
|
|
|
$(UNIT_TESTS_DIR)/tests \
|
|
|
|
$(UNIT_TESTS_DIR)/tests/sensor \
|
2022-07-15 23:22:51 -07:00
|
|
|
$(UNIT_TESTS_DIR)/test_basic_math \
|
|
|
|
$(RUSEFI_LIB_INC) \
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2021-05-06 13:33:10 -07:00
|
|
|
include $(UNIT_TESTS_DIR)/unit_test_rules.mk
|