diff --git a/conf/Makefile.lpc21 b/conf/Makefile.lpc21 index 26c8a2fe32..9f29195229 100644 --- a/conf/Makefile.lpc21 +++ b/conf/Makefile.lpc21 @@ -32,7 +32,7 @@ SRC_ARCH = arch/lpc21 # Define programs and commands. -HAVE_ARM_NONE_EABI_GCC := $(wildcard /usr/bin/arm-none-eabi-gcc) +HAVE_ARM_NONE_EABI_GCC := $(shell which arm-none-eabi-gcc) ifeq ($(strip $(HAVE_ARM_NONE_EABI_GCC)),) CC = arm-elf-gcc LD = $(CC) diff --git a/conf/Makefile.stm32 b/conf/Makefile.stm32 index c9271cde7d..c361279f28 100644 --- a/conf/Makefile.stm32 +++ b/conf/Makefile.stm32 @@ -38,7 +38,7 @@ OPT = s #OPT = 0 # Programs location -TOOLCHAIN_DIR=/opt/paparazzi/stm32 +TOOLCHAIN_DIR=$(shell find -L /opt/paparazzi/stm32 ~/sat -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1 | xargs dirname ) GCC_BIN_DIR=$(TOOLCHAIN_DIR)/bin GCC_LIB_DIR=$(TOOLCHAIN_DIR)/arm-none-eabi/lib