~goorzhel/radm

ref: a08914c219955cae905550fc5734d852a6e5bca3 radm/Makefile -rw-r--r-- 750 bytes
a08914c2 — Antonio Gurgel Rework Makefile 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
SOURCES := $(wildcard src/*)

target/release/rstdm: $(SOURCES)
	cargo build --release

res/rstdm.1: res/rstdm.1.md
	pandoc -f markdown -t man res/rstdm.1.md -o res/rstdm.1

.PHONY: install
install: target/release/rstdm
	install -m 755 -o root -g root target/release/rstdm /usr/bin/

install-manual: res/rstdm.1
	install -m 644 -o root -g root res/rstdm.1 /usr/share/man/man1/

install-runit:
	mkdir -p /etc/sv/rstdm
	install -m 755 -o root -g root res/runit/run /etc/sv/rstdm

install-rsyslog:
	install -m 644 -o root -g root res/rsyslog.d/rstdm /etc/rsyslog.d

install-all: install install-manual install-runit install-rsyslog

uninstall:
	rm -f /usr/bin/rstdm
	rm -f /usr/share/man/man1/rstdm.1
	rm -f /etc/sv/rstdm/run
	rm -f /etc/rsyslog.d/rstdm