kiln/Makefile
2022-07-06 08:59:49 -04:00

35 lines
616 B
Makefile

.POSIX:
.SUFFIXES:
.SUFFIXES: .1.scd .1
PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
MANDIR?=$(PREFIX)/share/man
GO?=go
GOFLAGS?=
all: kiln docs
docs: docs/kiln.1
.1.scd.1:
scdoc < $< > $@
kiln: *.go go.mod go.sum config.toml templates/_default/*
$(GO) build $(GOFLAGS) -o $@
clean:
$(RM) kiln
$(RM) docs/kiln.1
install: all
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
install -m755 kiln $(DESTDIR)$(BINDIR)/kiln
install -m644 docs/kiln.1 $(DESTDIR)$(MANDIR)/man1/kiln.1
uninstall:
$(RM) $(DESTDIR)$(BINDIR)/kiln
$(RM) $(DESTDIR)$(MANDIR)/man1/kiln.1
.PHONY: all docs clean install uninstall