2022-02-08 15:10:19 +00:00
|
|
|
GO ?= go
|
|
|
|
RM ?= rm
|
|
|
|
SCDOC ?= scdoc
|
|
|
|
GOFLAGS ?=
|
|
|
|
PREFIX ?= /usr/local
|
|
|
|
BINDIR ?= bin
|
|
|
|
MANDIR ?= share/man
|
2020-03-19 14:11:43 +00:00
|
|
|
|
2020-03-27 18:23:41 +00:00
|
|
|
all: soju sojuctl doc/soju.1
|
2020-03-19 14:11:43 +00:00
|
|
|
|
|
|
|
soju:
|
|
|
|
$(GO) build $(GOFLAGS) ./cmd/soju
|
|
|
|
sojuctl:
|
|
|
|
$(GO) build $(GOFLAGS) ./cmd/sojuctl
|
2020-03-27 18:23:41 +00:00
|
|
|
doc/soju.1: doc/soju.1.scd
|
|
|
|
$(SCDOC) <doc/soju.1.scd >doc/soju.1
|
2020-03-19 14:11:43 +00:00
|
|
|
|
|
|
|
clean:
|
2022-02-08 15:10:19 +00:00
|
|
|
$(RM) -f soju sojuctl doc/soju.1
|
2021-05-25 12:55:21 +00:00
|
|
|
install:
|
2020-03-19 14:11:43 +00:00
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
2021-04-21 14:39:51 +00:00
|
|
|
mkdir -p $(DESTDIR)/etc/soju
|
|
|
|
mkdir -p $(DESTDIR)/var/lib/soju
|
2020-03-19 14:11:43 +00:00
|
|
|
cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
|
2020-03-27 18:23:41 +00:00
|
|
|
cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
2021-10-08 07:11:31 +00:00
|
|
|
[ -f $(DESTDIR)/etc/soju/config ] || cp -f config.in $(DESTDIR)/etc/soju/config
|
2021-04-27 15:51:46 +00:00
|
|
|
|
2022-02-08 15:10:19 +00:00
|
|
|
.PHONY: soju sojuctl clean install
|