-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 1004 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 1004 Bytes
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
PREFIX ?= /usr/local
CPPFLAGS += -D_GNU_SOURCE -D_LINUX_PORT -Imissing
MANPREFIX ?= ${PREFIX}/share/man
RELEASE = 1.0
EXTRA_SRC = missing/strlcpy.c missing/kqueue_inotify.c
all: chocolate
test: chocolate_spec chocolate
@echo "running unit tests"
@./chocolate_spec
gcc-lint: clean
@CPPFLAGS="-std=c89 -pedantic -Wall -Wpointer-arith -Wbad-function-cast" make test
regress:
@echo "running functional tests"
@./system_test.sh
chocolate: chocolate.c ${EXTRA_SRC}
${CC} ${CFLAGS} ${CPPFLAGS} ${EXTRA_SRC} chocolate.c -o $@ ${LDFLAGS}
chocolate_spec: chocolate_spec.c chocolate.c ${EXTRA_SRC}
${CC} ${CFLAGS} ${CPPFLAGS} ${EXTRA_SRC} chocolate.c -o $@ ${LDFLAGS}
clean:
rm -f chocolate chocolate_spec *.o
distclean: clean
rm -f Makefile
install: chocolate
@mkdir -p ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
install chocolate ${DESTDIR}${PREFIX}/bin
uninstall:
rm ${DESTDIR}${PREFIX}/bin/chocolate
.PHONY: all test gcc-lint regress clean distclean install uninstall