aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2021-06-09 23:05:05 +0200
committerjohannst <johannes.stoelp@gmail.com>2021-06-09 23:05:05 +0200
commit2e4a31287705d8437cddd109c12b7e11825192bc (patch)
tree448157595deb0b6441abebff45990dc9bd3558e6 /Makefile
parent0db708a285c74526ebcce31a10f5730f3f715d61 (diff)
downloadmatcha-threads-2e4a31287705d8437cddd109c12b7e11825192bc.tar.gz
matcha-threads-2e4a31287705d8437cddd109c12b7e11825192bc.zip
added riscv64
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5c110ec..57bfb22 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,8 @@ ifeq ($(ARCH),arm64)
PREFIX := aarch64-linux-gnu-
else ifeq ($(ARCH),arm)
PREFIX := arm-linux-gnueabi-
+else ifeq ($(ARCH),riscv64)
+PREFIX := riscv64-linux-gnu-
endif
CXX := $(PREFIX)g++
@@ -35,6 +37,11 @@ else ifeq ($(ARCH),arm)
-L /usr/arm-linux-gnueabi \
-E LD_LIBRARY_PATH=/usr/arm-linux-gnueabi/lib \
$<
+else ifeq ($(ARCH),riscv64)
+ qemu-riscv64 \
+ -L /usr/riscv64-linux-gnu \
+ -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib \
+ $<
else
$<
endif
@@ -54,6 +61,13 @@ else ifeq ($(ARCH),arm)
-g 1234 \
$< &
gdb-multiarch -ex 'target remote :1234' -ex 'b main' -ex 'c' $<
+else ifeq ($(ARCH),riscv64)
+ qemu-riscv64 \
+ -L /usr/riscv64-linux-gnu \
+ -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib \
+ -g 1234 \
+ $< &
+ gdb-multiarch -ex 'target remote :1234' -ex 'b main' -ex 'c' $<
else
which cgdb && cgdb --ex 'start' $< \
|| gdb --ex 'start' $<