diff --git a/Makefile b/Makefile index 6d5bd6c1c3..51e5fd0f97 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,17 @@ ifeq ($(SKIP_GO_VERSION_CHECK),) include golang.mk endif -GOARCH=$(shell go env GOARCH) -ifeq ($(ARCH),) - ARCH = $(GOARCH) +#Get ARCH. +ifneq ($(GOPATH),) + GOARCH=$(shell go env GOARCH) + ifeq ($(ARCH),) + ARCH = $(GOARCH) + endif +else + ARCH = $(shell uname -m) + ifeq ($(ARCH),x86_64) + ARCH = amd64 + endif endif ARCH_DIR = arch