kiln/Makefile

33 lines
482 B
Makefile
Raw Normal View History

2020-11-02 01:51:43 +00:00
.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