2021-08-21 08:19:49 +00:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
BIN_PREFIX = $(DESTDIR)$(PREFIX)/bin
|
|
|
|
SERVICE_PREFIX = $(DESTDIR)$(PREFIX)/lib/systemd/user
|
|
|
|
CFG_PREFIX = $(DESTDIR)/etc
|
|
|
|
|
2022-05-02 04:21:22 +00:00
|
|
|
all: version.txt
|
2022-07-22 17:36:19 +00:00
|
|
|
go build
|
|
|
|
go build ./cmd/itctl
|
2021-08-21 08:19:49 +00:00
|
|
|
|
2021-08-22 00:17:25 +00:00
|
|
|
clean:
|
|
|
|
rm -f itctl
|
|
|
|
rm -f itd
|
2022-05-02 04:22:15 +00:00
|
|
|
rm -f version.txt
|
2021-08-22 00:17:25 +00:00
|
|
|
|
2021-08-21 08:19:49 +00:00
|
|
|
install:
|
|
|
|
install -Dm755 ./itd $(BIN_PREFIX)/itd
|
|
|
|
install -Dm755 ./itctl $(BIN_PREFIX)/itctl
|
|
|
|
install -Dm644 ./itd.service $(SERVICE_PREFIX)/itd.service
|
|
|
|
install -Dm644 ./itd.toml $(CFG_PREFIX)/itd.toml
|
|
|
|
|
2021-08-22 00:17:25 +00:00
|
|
|
uninstall:
|
|
|
|
rm $(BIN_PREFIX)/itd
|
|
|
|
rm $(BIN_PREFIX)/itctl
|
|
|
|
rm $(SERVICE_PREFIX)/itd.service
|
|
|
|
rm $(CFG_PREFIX)/itd.toml
|
2021-08-21 08:19:49 +00:00
|
|
|
|
2022-05-02 04:21:22 +00:00
|
|
|
version.txt:
|
2022-11-22 03:23:14 +00:00
|
|
|
go generate
|
2022-02-22 00:18:52 +00:00
|
|
|
|
2022-05-02 04:21:22 +00:00
|
|
|
.PHONY: all clean install uninstall
|