1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Merge pull request #503 from AndersHoglund/build_cleanup

Removed top_makefile.
This commit is contained in:
J Blackman 2016-06-14 20:55:22 +10:00 committed by GitHub
commit 6635ce68da
2 changed files with 9 additions and 76 deletions

View file

@ -658,15 +658,14 @@ $(OBJECT_DIR)/$(TARGET)/%.o: %.S
@$(CC) -c -o $@ $(ASFLAGS) $<
## all : default task; compile C code, build firmware
all:
for build_target in $(VALID_TARGETS); do \
## all : Build all valid targets
all: $(VALID_TARGETS)
$(VALID_TARGETS):
echo "" && \
echo "Building $$build_target" && \
$(MAKE) -j binary hex TARGET=$$build_target || \
break; \
echo "Building $$build_target succeeded."; \
done
echo "Building $@" && \
$(MAKE) -j binary hex TARGET=$@ && \
echo "Building $@ succeeded."
## clean : clean up all temporary / machine-generated files
clean:
@ -725,6 +724,8 @@ help: Makefile
@echo ""
@echo "Usage:"
@echo " make [TARGET=<target>] [OPTIONS=\"<options>\"]"
@echo "Or:"
@echo " make <target> [OPTIONS=\"<options>\"]"
@echo ""
@echo "Valid TARGET values are: $(VALID_TARGETS)"
@echo ""

View file

@ -1,68 +0,0 @@
ALL_TARGETS := naze
ALL_TARGETS += cc3d
ALL_TARGETS += cc3d_opbl
ALL_TARGETS += spracingf3
ALL_TARGETS += spracingf3evo
ALL_TARGETS += spracingf3mini
ALL_TARGETS += sparky
ALL_TARGETS += alienflightf1
ALL_TARGETS += alienflightf3
ALL_TARGETS += colibri_race
ALL_TARGETS += lux_race
ALL_TARGETS += motolab
ALL_TARGETS += rmdo
ALL_TARGETS += ircfusionf3
ALL_TARGETS += afromini
ALL_TARGETS += doge
ALL_TARGETS += singularity
CLEAN_TARGETS := $(addprefix clean_, $(ALL_TARGETS))
clean_naze naze : opts := TARGET=NAZE
clean_cc3d cc3d: opts := TARGET=CC3D
clean_cc3d_opbl cc3d_opbl : opts := TARGET=CC3D_OPBL
clean_spracingf3mini spracingf3mini : opts := TARGET=SPRACINGF3MINI
clean_spracingf3 spracingf3 : opts := TARGET=SPRACINGF3
clean_spracingf3evo spracingf3evo : opts := TARGET=SPRACINGF3EVO
clean_sparky sparky : opts := TARGET=SPARKY
clean_alienflightf1 alienflightf1 : opts := TARGET=ALIENFLIGHTF1
clean_alienflightf3 alienflightf3 : opts := TARGET=ALIENFLIGHTF3
clean_colibri_race colibri_race : opts := TARGET=COLIBRI_RACE
clean_lux_race lux_race : opts := TARGET=LUX_RACE
clean_motolab motolab : opts := TARGET=MOTOLAB
clean_rmdo rmdo : opts := TARGET=RMDO
clean_ircfusionf3 ircfusionf3 : opts := TARGET=IRCFUSIONF3
clean_afromini afromini : opts := TARGET=AFROMINI
clean_doge doge : opts := TARGET=DOGE
clean_singularity singularity : opts := TARGET=SINGULARITY
.PHONY: all clean
all: everything
clean: clean_everything
.PHONY: clean_everything
clean_everything: $(CLEAN_TARGETS)
.PHONY: everything
everything: $(ALL_TARGETS)
.PHONY:$(ALL_TARGETS)
$(ALL_TARGETS):
make -f Makefile hex binary $(opts)
.PHONY: $(CLEAN_TARGETS)
$(CLEAN_TARGETS):
make -f Makefile clean $(opts)
.PHONY: help
help:
@echo "This is your new top makefile. synopsis: make <target>" .
@echo "Valid targets":
@echo "all"
@echo "clean"
@echo "$(ALL_TARGETS)"
@echo "$(CLEAN_TARGETS)"