ytva/Makefile
2024-12-31 18:28:07 -07:00

14 lines
404 B
Makefile

.PHONY: default debug run
GIT_COMMIT := $(shell git rev-parse HEAD)
BUILD_DATE := $(shell date -u +%Y%m%d.%H%M%S)
CGO_ENABLED=0
default:
CGO_ENABLED=$(CGO_ENABLED) go build -o out/ytva -trimpath -ldflags "-s -w -X main.gitCommit=$(GIT_COMMIT) -X main.buildDate=$(BUILD_DATE)" .
debug:
go build -o out/ytva -ldflags "-X main.gitCommit=$(GIT_COMMIT) -X main.buildDate=$(BUILD_DATE)" .
run:
go run .