You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.2 KiB
32 lines
1.2 KiB
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Imaginator — Makefile
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
BIN := imaginator
|
|
GUI_BIN := imaginator-gui
|
|
VERSION := $(shell grep 'Version = ' core/types.go | sed 's/.*"\(.*\)".*/\1/')
|
|
|
|
.PHONY: all cli gui clean tidy
|
|
|
|
all: cli gui
|
|
|
|
cli:
|
|
go build -ldflags="-s -w" -o $(BIN) ./cmd/cli
|
|
|
|
gui:
|
|
go build -ldflags="-s -w" -o $(GUI_BIN) ./cmd/gui
|
|
|
|
# Windows — GUI without console window
|
|
gui-win:
|
|
GOOS=windows go build -ldflags="-s -w -H windowsgui" -o $(GUI_BIN).exe ./cmd/gui
|
|
|
|
# macOS — bundle (requires fyne package tool: go install fyne.io/fyne/v2/cmd/fyne@latest)
|
|
gui-mac:
|
|
fyne package -os darwin -icon assets/icon.png -name Imaginator -appID com.activething.imaginator ./cmd/gui
|
|
|
|
tidy:
|
|
go mod tidy
|
|
|
|
clean:
|
|
rm -f $(BIN) $(GUI_BIN) $(GUI_BIN).exe
|