rusefi/firmware/rusefi.mk

67 lines
2.6 KiB
Makefile
Raw Normal View History

2018-12-15 21:55:03 -08:00
ifeq ("$(wildcard $(RULESFILE))","")
2021-07-05 07:57:40 -07:00
$(info Chibios: Invoking "git submodule update --init")
$(shell git submodule update --init)
$(info Invoked "git submodule update --init")
# make is not happy about newly checked out module for some reason but next invocation would work
$(error Please run 'make' again. Please make sure you have 'git' command in PATH)
endif
ifeq ("$(wildcard $(CHIBIOS_CONTRIB)/os/hal/hal.mk)","")
$(info Contrib: Invoking "git submodule update --init")
2018-12-22 20:24:57 -08:00
$(shell git submodule update --init)
$(info Invoked "git submodule update --init")
# make is not happy about newly checked out module for some reason but next invocation would work
2019-07-13 11:22:59 -07:00
$(error Please run 'make' again. Please make sure you have 'git' command in PATH)
2018-12-15 21:55:03 -08:00
endif
ifeq ($(PROJECT_BOARD),)
PROJECT_BOARD = st_stm32f4
2018-12-15 21:55:03 -08:00
endif
ifeq ($(PROJECT_CPU),)
PROJECT_CPU = ARCH_STM32F4
2018-12-15 21:55:03 -08:00
endif
-include $(PROJECT_DIR)/config/boards/$(PROJECT_BOARD)/config.mk
2018-12-15 21:55:03 -08:00
# CPU-dependent defs
ifeq ($(PROJECT_CPU),ARCH_STM32F7)
CPU_STARTUP = startup_stm32f7xx.mk
# next file is included through Contrib's platform.ml
#CPU_PLATFORM = $(CHIBIOS)/os/hal/ports/STM32/STM32F7xx/platform.mk
CPU_PLATFORM = ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/STM32F7xx/platform.mk
CPU_HWLAYER = ports/stm32/stm32f7
2021-02-05 17:00:44 -08:00
else ifeq ($(PROJECT_CPU),ARCH_STM32F4)
CPU_STARTUP = startup_stm32f4xx.mk
# next file is included through Contrib's platform.ml
#CPU_PLATFORM = $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
CPU_PLATFORM = ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/STM32F4xx/platform.mk
CPU_HWLAYER = ports/stm32/stm32f4
2021-02-05 17:14:29 -08:00
else ifeq ($(PROJECT_CPU),ARCH_STM32H7)
CPU_STARTUP = startup_stm32h7xx.mk
# next file is included through Contrib's platform.ml
#CPU_PLATFORM = $(CHIBIOS)/os/hal/ports/STM32/STM32H7xx/platform.mk
CPU_PLATFORM = ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/STM32H7xx/platform.mk
CPU_HWLAYER = ports/stm32/stm32h7
2021-02-05 17:14:29 -08:00
else ifeq ($(PROJECT_CPU),kinetis)
2021-02-24 18:55:51 -08:00
CPU_STARTUP_DIR = $(KINETIS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_ke1xf.mk
CPU_PLATFORM = $(KINETIS_CONTRIB)/os/hal/ports/KINETIS/KE1xF/platform.mk
2021-02-24 18:55:51 -08:00
CPU_HWLAYER = ports/kinetis
2021-02-05 17:14:29 -08:00
else ifeq ($(PROJECT_CPU),cypress)
2021-02-24 18:55:51 -08:00
CPU_STARTUP_DIR = $(CYPRESS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_S6E2CxAH.mk
CPU_PLATFORM = $(CYPRESS_CONTRIB)/os/hal/ports/Cypress/S6E2CxAH/platform.mk
2021-02-24 18:55:51 -08:00
CPU_HWLAYER = ports/cypress
else ifeq ($(PROJECT_CPU),simulator)
2021-02-05 17:00:44 -08:00
else
$(error Unexpected PROJECT_CPU)
2018-12-15 21:55:03 -08:00
endif
2018-12-26 19:43:52 -08:00
ifeq ($(CPU_STARTUP_DIR),)
CPU_STARTUP_DIR = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/$(CPU_STARTUP)
endif
ifeq ($(GENERATED_ENUMS_DIR),)
GENERATED_ENUMS_DIR = $(PROJECT_DIR)/controllers/algo
endif