summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-01-16 13:41:44 -0800
committerNathaniel Graff <nathaniel.graff@sifive.com>2019-01-18 10:22:29 -0800
commit198911b52db2dd2f516c2e38f81a08a1557ba34e (patch)
tree10be8809528de2fbd51e461ec962bd698fefbd4f
parent2a379b789c1bcba4934e0fe1da4017f07bc703be (diff)
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 <nathaniel.graff@sifive.com>
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8ac9564..120c9a4 100644
--- a/Makefile
+++ b/Makefile
@@ -103,6 +103,24 @@ help:
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)
#############################################################
ifeq ($(BSP),mee)