NAME = rexserver VERSION_FILE := ../VERSION.txt REX_VERSION ?= $(shell cat $(VERSION_FILE)) build: commit.txt go build -ldflags="-X main.rex_version=$(REX_VERSION)" -o $(NAME) run: commit.txt go run . debug: commit.txt go run . commit.txt: go generate clean: rm -f $(NAME)