aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGareth McMullin2015-03-05 22:17:22 -0800
committerGareth McMullin2015-03-07 11:03:50 -0800
commit2b774102fe6a74be51ea4953170f256778970cb5 (patch)
tree98c03476db44ca3e932f17092416f0f0f3709235 /Makefile
parenta54e4c831cf62268ba43d16829fd366a2cb9fce9 (diff)
Initialise git submodules automatically on make if not done already.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e7e4348..5a8365e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,9 @@
all:
+ @if [ ! -f libopencm3/Makefile ]; then \
+ echo "Initialising git submodules..." ;\
+ git submodule init ;\
+ git submodule update ;\
+ fi
$(MAKE) -C libopencm3 lib
$(MAKE) -C src