diff --git a/Makefile b/Makefile index 471727bb..9effa35a 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 e739bc2f..a9f0848e 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 "