.POSIX: .SUFFIXES: VERSION=0.0.0 PREFIX?=/usr/local GO?=go GOFLAGS?= GOSRC!=find . -name '*.go' GOSRC+=go.mod go.sum all: kiln kiln: $(GOSRC) $(GO) build $(GOFLAGS) \ -ldflags "-X main.Prefix=$(PREFIX) \ -X main.ShareDir=$(SHAREDIR) \ -X main.Version=$(VERSION)" \ -o $@ clean: rm -f kiln install: all mkdir -p $(DESTDIR)$(PREFIX)/bin install -m755 kiln $(DESTDIR)$(PREFIX)/bin uninstall: $(RM) $(DESTDIR)$(PREFIX)/bin/kiln .PHONY: all clean install uninstall