summaryrefslogtreecommitdiff
path: root/Makefile
blob: 0c1f28fd233599c264c126c257ce1fbe8ba1663e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# $Id$

CFLAGS+=-Wall -Wextra -pedantic -Os
LDFLAGS+=-s -lutil -ljail
PREFIX?=/usr/local
DST=${DESTDIR}${PREFIX}

all: jaildaemon

jaildaemon: jaildaemon.c
	$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)

install: jaildaemon
	mkdir -p ${DST}/man/man1/
	install -m 0755 jaildaemon ${DST}/bin
	install -m 0755 rc.d-jaildaemon ${DST}/etc/rc.d/jaildaemon
	install -m 0644 man1/jaildaemon.1 ${DST}/man/man1/

.PHONY: clean test
clean:
	rm -f jaildaemon

test: jaildaemon
	sudo sh ./jaildaemon.sh