From 8a3e62366be55aaa641217cb60f190c7532585e8 Mon Sep 17 00:00:00 2001 From: Uthman Fatih Date: Mon, 2 Nov 2026 22:33:28 +0000 Subject: [PATCH] Update makefile --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 855fadb..bf5204a 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ -VERSION ?= $(shell git describe --tags --always --dirty) -LDFLAGS := -s -w -X main.version=$(VERSION) +VERSION ?= $(shell git describe --tags --always --dirty) +LDFLAGS := -s -w -X main.version=$(VERSION) PLATFORMS := linux/amd64 linux/arm64 windows/amd64 -.PHONY: all cross darwin clean +.PHONY: all cross darwin package clean all: # Release build for the host platform @@ -10,7 +10,7 @@ all: CGO_ENABLED=0 go build -trimpath -ldflags="$(LDFLAGS)" -o build/anical cross: - # Pure-Go targets only; darwin is built separately on macOS + # Pure-Go targets; darwin is built separately on macOS mkdir -p build @for p in $(PLATFORMS); do \ os=$${p%/*}; arch=$${p#*/}; \ @@ -25,7 +25,8 @@ darwin: # Must run on macOS: systray needs cgo (Cocoa/Objective-C) @test "$$(uname -s)" = "Darwin" || { echo "darwin target must run on macOS"; exit 1; } mkdir -p build - go build -trimpath -ldflags="$(LDFLAGS)" -o build/anical-$(VERSION)-darwin-$$(uname -m) + go build -trimpath -ldflags="$(LDFLAGS)" \ + -o build/anical-$(VERSION)-darwin-$$(go env GOARCH) clean: rm -rf build \ No newline at end of file