From 32c493e994288f63c2ceec1dbeaadc5de7399552 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 20 Jan 2021 18:37:52 +0900 Subject: [PATCH] [Makefile] Restore 32-bit targets Close #2328 --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 3857b2e..dec742e 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 $@