Skip to content

Commit

Permalink
Update Makefile to support arm64 for darwin and linux (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyrzhao authored Dec 4, 2024
1 parent 5ecd939 commit c88fcd7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

NAME ?= oauth2l
GOOSES ?= darwin linux windows
GOARCHES ?= amd64
GOARCHES ?= amd64 arm64

export CGO_ENABLED = 0
export GO111MODULE = on
Expand All @@ -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 \
Expand Down

0 comments on commit c88fcd7

Please sign in to comment.