ytva/Makefile

15 lines
404 B
Makefile
Raw Normal View History

2024-12-31 20:28:07 -05:00
.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 .