Added targets for listing and building all valid target platforms to Makefile.

This commit is contained in:
Michael Keller 2016-06-13 09:36:39 +12:00
parent b016d51473
commit dd06a5d29b
1 changed files with 14 additions and 0 deletions

View File

@ -968,6 +968,16 @@ $(OBJECT_DIR)/$(TARGET)/%.o: %.S
## all : default task; compile C code, build firmware
all: binary
## all_targets : build all valid target platforms
all_targets:
for build_target in $(VALID_TARGETS); do \
echo "Building $$build_target" && \
make clean && \
make -j TARGET=$$build_target || \
break; \
echo "Building $$build_target succeeded."; \
done
## clean : clean up all temporary / machine-generated files
clean:
rm -f $(CLEAN_ARTIFACTS)
@ -1017,6 +1027,10 @@ help: Makefile
@echo ""
@sed -n 's/^## //p' $<
## targets : print a list of all valid target platforms (for consumption by scripts)
targets:
@echo $(VALID_TARGETS)
## test : run the cleanflight test suite
test:
cd src/test && $(MAKE) test || true