Skip to content

Commit

Permalink
build: detect arch properly
Browse files Browse the repository at this point in the history
  • Loading branch information
gulducat committed Apr 22, 2024
1 parent 130400d commit a405996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GIT_DIRTY = $$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)
GO_LDFLAGS := "$(GO_LDFLAGS) -X $(GIT_IMPORT).GitCommit=$(GIT_COMMIT)$(GIT_DIRTY)"

OS = $(strip $(shell echo -n $${GOOS:-$$(uname | tr [[:upper:]] [[:lower:]])}))
ARCH = $(strip $(shell echo -n $${GOARCH:-$$(A=$$(uname -m); [ $$A = x86_64 ] && A=amd64 || [ $$A = aarch64 ] && A=arm64 ; echo $$A)}))
ARCH = $(strip $(shell echo -n $${GOARCH:-$$(A=$$(uname -m); if [ $$A = x86_64 ]; then A=amd64; elif [ $$A = aarch64 ]; then A=arm64; fi; echo $$A)}))

PLATFORM ?= $(OS)/$(ARCH)
DIST = dist/$(PLATFORM)
Expand Down

0 comments on commit a405996

Please sign in to comment.