Added per-MCU-type build targets.
This commit is contained in:
parent
4d53c3a5d7
commit
5c16c50826
30
Makefile
30
Makefile
|
@ -476,6 +476,36 @@ targets:
|
|||
@echo "targets-group-rest: $(words $(GROUP_OTHER_TARGETS)) targets"
|
||||
@echo "total in all groups $(words $(SUPPORTED_TARGETS)) targets"
|
||||
|
||||
## target-mcu : print the MCU type of the target
|
||||
target-mcu:
|
||||
@echo $(TARGET_MCU)
|
||||
|
||||
## targets-by-mcu : make all targets that have a MCU_TYPE mcu
|
||||
targets-by-mcu:
|
||||
@echo "Building all $(MCU_TYPE) targets..."
|
||||
$(V1) for target in $(VALID_TARGETS); do \
|
||||
TARGET_MCU_TYPE=$$($(MAKE) -s TARGET=$${target} target-mcu); \
|
||||
if [ "$${TARGET_MCU_TYPE}" = "$${MCU_TYPE}" ]; then \
|
||||
$(MAKE) TARGET=$${target}; \
|
||||
if [ $$? -ne 0 ]; then \
|
||||
echo "Building $${target} failed, aborting."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
## targets-f3 : make all F3 targets
|
||||
targets-f3:
|
||||
$(V1) $(MAKE) -s targets-by-mcu MCU_TYPE=STM32F3
|
||||
|
||||
## targets-f4 : make all F4 targets
|
||||
targets-f4:
|
||||
$(V1) $(MAKE) -s targets-by-mcu MCU_TYPE=STM32F4
|
||||
|
||||
## targets-f7 : make all F7 targets
|
||||
targets-f7:
|
||||
$(V1) $(MAKE) -s targets-by-mcu MCU_TYPE=STM32F7
|
||||
|
||||
## test : run the cleanflight test suite
|
||||
## junittest : run the cleanflight test suite, producing Junit XML result files.
|
||||
test junittest:
|
||||
|
|
Loading…
Reference in New Issue