summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2021-01-20 18:37:52 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2021-01-20 18:40:17 +0900
commit32c493e994288f63c2ceec1dbeaadc5de7399552 (patch)
treed3ee2890344259ac387019f7fb071bd7285f595c /Makefile
parent1a76bdf8914195ab26ebac7e49a3ed8752dd69bd (diff)
downloadfzf-32c493e994288f63c2ceec1dbeaadc5de7399552.tar.gz
[Makefile] Restore 32-bit targets
Close #2328
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3857b2ea..dec742ed 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@ $(error Not on git repository; cannot determine $$FZF_REVISION)
endif
BUILD_FLAGS := -a -ldflags "-s -w -X main.version=$(VERSION) -X main.revision=$(REVISION)" -tags "$(TAGS)"
+BINARY32 := fzf-$(GOOS)_386
BINARY64 := fzf-$(GOOS)_amd64
BINARYARM5 := fzf-$(GOOS)_arm5
BINARYARM6 := fzf-$(GOOS)_arm6
@@ -40,6 +41,10 @@ ifeq ($(UNAME_M),x86_64)
BINARY := $(BINARY64)
else ifeq ($(UNAME_M),amd64)
BINARY := $(BINARY64)
+else ifeq ($(UNAME_M),i686)
+ BINARY := $(BINARY32)
+else ifeq ($(UNAME_M),i386)
+ BINARY := $(BINARY32)
else ifeq ($(UNAME_M),armv5l)
BINARY := $(BINARYARM5)
else ifeq ($(UNAME_M),armv6l)
@@ -110,6 +115,9 @@ endif
clean:
$(RM) -r dist target
+target/$(BINARY32): $(SOURCES)
+ GOARCH=386 $(GO) build $(BUILD_FLAGS) -o $@
+
target/$(BINARY64): $(SOURCES)
GOARCH=amd64 $(GO) build $(BUILD_FLAGS) -o $@