about summary refs log tree commit diff
path: root/Makefile
blob: c8dd28b6d7ef7a83b92b7f0c443c0958adbd7895 (plain) (blame)
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
PREFIX ?= /usr/local
MANDIR ?= ${PREFIX}/man
RCDIR ?= /etc/rc.d

CFLAGS += -std=c11 -Wall -Wextra

all: kitd rc_script

rc_script: rc_script.in
	sed 's|%%PREFIX%%|${PREFIX}|g' rc_script.in >rc_script

clean:
	rm -f kitd rc_script

install: kitd kitd.8 rc_script
	install -d ${DESTDIR}${PREFIX}/sbin
	install -d ${DESTDIR}${MANDIR}/man8
	install -d ${DESTDIR}${RCDIR}
	install kitd ${DESTDIR}${PREFIX}/sbin/kitd
	install -m 644 kitd.8 ${DESTDIR}${MANDIR}/man8/kitd.8
	install rc_script ${DESTDIR}${RCDIR}/kitd

uninstall:
	rm -f ${DESTDIR}${PREFIX}/sbin/kitd
	rm -f ${DESTDIR}${MANDIR}/man8/kitd.8
	rm -f ${DESTDIR}/etc/rc.d/kitd