-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
69 lines (48 loc) · 1.74 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
include make.config
DEFINES += "-DMAX_FLOW_COUNT=$(MAX_FLOW_COUNT)"
DEFINES += "-DINTERVAL_COUNT=$(INTERVAL_COUNT)"
export DEFINES
SUBDIRS = deps/toptalk messages server cli-client html5-client docs
CLEANDIRS = $(SUBDIRS:%=clean-%)
TESTDIRS = $(SUBDIRS:%=test-%)
.PHONY: all $(SUBDIRS)
all: $(SUBDIRS)
@echo "Done."
$(SUBDIRS):
@echo "Making $@"
@$(MAKE) --silent -C $@
server: | messages deps/toptalk
cli-client: | messages
update-cbuffer:
git subtree split --prefix deps/cbuffer --annotate='split ' --rejoin
git subtree pull --prefix deps/cbuffer https://github.com/acooks/cbuffer.git master --squash
update-toptalk:
git subtree split --prefix deps/toptalk --annotate='split ' --rejoin
git subtree pull --prefix deps/toptalk https://github.com/acooks/toptalk.git master --squash
# Remember to add the coverity bin directory to your PATH
coverity-build: $(CLEANDIRS)
cov-build --dir cov-int make messages server cli-client
@tar caf jittertrap-coverity-build.lzma cov-int
@echo Coverity build archive: jittertrap-coverity-build.lzma
coverity-clean:
rm -rf cov-int jittertrap-coverity-build.lzma
cppcheck:
cppcheck --enable=style,warning,performance,portability messages/ server/ cli-client/
clang-analyze:
scan-build make messages server cli-client
coverage:
CFLAGS="-fprofile-arcs -ftest-coverage" $(MAKE) clean test
lcov -c --no-external -d server -d cli-client -d messages -o jittertrap.lcov
.PHONY: clean $(CLEANDIRS)
clean: $(CLEANDIRS)
$(CLEANDIRS):
@echo "Cleaning $@"
@$(MAKE) --silent -C $(@:clean-%=%) clean
install: all
install -d ${DESTDIR}/usr/bin/
install -m 0755 server/jt-server ${DESTDIR}/usr/bin/
$(MAKE) -C html5-client install
test: $(TESTDIRS)
$(TESTDIRS):
@echo "Test $@"
@$(MAKE) --silent -C $(@:test-%=%) test