From d98703e022adcb3d2bf7bbbbb6a2a89516fcbf81 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Fri, 19 Jul 2019 15:42:19 +0200 Subject: [PATCH] Do not download/build/clean libopencm3 directory when compiling for PC-hosted platforms. --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 358c6870..a3446b00 100644 --- a/Makefile +++ b/Makefile @@ -3,16 +3,28 @@ MFLAGS += --no-print-dir Q := @ endif +PC_HOSTED = +ifeq ($(PROBE_HOST), libftdi) + PC_HOSTED = true +endif +ifeq ($(PROBE_HOST), pc-stlinkv2) + PC_HOSTED = true +endif + all: +ifndef PC_HOSTED $(Q)if [ ! -f libopencm3/Makefile ]; then \ echo "Initialising git submodules..." ;\ git submodule init ;\ git submodule update ;\ fi $(Q)$(MAKE) $(MFLAGS) -C libopencm3 lib +endif $(Q)$(MAKE) $(MFLAGS) -C src clean: +ifndef PC_HOSTED $(Q)$(MAKE) $(MFLAGS) -C libopencm3 $@ +endif $(Q)$(MAKE) $(MFLAGS) -C src $@