summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorXeonacid <h.dwwwwww@gmail.com>2021-10-10 20:33:06 +0800
committerGitHub <noreply@github.com>2021-10-10 21:33:06 +0900
commit5fc78e4584eface9f2055ee7c31c2ae8c5cedc87 (patch)
tree13c429a17948c86036663b035b024f5b92f57d9f /Makefile
parent2736a2f69e8e407bc3df38a43faab173f37e7c4c (diff)
Add riscv64 build target (#2626)
Build successfully on Arch Linux RISC-V.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8b37ef9c..78dfc86c 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@ BINARYARM6 := fzf-$(GOOS)_arm6
BINARYARM7 := fzf-$(GOOS)_arm7
BINARYARM8 := fzf-$(GOOS)_arm8
BINARYPPC64LE := fzf-$(GOOS)_ppc64le
+BINARYRISCV64 := fzf-$(GOOS)_riscv64
# https://en.wikipedia.org/wiki/Uname
UNAME_M := $(shell uname -m)
@@ -59,6 +60,8 @@ else ifeq ($(UNAME_M),aarch64)
BINARY := $(BINARYARM8)
else ifeq ($(UNAME_M),ppc64le)
BINARY := $(BINARYPPC64LE)
+else ifeq ($(UNAME_M),riscv64)
+ BINARY := $(BINARYRISCV64)
else
$(error Build on $(UNAME_M) is not supported, yet.)
endif
@@ -141,6 +144,9 @@ target/$(BINARYARM8): $(SOURCES)
target/$(BINARYPPC64LE): $(SOURCES)
GOARCH=ppc64le $(GO) build $(BUILD_FLAGS) -o $@
+target/$(BINARYRISCV64): $(SOURCES)
+ GOARCH=riscv64 $(GO) build $(BUILD_FLAGS) -o $@
+
bin/fzf: target/$(BINARY) | bin
cp -f target/$(BINARY) bin/fzf