Added targets for listing and building all valid target platforms to Makefile.
This commit is contained in:
parent
7aa8b623bd
commit
6da1b2e47a
14
Makefile
14
Makefile
|
@ -1090,6 +1090,16 @@ $(OBJECT_DIR)/$(TARGET)/%.o: %.S
|
||||||
## all : default task; compile C code, build firmware
|
## all : default task; compile C code, build firmware
|
||||||
all: binary
|
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 : clean up all temporary / machine-generated files
|
||||||
clean:
|
clean:
|
||||||
rm -f $(CLEAN_ARTIFACTS)
|
rm -f $(CLEAN_ARTIFACTS)
|
||||||
|
@ -1139,6 +1149,10 @@ help: Makefile
|
||||||
@echo ""
|
@echo ""
|
||||||
@sed -n 's/^## //p' $<
|
@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 : run the cleanflight test suite
|
||||||
test:
|
test:
|
||||||
cd src/test && $(MAKE) test || true
|
cd src/test && $(MAKE) test || true
|
||||||
|
|
Loading…
Reference in New Issue