Skip to content

Commit

Permalink
[make] Add loongarch64 support (#2857)
Browse files Browse the repository at this point in the history
  • Loading branch information
znley committed Jun 28, 2022
1 parent 2707af4 commit 885cd8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 885cd8f

Please sign in to comment.