Skip to content

Commit

Permalink
* add riscv supports
Browse files Browse the repository at this point in the history
  • Loading branch information
vyloy committed Jan 11, 2024
1 parent 4910fdf commit ae750d9
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 266 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ SERVER_FRONT_DIR=server/web
CLIENT_FRONT_DIR=client/web
TARGET?=$(shell gcc -dumpmachine)
TARGET_OS=$(shell echo $(TARGET) | awk -F '-' '{print $$2}')
TARGET_CPU=$(shell echo $(TARGET) | awk -F '-' '{print $$1}')
ifeq ($(TARGET_OS), native)
TARGET_OS=
endif
ifeq ($(TARGET_OS), linux)
RUST_TARGET?=$(shell echo $(TARGET) | awk -F '-' '{print $$1 "-unknown-" $$2 "-" $$3}')
ifeq ($(TARGET_CPU), riscv64)
RUST_TARGET?=$(shell echo $(TARGET) | awk -F '-' '{print "riscv64gc-unknown-linux-" $$3}')
else
RUST_TARGET?=$(shell echo $(TARGET) | awk -F '-' '{print $$1 "-unknown-linux-" $$3}')
endif
endif
TARGET_CPU=$(shell echo $(TARGET) | awk -F '-' '{print $$1}')
ifeq ($(TARGET_CPU), native)
TARGET_CPU=
endif
Expand Down
Loading

0 comments on commit ae750d9

Please sign in to comment.