From c88fcd73dd4f241fbcb382c0ab4bd655a2a2984c Mon Sep 17 00:00:00 2001 From: Andy Zhao Date: Tue, 3 Dec 2024 16:27:15 -0800 Subject: [PATCH] Update Makefile to support arm64 for darwin and linux (#174) --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 21a3487..b6f59a7 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ NAME ?= oauth2l GOOSES ?= darwin linux windows -GOARCHES ?= amd64 +GOARCHES ?= amd64 arm64 export CGO_ENABLED = 0 export GO111MODULE = on @@ -26,10 +26,12 @@ build: @for GOOS in ${GOOSES}; do \ if [ $${GOOS} = "windows" ]; then \ SUFFIX=".exe"; \ + GOARCHES_SUPPORTED="amd64"; # Only build amd64 for Windows else \ SUFFIX=""; \ + GOARCHES_SUPPORTED="${GOARCHES}"; # Use all architectures for other OSes fi ; \ - for GOARCH in ${GOARCHES}; do \ + for GOARCH in ${GOARCHES_SUPPORTED}; do \ echo "Building $${GOOS}/$${GOARCH}" ; \ GOOS=$${GOOS} GOARCH=$${GOARCH} go build \ -a \