summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-01-22 18:51:04 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-01-22 18:51:04 +0900
commitbb26f32ac7353e8fe0e9624326beda082faa5374 (patch)
tree881f65b7da08d6ebadf83d68300d7e27603035e3
parent4d928001b85ddc864ac9f6cb4afd5c8a52b99fe5 (diff)
Allow build on OpenBSD/FreeBSD/Android
Close #497
-rw-r--r--src/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index e702548f..d1d0c149 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -28,11 +28,22 @@ RELEASEARM7 := fzf-$(VERSION)-$(GOOS)_arm7
RELEASEARM8 := fzf-$(VERSION)-$(GOOS)_arm8
export GOPATH
+# https://en.wikipedia.org/wiki/Uname
UNAME_M := $(shell uname -m)
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)
+ BINARY := $(BINARYARM6)
+else ifeq ($(UNAME_M),armv7l)
+ BINARY := $(BINARYARM7)
else
$(error "Build on $(UNAME_M) is not supported, yet.")
endif