Skip to content

Commit 3a275fb

Browse files
committed
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.
1 parent 393fe8e commit 3a275fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ images: build
5353
build: lib examples
5454

5555
lib:
56-
$(Q)if [ ! "`ls -A libopencm3`" ] ; then \
56+
$(Q)if [ ! "`ls -A $(OPENCM3_DIR)`" ] ; then \
5757
printf "######## ERROR ########\n"; \
5858
printf "\tlibopencm3 is not initialized.\n"; \
5959
printf "\tPlease run:\n"; \
@@ -63,7 +63,7 @@ lib:
6363
printf "######## ERROR ########\n"; \
6464
exit 1; \
6565
fi
66-
$(Q)$(MAKE) -C libopencm3
66+
$(Q)$(MAKE) -C $(OPENCM3_DIR)
6767

6868
EXAMPLE_DIRS:=$(sort $(dir $(wildcard $(addsuffix /*/*/Makefile,$(addprefix examples/,$(TARGETS))))))
6969
$(EXAMPLE_DIRS): lib

0 commit comments

Comments
 (0)