summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorznley <105416820+znley@users.noreply.github.com>2022-06-28 08:16:26 +0800
committerGitHub <noreply@github.com>2022-06-28 09:16:26 +0900
commit885cd8ff04e73d61279f0ac58011f74613e809dd (patch)
treec361c5ca28de9db659985b48eba911270d3a79fc /Makefile
parent2707af403a106ddf864d9c2bae2c5e2f9b07b05f (diff)
downloadfzf-885cd8ff04e73d61279f0ac58011f74613e809dd.tar.gz
[make] Add loongarch64 support (#2857)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 91c5711e..435c9ca8 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@ BINARYARM7 := fzf-$(GOOS)_arm7
BINARYARM8 := fzf-$(GOOS)_arm8
BINARYPPC64LE := fzf-$(GOOS)_ppc64le
BINARYRISCV64 := fzf-$(GOOS)_riscv64
+BINARYLOONG64 := fzf-$(GOOS)_loong64
# https://en.wikipedia.org/wiki/Uname
UNAME_M := $(shell uname -m)
@@ -62,6 +63,8 @@ else ifeq ($(UNAME_M),ppc64le)
BINARY := $(BINARYPPC64LE)
else ifeq ($(UNAME_M),riscv64)
BINARY := $(BINARYRISCV64)
+else ifeq ($(UNAME_M),loongarch64)
+ BINARY := $(BINARYLOONG64)
else
$(error Build on $(UNAME_M) is not supported, yet.)
endif
@@ -148,6 +151,9 @@ target/$(BINARYPPC64LE): $(SOURCES)
target/$(BINARYRISCV64): $(SOURCES)
GOARCH=riscv64 $(GO) build $(BUILD_FLAGS) -o $@
+target/$(BINARYLOONG64): $(SOURCES)
+ GOARCH=loong64 $(GO) build $(BUILD_FLAGS) -o $@
+
bin/fzf: target/$(BINARY) | bin
cp -f target/$(BINARY) bin/fzf