diff --git a/sw/ext/Makefile b/sw/ext/Makefile index c3783d5f070..bd5ccd0000d 100644 --- a/sw/ext/Makefile +++ b/sw/ext/Makefile @@ -48,7 +48,7 @@ endif all: libopencm3.module stm32loader.module libopencm3.module: - $(Q)if [ ! -f $(PAPARAZZI_SRC)/libopencm3/Makefile ]; then \ + $(Q)if [ ! -f $(EXT_DIR)/libopencm3/Makefile ]; then \ cd $(PAPARAZZI_SRC); \ git submodule init; \ git submodule update; \ @@ -57,12 +57,12 @@ libopencm3.module: make -C libopencm3 lib PREFIX=$(PREFIX) stm32loader.module: - $(Q)if [ ! -f $(PAPARAZZI_SRC)/stm32loader/stm32loader/py ]; then \ - cd $(PAPARAZZI_SRC); \ - git submodule init; \ - git submodule update; \ - cd -; \ - fi + $(Q)if [ ! -f $(EXT_DIR)/stm32loader/stm32loader.py ]; then \ + cd $(PAPARAZZI_SRC); \ + git submodule init; \ + git submodule update; \ + cd -; \ + fi clean: if [ -f libopencm3/Makefile ]; then \