mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-11-23 18:51:10 +00:00
33 lines
482 B
Makefile
33 lines
482 B
Makefile
.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
|