-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathMakefile.bsd
43 lines (31 loc) · 870 Bytes
/
Makefile.bsd
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
CLANG_FORMAT ?= clang-format
PREFIX ?= /usr/local
MANPREFIX ?= ${PREFIX}/man
RELEASE = 5.6
COMPONENTS = compat.o status.o entr.o
all: entr
compat.c: missing/*
cat /dev/null ${EXTRA_SRC} > compat.c
.c.o:
${CC} ${CFLAGS} ${CPPFLAGS} -DRELEASE=\"${RELEASE}\" -c $<
entr: ${COMPONENTS}
${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${COMPONENTS} ${LDFLAGS}
test: entr
ls entr.1 | EV_TRACE=1 ./entr -zn wc -l entr.1
check: entr
./system_test.sh
clean:
rm -f *.o compat.c entr
distclean: clean
rm -f Makefile
install: entr
@mkdir -p ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
install entr ${DESTDIR}${PREFIX}/bin
install -m 644 entr.1 ${DESTDIR}${MANPREFIX}/man1
uninstall:
rm ${DESTDIR}${PREFIX}/bin/entr
rm ${DESTDIR}${MANPREFIX}/man1/entr.1
format:
${CLANG_FORMAT} -i *.c *.h
.PHONY: all test check clean format distclean install uninstall