forked from canonical/dqlite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
142 lines (126 loc) · 3.64 KB
/
Makefile.am
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS += $(CODE_COVERAGE_CFLAGS)
AM_CFLAGS += $(SQLITE_CFLAGS) $(UV_CFLAGS) $(RAFT_CFLAGS) $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(UV_LIBS) $(RAFT_LIBS) $(PTHREAD_LIBS)
if !BUILD_SQLITE_ENABLED
AM_LDFLAGS += $(SQLITE_LIBS)
endif
include_HEADERS = include/dqlite.h
lib_LTLIBRARIES = libdqlite.la
libdqlite_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
libdqlite_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:1:0
libdqlite_la_SOURCES = \
src/bind.c \
src/client/protocol.c \
src/command.c \
src/conn.c \
src/db.c \
src/dqlite.c \
src/error.c \
src/format.c \
src/fsm.c \
src/gateway.c \
src/id.c \
src/leader.c \
src/lib/addr.c \
src/lib/buffer.c \
src/lib/fs.c \
src/lib/transport.c \
src/logger.c \
src/message.c \
src/metrics.c \
src/config.c \
src/query.c \
src/registry.c \
src/request.c \
src/response.c \
src/roles.c \
src/server.c \
src/stmt.c \
src/tracing.c \
src/transport.c \
src/translate.c \
src/tuple.c \
src/vfs.c
if BUILD_SQLITE_ENABLED
libdqlite_la_SOURCES += sqlite3.c
endif
check_PROGRAMS = \
unit-test \
integration-test
TESTS = unit-test integration-test
check_LTLIBRARIES = libtest.la
libtest_la_CFLAGS = $(AM_CFLAGS) -DMUNIT_TEST_NAME_LEN=60 -Wno-unknown-warning-option -Wno-unused-result -Wno-conversion -Wno-uninitialized -Wno-maybe-uninitialized -Wno-strict-prototypes -Wno-old-style-definition
libtest_la_SOURCES = \
test/lib/endpoint.c \
test/lib/fault.c \
test/lib/fs.c \
test/lib/heap.c \
test/lib/logger.c \
test/lib/munit.c \
test/lib/raft_heap.c \
test/lib/server.c \
test/lib/sqlite.c \
test/lib/uv.c
unit_test_SOURCES = $(libdqlite_la_SOURCES)
unit_test_SOURCES += \
test/test_error.c \
test/test_integration.c \
test/unit/ext/test_uv.c \
test/unit/lib/test_addr.c \
test/unit/lib/test_buffer.c \
test/unit/lib/test_byte.c \
test/unit/lib/test_registry.c \
test/unit/lib/test_serialize.c \
test/unit/lib/test_transport.c \
test/unit/test_command.c \
test/unit/test_conn.c \
test/unit/test_gateway.c \
test/unit/test_concurrency.c \
test/unit/test_registry.c \
test/unit/test_replication.c \
test/unit/test_request.c \
test/unit/test_role_management.c \
test/unit/test_tuple.c \
test/unit/test_vfs.c \
test/unit/main.c
unit_test_CFLAGS = $(AM_CFLAGS) -Wno-unknown-warning-option -Wno-uninitialized -Wno-maybe-uninitialized -Wno-float-equal -Wno-conversion
unit_test_LDFLAGS = $(AM_LDFLAGS)
unit_test_LDADD = libtest.la
integration_test_SOURCES = \
test/integration/test_client.c \
test/integration/test_cluster.c \
test/integration/test_fsm.c \
test/integration/test_membership.c \
test/integration/test_node.c \
test/integration/test_role_management.c \
test/integration/test_vfs.c \
test/integration/main.c
integration_test_CFLAGS = $(AM_CFLAGS) -Wno-conversion
integration_test_LDFLAGS = $(AM_LDFLAGS) -no-install
integration_test_LDADD = libtest.la libdqlite.la
if DEBUG_ENABLED
AM_CFLAGS += -g
else
AM_CFLAGS += -O2
endif
if SANITIZE_ENABLED
AM_CFLAGS += -fsanitize=address
endif
if BACKTRACE_ENABLED
AM_CFLAGS += -DDQLITE_ASSERT_WITH_BACKTRACE
AM_LDFLAGS += -lbacktrace
endif
if CODE_COVERAGE_ENABLED
include $(top_srcdir)/aminclude_static.am
CODE_COVERAGE_DIRECTORY=./src
CODE_COVERAGE_OUTPUT_DIRECTORY=coverage
CODE_COVERAGE_OUTPUT_FILE=coverage.info
CODE_COVERAGE_IGNORE_PATTERN="/usr/include/*"
CODE_COVERAGE_BRANCH_COVERAGE=1
CODE_COVERAGE_LCOV_OPTIONS=$(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) --rc lcov_excl_br_line="assert\("
clean-local: code-coverage-clean
distclean-local: code-coverage-dist-clean
endif # CODE_COVERAGE_ENABLED
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dqlite.pc