-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
24 lines (17 loc) · 842 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.DEFAULT_GOAL := help
.PHONY: $(MAKECMDGOALS)
help: ## Show this help message
@printf "\033[33mUsage:\033[0m\n make [target] [arg=\"val\"...]\n\n\033[33mTargets:\033[0m\n"
@grep -E '^[-a-zA-Z0-9_\.\/]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-15s\033[0m %s\n", $$1, $$2}'
build: ## Build a binary native to your host, useful for development
@go build -o ./build/game .
windows: ## Build a 64-bit Windows executable
@GOOS=windows GOARCH=amd64 go build -o ./build/game.exe .
mac: ## Build a 64-bit ARM (Apple Silicon) binary
@GOOS=darwin GOARCH=arm64 go build -o ./build/game .
linux: ## Build a 64-bit Linux binary
@GOOS=linux GOARCH=amd64 go build -o ./build/game .
mod: ## Install modules
@go mod tidy
play: ## Play the game (for development only!)
@go run main.go