summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a25ecc7..491a3dd 100644
--- a/Makefile
+++ b/Makefile
@@ -131,17 +131,21 @@ RISCV_GXX := $(CROSS_COMPILE)-g++
RISCV_OBJDUMP := $(CROSS_COMPILE)-objdump
RISCV_GDB := $(CROSS_COMPILE)-gdb
RISCV_AR := $(CROSS_COMPILE)-ar
-RISCV_OPENOCD := openocd
else
RISCV_GCC := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-gcc)
RISCV_GXX := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-g++)
RISCV_OBJDUMP := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-objdump)
RISCV_GDB := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-gdb)
RISCV_AR := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-ar)
-RISCV_OPENOCD := $(abspath $(RISCV_PATH)/bin/openocd)
PATH := $(abspath $(RISCV_PATH)/bin):$(PATH)
endif
+ifeq ($(RISCV_OPENOCD_PATH),)
+RISCV_OPENOCD := openocd
+else
+RISCV_OPENOCD := $(abspath $(RISCV_OPENOCD_PATH)/bin/openocd)
+endif
+
#############################################################
# Compiles an instance of the MEE targeted at $(BOARD)
#############################################################