forked from realm/realm-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
128 lines (109 loc) · 3.82 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
SUBDIRS = src test
test_DEPS = src
PASSIVE_SUBDIRS = doc/ref_cpp/examples
doc_ref_cpp_examples_DEPS = src
# Continue support for obsolete `test`-based goal names. You should use the new
# `check`-based names instead.
.PHONY: test test-debug
test: check
test-debug: check-debug
# Run test suite inside `gdb`/`lldb`
.PHONY: gdb gdb-debug lldb lldb-debug
gdb: check-norun/subdir/src
@$(MAKE) -C test gdb
gdb-debug: check-debug-norun/subdir/src
@$(MAKE) -C test gdb-debug
lldb: check-norun/subdir/src
@$(MAKE) -C test lldb
lldb-debug: check-debug-norun/subdir/src
@$(MAKE) -C test lldb-debug
# Build and run the benchmarking programs
.PHONY: benchmark
benchmark: check-norun/subdir/src
@$(MAKE) -C test benchmark
# Build and run the performance matrix benchmarking program
.PHONY: performance
performance: check-norun/subdir/src
@$(MAKE) -C test performance
# Build the add/insert benchmarking program
.PHONY: benchmark-insert-add
benchmark-insert-add: check-norun/subdir/src
@$(MAKE) -C test benchmark-insert-add
# Build and run the CRUD benchmarking program
.PHONY: benchmark-crud
benchmark-crud: check-norun/subdir/src
@$(MAKE) -C test benchmark-crud
# Build and run the prealloc benchmarking program
.PHONY: benchmark-prealloc
benchmark-prealloc: check-norun/subdir/src
@$(MAKE) -C test benchmark-prealloc
# Build the index benchmarking program
.PHONY: benchmark-index
benchmark-index: check-norun/subdir/src
@$(MAKE) -C test benchmark-index
# Build the transaction benchmarking program
.PHONY: benchmark-transaction
benchmark-transaction: check-norun/subdir/src
@$(MAKE) -C test benchmark-transaction
# Build and run the "row accessor" benchmarking program
.PHONY: benchmark-row-accessor
benchmark-row-accessor: check-norun/subdir/src
@$(MAKE) -C test benchmark-row-accessor
# Build and run the "common" benchmarking program
.PHONY: benchmark-common-tasks
benchmark-common-tasks: check-norun/subdir/src
@$(MAKE) -C test benchmark-common-tasks
# Build and run the "history types" benchmarking program
.PHONY: benchmark-history-types
benchmark-history-types: check-norun/subdir/src
@$(MAKE) -C test benchmark-history-types
# Run coverage analysis after building everything, this time using LCOV
.PHONY: lcov
lcov: check-cover
lcov --capture --directory . --output-file /tmp/realm.lcov
lcov --extract /tmp/realm.lcov '$(abspath .)/src/*' --output-file /tmp/realm-clean.lcov
rm -fr cover_html
genhtml --prefix $(abspath .) --output-directory cover_html /tmp/realm-clean.lcov
# Run coverage analysis after building everything, this time using GCOVR
.PHONY: gcovr
gcovr: check-cover
gcovr --filter='.*src/realm.*' -x >gcovr.xml
# Build and run whatever is in test/experiements/testcase.cpp
.PHONY: check-testcase check-testcase-debug memcheck-testcase memcheck-testcase-debug
.PHONY: gdb-testcase gdb-testcase-debug lldb-testcase lldb-testcase-debug
check-testcase: check-norun/subdir/src
@$(MAKE) -C test check-testcase
check-testcase-debug: check-debug-norun/subdir/src
@$(MAKE) -C test check-testcase-debug
memcheck-testcase: check-norun/subdir/src
@$(MAKE) -C test memcheck-testcase
memcheck-testcase-debug: check-debug-norun/subdir/src
@$(MAKE) -C test memcheck-testcase-debug
gdb-testcase: check-norun/subdir/src
@$(MAKE) -C test gdb-testcase
gdb-testcase-debug: check-debug-norun/subdir/src
@$(MAKE) -C test gdb-testcase-debug
lldb-testcase: check-norun/subdir/src
@$(MAKE) -C test lldb-testcase
lldb-testcase-debug: check-debug-norun/subdir/src
@$(MAKE) -C test lldb-testcase-debug
# Used by build.sh
.PHONY: get-exec-prefix get-includedir get-bindir get-libdir get-libexecdir
get-exec-prefix:
@echo $(exec_prefix)
get-includedir:
@echo $(includedir)
get-bindir:
@echo $(bindir)
get-libdir:
@echo $(libdir)
get-libexecdir:
@echo $(libexecdir)
.PHONY: get-cc get-cxx get-ld
get-cc:
@echo $(CC)
get-cxx:
@echo $(CXX)
get-ld:
@echo $(LD)
include src/generic.mk