From f97047b5f59bde6d02aa9483f4e3a63008f1c2af Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Fri, 3 Jun 2022 17:32:24 -0700 Subject: [PATCH] build: Added all_platforms target to toplevel Makefile The src level all_platforms target now also checks for locm3 existence as well as triggers build of the needed locm3 libraries. --- Makefile | 5 +++++ src/Makefile | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 471727b..9effa35 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,14 @@ ifndef NO_LIBOPENCM3 endif $(Q)$(MAKE) $(MFLAGS) -C src +all_platforms: + $(Q)$(MAKE) $(MFLAGS) -C src $@ + + clean: ifndef NO_LIBOPENCM3 $(Q)$(MAKE) $(MFLAGS) -C libopencm3 $@ endif $(Q)$(MAKE) $(MFLAGS) -C src $@ +.PHONY: clean all_platforms diff --git a/src/Makefile b/src/Makefile index e739bc2..a9f0848 100644 --- a/src/Makefile +++ b/src/Makefile @@ -136,6 +136,12 @@ clean: host_clean -$(Q)$(RM) platforms/*/*.o platforms/*/*.d mapfile include/version.h all_platforms: + $(Q)if [ ! -f ../libopencm3/Makefile ]; then \ + echo "Initialising git submodules..." ;\ + git submodule init ;\ + git submodule update ;\ + fi + $(Q)$(MAKE) $(MFLAGS) -C ../libopencm3 lib/stm32/f1 lib/stm32/f4 lib/lm4f $(Q)set -e ;\ mkdir -p artifacts/$(shell git describe --always --dirty --tags) ;\ echo "