From 3a275fb6017f7de90ce393bbb1e68b04afa48d30 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Wed, 21 Oct 2015 15:15:56 +0000 Subject: [PATCH] make: respect OPENCM3_DIR variable When checking for the existing of the library, respect the variable that's defined instead of checking a hardcoded path. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fe881dc..1240200 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ images: build build: lib examples lib: - $(Q)if [ ! "`ls -A libopencm3`" ] ; then \ + $(Q)if [ ! "`ls -A $(OPENCM3_DIR)`" ] ; then \ printf "######## ERROR ########\n"; \ printf "\tlibopencm3 is not initialized.\n"; \ printf "\tPlease run:\n"; \ @@ -63,7 +63,7 @@ lib: printf "######## ERROR ########\n"; \ exit 1; \ fi - $(Q)$(MAKE) -C libopencm3 + $(Q)$(MAKE) -C $(OPENCM3_DIR) EXAMPLE_DIRS:=$(sort $(dir $(wildcard $(addsuffix /*/*/Makefile,$(addprefix examples/,$(TARGETS)))))) $(EXAMPLE_DIRS): lib