-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
48 lines (33 loc) · 1.07 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
TARGETS= runtime global_controller
COVERAGE=$(foreach TARG, $(TARGETS), $(TARG)-coverage)
MEMCHECKS=$(foreach TARG, $(TARGETS), $(TARG)-memcheck)
TESTS=$(foreach TARG, $(TARGETS), $(TARG)-test)
CLEANS=$(foreach TARG, $(TARGETS), $(TARG)-clean)
UNITS=$(foreach TARG, $(TARGETS), $(TARG)-unit)
BLD_DIR = build/
RES_DIR = $(BLD_DIR)reults/
COV_DIR = $(BLD_DIR)test/coverage/
define tst_results
$(wildcard $(RES_DIR)*/*.txt)
endef
all: $(TARGETS)
test: $(TESTS)
memcheck: $(MEMCHECKS)
clean: $(CLEANS)
# A version of make test which runs only unit tests, not integration tests
unit: $(UNITS)
cov: $(COVERAGE)
genhtml --show-details --keep-descriptions -o $(COV_DIR) $(shell find $(COV_DIR) -name '*.info' ! -empty)
coverage: $(COVERAGE)
genhtml --show-details --keep-descriptions -o $(COV_DIR) $(shell find $(COV_DIR) -name '*.info' ! -empty)
cd $(COV_DIR) && python2 -m SimpleHTTPServer 8081
docs:
doxygen Doxyfile
mv html docs
runtime-%::
make -f $(patsubst %-$*, %.mk, $@) $*
global_controller-%::
make -f $(patsubst %-$*, %.mk, $@) $*
$(TARGETS): FORCE
make -f $@.mk
FORCE:;