mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-05 21:52:10 +01:00
build: make lists of boards with fw, bl and bu
Provide unique lists of boards for each type of build (fw, bl, bu) so we can refer to them in the help text.
This commit is contained in:
parent
0801495ce1
commit
6313a78dc9
23
Makefile
23
Makefile
@ -92,19 +92,19 @@ help:
|
|||||||
@echo " <board> - Build firmware for <board>"
|
@echo " <board> - Build firmware for <board>"
|
||||||
@echo " supported boards are ($(ALL_BOARDS))"
|
@echo " supported boards are ($(ALL_BOARDS))"
|
||||||
@echo " fw_<board> - Build firmware for <board>"
|
@echo " fw_<board> - Build firmware for <board>"
|
||||||
@echo " supported boards are ($(FW_TARGETS))"
|
@echo " supported boards are ($(FW_BOARDS))"
|
||||||
@echo " fw_<board>_clean - Remove firmware for <board>"
|
@echo " fw_<board>_clean - Remove firmware for <board>"
|
||||||
@echo " fw_<board>_program - Use OpenOCD + JTAG to write firmware to <board>"
|
@echo " fw_<board>_program - Use OpenOCD + JTAG to write firmware to <board>"
|
||||||
@echo
|
@echo
|
||||||
@echo " [Bootloader]"
|
@echo " [Bootloader]"
|
||||||
@echo " bl_<board> - Build bootloader for <board>"
|
@echo " bl_<board> - Build bootloader for <board>"
|
||||||
@echo " supported boards are ($(BL_TARGETS))"
|
@echo " supported boards are ($(BL_BOARDS))"
|
||||||
@echo " bl_<board>_clean - Remove bootloader for <board>"
|
@echo " bl_<board>_clean - Remove bootloader for <board>"
|
||||||
@echo " bl_<board>_program - Use OpenOCD + JTAG to write bootloader to <board>"
|
@echo " bl_<board>_program - Use OpenOCD + JTAG to write bootloader to <board>"
|
||||||
@echo
|
@echo
|
||||||
@echo " [Bootloader Updater]"
|
@echo " [Bootloader Updater]"
|
||||||
@echo " bu_<board> - Build bootloader updater for <board>"
|
@echo " bu_<board> - Build bootloader updater for <board>"
|
||||||
@echo " supported boards are ($(BU_TARGETS))"
|
@echo " supported boards are ($(BU_BOARDS))"
|
||||||
@echo " bu_<board>_clean - Remove bootloader updater for <board>"
|
@echo " bu_<board>_clean - Remove bootloader updater for <board>"
|
||||||
@echo
|
@echo
|
||||||
@echo " [Simulation]"
|
@echo " [Simulation]"
|
||||||
@ -403,14 +403,20 @@ pipxtreme_friendly := PipXtreme
|
|||||||
ins_friendly := INS
|
ins_friendly := INS
|
||||||
ahrs_friendly := AHRS
|
ahrs_friendly := AHRS
|
||||||
|
|
||||||
FW_TARGETS := $(addprefix fw_, $(ALL_BOARDS))
|
# Start out assuming that we'll build fw, bl and bu for all boards
|
||||||
BL_TARGETS := $(addprefix bl_, $(ALL_BOARDS))
|
FW_BOARDS := $(ALL_BOARDS)
|
||||||
BU_TARGETS := $(addprefix bu_, $(ALL_BOARDS))
|
BL_BOARDS := $(ALL_BOARDS)
|
||||||
|
BU_BOARDS := $(ALL_BOARDS)
|
||||||
|
|
||||||
# FIXME: The INS build doesn't have a bootloader or bootloader
|
# FIXME: The INS build doesn't have a bootloader or bootloader
|
||||||
# updater yet so we need to filter them out to prevent errors.
|
# updater yet so we need to filter them out to prevent errors.
|
||||||
BL_TARGETS := $(filter-out bl_ins, $(BL_TARGETS))
|
BL_BOARDS := $(filter-out ins, $(ALL_BOARDS))
|
||||||
BU_TARGETS := $(filter-out bu_ins, $(BU_TARGETS))
|
BU_BOARDS := $(filter-out ins, $(ALL_BOARDS))
|
||||||
|
|
||||||
|
# Generate the targets for whatever boards are left in each list
|
||||||
|
FW_TARGETS := $(addprefix fw_, $(FW_BOARDS))
|
||||||
|
BL_TARGETS := $(addprefix bl_, $(BL_BOARDS))
|
||||||
|
BU_TARGETS := $(addprefix bu_, $(BU_BOARDS))
|
||||||
|
|
||||||
.PHONY: all_fw all_fw_clean
|
.PHONY: all_fw all_fw_clean
|
||||||
all_fw: $(addsuffix _opfw, $(FW_TARGETS))
|
all_fw: $(addsuffix _opfw, $(FW_TARGETS))
|
||||||
@ -428,6 +434,7 @@ all_bu_clean: $(addsuffix _clean, $(BU_TARGETS))
|
|||||||
all_flight: all_fw all_bl all_bu
|
all_flight: all_fw all_bl all_bu
|
||||||
all_flight_clean: all_fw_clean all_bl_clean all_bu_clean
|
all_flight_clean: all_fw_clean all_bl_clean all_bu_clean
|
||||||
|
|
||||||
|
# Expand the groups of targets for each board
|
||||||
$(foreach board, $(ALL_BOARDS), $(eval $(call BOARD_PHONY_TEMPLATE,$(board))))
|
$(foreach board, $(ALL_BOARDS), $(eval $(call BOARD_PHONY_TEMPLATE,$(board))))
|
||||||
|
|
||||||
# Expand the bootloader updater rules
|
# Expand the bootloader updater rules
|
||||||
|
Loading…
x
Reference in New Issue
Block a user