soju/Makefile

33 lines
670 B
Makefile
Raw Normal View History

2020-03-19 07:11:43 -07:00
.POSIX:
.SUFFIXES:
GO = go
RM = rm
SCDOC = scdoc
GOFLAGS =
PREFIX = /usr/local
BINDIR = bin
MANDIR = share/man
2020-03-27 11:23:41 -07:00
all: soju sojuctl doc/soju.1
2020-03-19 07:11:43 -07:00
soju:
$(GO) build $(GOFLAGS) ./cmd/soju
sojuctl:
$(GO) build $(GOFLAGS) ./cmd/sojuctl
2020-03-27 11:23:41 -07:00
doc/soju.1: doc/soju.1.scd
$(SCDOC) <doc/soju.1.scd >doc/soju.1
2020-03-19 07:11:43 -07:00
clean:
2020-03-27 11:23:41 -07:00
$(RM) -rf soju sojuctl doc/soju.1
2020-03-19 07:11:43 -07:00
install: all
mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
2021-04-21 07:39:51 -07:00
mkdir -p $(DESTDIR)/etc/soju
mkdir -p $(DESTDIR)/var/lib/soju
2020-03-19 07:11:43 -07:00
cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
2020-03-27 11:23:41 -07:00
cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
2021-04-21 07:39:51 -07:00
cp -f config.in $(DESTDIR)/etc/soju/config
.PHONY: soju sojuctl