From 198911b52db2dd2f516c2e38f81a08a1557ba34e Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Wed, 16 Jan 2019 13:41:44 -0800 Subject: Enumerate MEE boards and programs Make targets `list-boards` and `list-programs` will enumerate the available boards and programs for use with Freedom Metal Signed-off-by: Nathaniel Graff --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8ac9564..120c9a4 100644 --- a/Makefile +++ b/Makefile @@ -102,6 +102,24 @@ help: .PHONY: clean clean: +############################################################# +# Enumerate MEE BSPs and Programs +############################################################# + +ifeq ($(BSP),mee) + +# MEE boards are any folders that aren't the Legacy BSP or update-targets.sh +EXCLUDE_BOARD_DIRS = drivers env include libwrap update-targets.sh +list-boards: + @echo $(sort $(filter-out $(EXCLUDE_BOARD_DIRS),$(notdir $(wildcard bsp/*)))) + + +# MEE programs are any submodules in the software folder +list-programs: + @echo $(shell grep -o '= software/.*$$' .gitmodules | sed -r 's/.*\///') + +endif + ############################################################# # Compiles an instance of the MEE targeted at $(BOARD) ############################################################# -- cgit v1.2.1-18-gbd029