diff --git a/Makefile b/Makefile index 147db6814e..37f7d0ac7c 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,12 @@ MKDIR := powershell.exe -NoProfile -Command New-Item -ItemType Directory -Force RMDIR := powershell.exe -NoProfile -Command Remove-Item -Recurse -Force endif +# Build defaults. +GOOS ?= $(shell go env GOOS) +GOARCH ?= $(shell go env GOARCH) +GOOSES ?= "linux windows" # To override at the cli do: GOOSES="\"darwin bsd\"" +GOARCHES ?= "amd64 arm64" # To override at the cli do: GOARCHES="\"ppc64 mips\"" + # Windows specific extensions ifeq ($(GOOS),windows) ARCHIVE_CMD = zip -9lq @@ -20,12 +26,6 @@ ARCHIVE_EXT = zip EXE_EXT = .exe endif -# Build defaults. -GOOS ?= $(shell go env GOOS) -GOARCH ?= $(shell go env GOARCH) -GOOSES ?= "linux windows" # To override at the cli do: GOOSES="\"darwin bsd\"" -GOARCHES ?= "amd64 arm64" # To override at the cli do: GOARCHES="\"ppc64 mips\"" - # Build directories. REPO_ROOT = $(shell git rev-parse --show-toplevel) CNM_DIR = $(REPO_ROOT)/cnm/plugin