Files
LilGuy/Makefile

51 lines
1.3 KiB
Makefile

.PHONY: run build clean fmt
export CGO_CFLAGS=-Wno-deprecated-declarations
run:
@go run ./cmd/bigfeelings
build:
@go build -o bin/bigfeelings ./cmd/bigfeelings
clean:
@rm -rf bin/
@go clean
fmt:
@go fmt ./...
# Install dependencies
deps:
@go mod download
@go mod tidy
# Run with verbose output
run-verbose:
@go run -v ./cmd/bigfeelings
# Build for current platform
build-local: clean
@mkdir -p bin
@go build -o bin/bigfeelings ./cmd/bigfeelings
@echo "Built: bin/bigfeelings"
# Build for multiple platforms
build-all: clean
@mkdir -p bin
GOOS=darwin GOARCH=arm64 go build -o bin/bigfeelings-darwin-arm64 ./cmd/bigfeelings
GOOS=darwin GOARCH=amd64 go build -o bin/bigfeelings-darwin-amd64 ./cmd/bigfeelings
GOOS=linux GOARCH=amd64 go build -o bin/bigfeelings-linux-amd64 ./cmd/bigfeelings
GOOS=windows GOARCH=amd64 go build -o bin/bigfeelings-windows-amd64.exe ./cmd/bigfeelings
@echo "Built all platforms"
help:
@echo "Available targets:"
@echo " run - Run the game"
@echo " build - Build binary to bin/"
@echo " clean - Remove build artifacts"
@echo " fmt - Format code"
\ @echo " deps - Download and tidy dependencies"
@echo " build-local - Clean build for current platform"
@echo " build-all - Build for all platforms"