Changed make target for 'all' to not include unsupported, added 'all_with_unsupported' (formerly 'all') and 'unsupported' targets.

This commit is contained in:
Michael Keller 2017-10-18 09:46:02 +13:00
parent e6fdd266e0
commit 5ae3933db4
2 changed files with 32 additions and 25 deletions

View File

@ -16,7 +16,7 @@
# #
# The target to build, see VALID_TARGETS below # The target to build, see VALID_TARGETS below
TARGET ?= NAZE TARGET ?= BETAFLIGHTF3
# Compile-time options # Compile-time options
OPTIONS ?= OPTIONS ?=
@ -315,8 +315,14 @@ $(OBJECT_DIR)/$(TARGET)/%.o: %.S
$(V1) $(CROSS_CC) -c -o $@ $(ASFLAGS) $< $(V1) $(CROSS_CC) -c -o $@ $(ASFLAGS) $<
## all : Build all valid targets ## all : Build all targets (excluding unsupported)
all: $(VALID_TARGETS) all: $(SUPPORTED_TARGETS)
## all_with_unsupported : Build all targets (excluding unsupported)
all_with_unsupported: $(VALID_TARGETS)
## unsupported : Build unsupported targets
unsupported: $(UNSUPPORTED_TARGETS)
## official : Build all official (travis) targets ## official : Build all official (travis) targets
official: $(OFFICIAL_TARGETS) official: $(OFFICIAL_TARGETS)
@ -333,9 +339,6 @@ targets-group-3: $(GROUP_3_TARGETS)
## targets-group-3 : build some targets ## targets-group-3 : build some targets
targets-group-4: $(GROUP_4_TARGETS) targets-group-4: $(GROUP_4_TARGETS)
## targets-legacy : build legacy targets
targets-legacy: $(LEGACY_TARGETS)
## targets-group-rest: build the rest of the targets (not listed in group 1, 2 or 3) ## targets-group-rest: build the rest of the targets (not listed in group 1, 2 or 3)
targets-group-rest: $(GROUP_OTHER_TARGETS) targets-group-rest: $(GROUP_OTHER_TARGETS)
@ -445,14 +448,16 @@ help: Makefile make/tools.mk
## targets : print a list of all valid target platforms (for consumption by scripts) ## targets : print a list of all valid target platforms (for consumption by scripts)
targets: targets:
$(V0) @echo "Valid targets: $(VALID_TARGETS)" $(V0) @echo "Valid targets: $(VALID_TARGETS)"
$(V0) @echo "Target: $(TARGET)" $(V0) @echo "Supported targets: $(SUPPORTED_TARGETS)"
$(V0) @echo "Base target: $(BASE_TARGET)" $(V0) @echo "Unsupported targets: $(UNSUPPORTED_TARGETS)"
$(V0) @echo "targets-group-1: $(GROUP_1_TARGETS)" $(V0) @echo "Target: $(TARGET)"
$(V0) @echo "targets-group-2: $(GROUP_2_TARGETS)" $(V0) @echo "Base target: $(BASE_TARGET)"
$(V0) @echo "targets-group-3: $(GROUP_3_TARGETS)" $(V0) @echo "targets-group-1: $(GROUP_1_TARGETS)"
$(V0) @echo "targets-group-4: $(GROUP_4_TARGETS)" $(V0) @echo "targets-group-2: $(GROUP_2_TARGETS)"
$(V0) @echo "targets-group-rest: $(GROUP_OTHER_TARGETS)" $(V0) @echo "targets-group-3: $(GROUP_3_TARGETS)"
$(V0) @echo "targets-group-4: $(GROUP_4_TARGETS)"
$(V0) @echo "targets-group-rest: $(GROUP_OTHER_TARGETS)"
## test : run the cleanflight test suite ## test : run the cleanflight test suite
## junittest : run the cleanflight test suite, producing Junit XML result files. ## junittest : run the cleanflight test suite, producing Junit XML result files.

View File

@ -15,6 +15,18 @@ ALTERNATES := $(sort $(filter-out target, $(basename $(notdir $(wildcard $(RO
$(error The target specified, $(TARGET), cannot be built. Use one of the ALT targets: $(ALTERNATES)) $(error The target specified, $(TARGET), cannot be built. Use one of the ALT targets: $(ALTERNATES))
endif endif
UNSUPPORTED_TARGETS := \
AFROMINI \
ALIENFLIGHTF1 \
BEEBRAIN \
CC3D \
CC3D_OPBL \
CJMCU \
MICROSCISKY \
NAZE
SUPPORTED_TARGETS := $(filter-out $(UNSUPPORTED_TARGETS), $(VALID_TARGETS))
GROUP_1_TARGETS := \ GROUP_1_TARGETS := \
AIORACERF3 \ AIORACERF3 \
AIR32 \ AIR32 \
@ -98,17 +110,7 @@ GROUP_4_TARGETS := \
STM32F3DISCOVERY \ STM32F3DISCOVERY \
TINYBEEF3 TINYBEEF3
LEGACY_TARGETS := \ GROUP_OTHER_TARGETS := $(filter-out $(GROUP_1_TARGETS) $(GROUP_2_TARGETS) $(GROUP_3_TARGETS) $(GROUP_4_TARGETS), $(SUPPORTED_TARGETS))
AFROMINI \
ALIENFLIGHTF1 \
BEEBRAIN \
CC3D \
CC3D_OPBL \
CJMCU \
MICROSCISKY \
NAZE
GROUP_OTHER_TARGETS := $(filter-out $(GROUP_1_TARGETS) $(GROUP_2_TARGETS) $(GROUP_3_TARGETS) $(GROUP_4_TARGETS) $(LEGACY_TARGETS), $(VALID_TARGETS))
ifeq ($(filter $(TARGET),$(ALT_TARGETS)), $(TARGET)) ifeq ($(filter $(TARGET),$(ALT_TARGETS)), $(TARGET))
BASE_TARGET := $(firstword $(subst /,, $(subst ./src/main/target/,, $(dir $(wildcard $(ROOT)/src/main/target/*/$(TARGET).mk))))) BASE_TARGET := $(firstword $(subst /,, $(subst ./src/main/target/,, $(dir $(wildcard $(ROOT)/src/main/target/*/$(TARGET).mk)))))