.PHONY: build build-app build-go clean dev install run start help all: build install: cd app && bun install dev: cd app && bun run dev build-app: cd app && bun run build build-go: build-app go build -o craftstation -ldflags="-s -w" bin.go build: build-go start: cd app && bun run start run: build ./craftstation clean: rm -rf app/build rm -rf app/.svelte-kit rm -f craftstation # Production build with static linking prod: clean build-app CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o craftstation -ldflags="-s -w -extldflags '-static'" bin.go build-windows: build-app CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o craftstation.exe -ldflags="-s -w" bin.go build-macos: build-app CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o craftstation-macos -ldflags="-s -w" bin.go build-linux: build-app CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o craftstation-linux -ldflags="-s -w" bin.go build-all: build-windows build-macos build-linux help: @echo "Available targets:" @echo " install - Install app dependencies (requires Bun)" @echo " dev - Run SvelteKit app in development mode" @echo " start - Build and run SvelteKit app using bun" @echo " build-app - Build the SvelteKit app with Bun adapter" @echo " build-go - Build Go binary with auto Bun installation" @echo " build - Build everything (default)" @echo " run - Build and run the Go binary (auto-installs Bun)" @echo " clean - Clean build artifacts" @echo " prod - Production build (optimized)" @echo " build-* - Cross-compile for different platforms" @echo " build-all - Build for all platforms" @echo " help - Show this help message"