Remove AX_PTHREAD autoconf macro
[ric-plt/sdl.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 BASE_CPPFLAGS = \
4     -Wall \
5     -Werror \
6     -Wextra \
7     -Wno-missing-field-initializers \
8     -I$(top_srcdir)/include \
9     -I$(builddir)/include \
10     -DSDL_CONF_DIR='"@SDL_CONF_DIR@"' \
11     $(BOOST_CPPFLAGS)
12
13 lib_LTLIBRARIES = \
14     libsdl.la \
15     libshareddatalayercli.la
16
17 libsdl_la_SOURCES = \
18     include/private/abort.hpp \
19     include/private/asyncconnection.hpp \
20     include/private/asyncdummystorage.hpp \
21     include/private/asyncstorageimpl.hpp \
22     include/private/createlogger.hpp \
23     include/private/configurationpaths.hpp \
24     include/private/configurationreader.hpp \
25     include/private/databaseconfiguration.hpp \
26     include/private/databaseconfigurationimpl.hpp \
27     include/private/engine.hpp \
28     include/private/engineimpl.hpp \
29     include/private/error.hpp \
30     include/private/eventfd.hpp \
31     include/private/filedescriptor.hpp \
32     include/private/hostandport.hpp \
33     include/private/logger.hpp \
34     include/private/namespaceconfiguration.hpp \
35     include/private/namespaceconfigurations.hpp \
36     include/private/namespaceconfigurationsimpl.hpp \
37     include/private/namespacevalidator.hpp \
38     include/private/stdstreamlogger.hpp \
39     include/private/syncstorageimpl.hpp \
40     include/private/system.hpp \
41     include/private/timer.hpp \
42     include/private/timerfd.hpp \
43     src/abort.cpp \
44     src/asyncconnection.cpp \
45     src/asyncdummystorage.cpp \
46     src/asyncstorage.cpp \
47     src/asyncstorageimpl.cpp \
48     src/backenderror.cpp \
49     src/configurationpaths.cpp \
50     src/configurationreader.cpp \
51     src/createlogger.cpp \
52     src/databaseconfiguration.cpp \
53     src/databaseconfigurationimpl.cpp \
54     src/emptynamespace.cpp \
55     src/engine.cpp \
56     src/engineimpl.cpp \
57     src/error.cpp \
58     src/errorqueries.cpp \
59     src/exception.cpp \
60     src/eventfd.cpp \
61     src/filedescriptor.cpp \
62     src/hostandport.cpp \
63     src/invalidnamespace.cpp \
64     src/namespacevalidator.cpp \
65     src/namespaceconfigurationsimpl.cpp \
66     src/notconnected.cpp \
67     src/operationinterrupted.cpp \
68     src/publisherid.cpp \
69     src/rejectedbybackend.cpp \
70     src/rejectedbysdl.cpp \
71     src/stdstreamlogger.cpp \
72     src/syncstorage.cpp \
73     src/syncstorageimpl.cpp \
74     src/system.cpp \
75     src/timer.cpp \
76     src/timerfd.cpp
77
78 if SYSTEMLOGGER
79 libsdl_la_SOURCES += \
80     include/private/systemlogger.hpp \
81     src/systemlogger.cpp
82 endif
83
84 if REDIS
85 libsdl_la_SOURCES += \
86     include/private/redis/asynccommanddispatcher.hpp \
87     include/private/redis/asyncdatabasediscovery.hpp \
88     include/private/redis/asyncredisreply.hpp \
89     include/private/redis/asyncredisstorage.hpp \
90     include/private/redis/asyncsentineldatabasediscovery.hpp \
91     include/private/redis/contents.hpp \
92     include/private/redis/contentsbuilder.hpp \
93     include/private/redis/databaseinfo.hpp \
94     include/private/redis/reply.hpp \
95     src/redis/asynccommanddispatcher.cpp \
96     src/redis/asyncdatabasediscovery.cpp \
97     src/redis/asyncredisreply.cpp \
98     src/redis/asyncredisstorage.cpp \
99     src/redis/asyncsentineldatabasediscovery.cpp \
100     src/redis/contentsbuilder.cpp
101 endif
102 if HIREDIS
103 libsdl_la_SOURCES += \
104     include/private/redis/asynchirediscommanddispatcher.hpp \
105     include/private/redis/asynchiredisdatabasediscovery.hpp \
106     include/private/redis/hiredisepolladapter.hpp \
107     include/private/redis/hiredissystem.hpp \
108     include/private/redis/redisgeneral.hpp \
109     src/redis/asynchirediscommanddispatcher.cpp \
110     src/redis/asynchiredisdatabasediscovery.cpp \
111     src/redis/hiredisepolladapter.cpp \
112     src/redis/hiredissystem.cpp \
113     src/redis/redisgeneral.cpp
114 endif
115 if HIREDIS_VIP
116 libsdl_la_SOURCES += \
117     include/private/redis/asynchiredisclustercommanddispatcher.hpp \
118     include/private/redis/hiredisclusterepolladapter.hpp \
119     include/private/redis/hiredisclustersystem.hpp \
120     src/redis/asynchiredisclustercommanddispatcher.cpp \
121     src/redis/hiredisclusterepolladapter.cpp \
122     src/redis/hiredisclustersystem.cpp
123 endif
124 libsdl_la_CPPFLAGS = \
125     $(BASE_CPPFLAGS) \
126     $(HIREDIS_CFLAGS) \
127     $(HIREDIS_VIP_CFLAGS)
128 libsdl_la_LDFLAGS = \
129     $(BOOST_LDFLAGS) \
130     -version-info @SDL_LT_VERSION@
131 libsdl_la_LIBADD = \
132     $(BOOST_SYSTEM_LIB) \
133     $(BOOST_FILESYSTEM_LIB) \
134     $(HIREDIS_LIBS) \
135     $(HIREDIS_VIP_LIBS)
136
137 libshareddatalayercli_la_SOURCES = \
138     src/cli/commandmap.cpp \
139     src/cli/commandparserandexecutor.cpp \
140     src/cli/dumpconfigurationcommand.cpp \
141     src/cli/testgetsetcommand.cpp \
142     src/cli/testconnectivitycommand.cpp \
143     src/exception.cpp \
144     src/configurationpaths.cpp \
145     include/private/configurationpaths.hpp \
146     include/private/cli/commandmap.hpp \
147     include/private/cli/commandparserandexecutor.hpp
148
149 libshareddatalayercli_la_CPPFLAGS = \
150     $(BASE_CPPFLAGS) \
151     $(BOOST_CPPFLAGS)
152 libshareddatalayercli_la_LDFLAGS = \
153     $(BOOST_LDFLAGS) \
154     -release $(PACKAGE_VERSION)
155 libshareddatalayercli_la_LIBADD = \
156     $(BOOST_FILESYSTEM_LIB) \
157     $(BOOST_PROGRAM_OPTIONS_LIB) \
158     $(BOOST_SYSTEM_LIB) \
159     -lboost_system \
160     libsdl.la
161
162 pkgincludedir = \
163     $(includedir)/sdl
164 pkginclude_HEADERS = \
165     include/sdl/asyncstorage.hpp \
166     include/sdl/backenderror.hpp \
167     include/sdl/doxygen.hpp \
168     include/sdl/emptynamespace.hpp \
169     include/sdl/errorqueries.hpp \
170     include/sdl/exception.hpp \
171     include/sdl/invalidnamespace.hpp \
172     include/sdl/notconnected.hpp \
173     include/sdl/operationinterrupted.hpp \
174     include/sdl/publisherid.hpp \
175     include/sdl/rejectedbybackend.hpp \
176     include/sdl/rejectedbysdl.hpp \
177     include/sdl/syncstorage.hpp
178
179 pkgconfigdir = \
180     ${libdir}/pkgconfig
181 nodist_pkgconfig_DATA = \
182     libsdl.pc
183
184 libsdl.pc: $(top_srcdir)/libsdl.pc.in
185         sed -e 's![@]prefix[@]!$(prefix)!g' \
186         -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \
187         -e 's![@]includedir[@]!$(includedir)!g' \
188         -e 's![@]pkglibexecdir[@]!$(pkglibexecdir)!g' \
189         -e 's![@]libdir[@]!$(libdir)!g' \
190         -e 's![@]confdir[@]!@SDL_CONF_DIR@!g' \
191         -e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \
192         -e 's![@]PACKAGE_URL[@]!$(PACKAGE_URL)!g' \
193         $< > $@
194
195 bin_PROGRAMS = \
196     sdltool
197
198 sdltool_SOURCES = \
199     src/cli/main.cpp
200 sdltool_CPPFLAGS = \
201     $(BASE_CPPFLAGS) \
202     $(BOOST_CPPFLAGS)
203 sdltool_LDFLAGS = \
204     $(BOOST_LDFLAGS)
205 sdltool_LDADD = \
206     $(BOOST_PROGRAM_OPTIONS_LIB) \
207     libsdl.la \
208     -lboost_system \
209     libshareddatalayercli.la
210
211 check_LTLIBRARIES = \
212     libgmock.la libgtest.la
213
214 libgmock_la_SOURCES = \
215     3rdparty/googletest/googlemock/src/gmock-all.cc \
216     3rdparty/googletest/googlemock/src/gmock-cardinalities.cc \
217     3rdparty/googletest/googlemock/src/gmock.cc \
218     3rdparty/googletest/googlemock/src/gmock-internal-utils.cc \
219     3rdparty/googletest/googlemock/src/gmock_main.cc \
220     3rdparty/googletest/googlemock/src/gmock-matchers.cc \
221     3rdparty/googletest/googlemock/src/gmock-spec-builders.cc \
222     3rdparty/googletest/googlemock/include/gmock/gmock-actions.h \
223     3rdparty/googletest/googlemock/include/gmock/gmock-cardinalities.h \
224     3rdparty/googletest/googlemock/include/gmock/gmock-generated-actions.h \
225     3rdparty/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h \
226     3rdparty/googletest/googlemock/include/gmock/gmock-generated-matchers.h \
227     3rdparty/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h \
228     3rdparty/googletest/googlemock/include/gmock/gmock.h \
229     3rdparty/googletest/googlemock/include/gmock/gmock-matchers.h \
230     3rdparty/googletest/googlemock/include/gmock/gmock-more-actions.h \
231     3rdparty/googletest/googlemock/include/gmock/gmock-more-matchers.h \
232     3rdparty/googletest/googlemock/include/gmock/gmock-spec-builders.h \
233     3rdparty/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h \
234     3rdparty/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h \
235     3rdparty/googletest/googlemock/include/gmock/internal/gmock-port.h \
236     3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h \
237     3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h \
238     3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-port.h
239
240 libgmock_la_CPPFLAGS = \
241     -I$(top_srcdir)/3rdparty/googletest/googlemock/include/ \
242     -I$(top_srcdir)/3rdparty/googletest/googlemock/ \
243     -I$(top_srcdir)/3rdparty/googletest/googletest/include/
244 libgmock_la_LIBADD = \
245     -lpthread
246
247 libgtest_la_SOURCES = \
248     3rdparty/googletest/googletest/src/gtest-all.cc \
249     3rdparty/googletest/googletest/src/gtest.cc \
250     3rdparty/googletest/googletest/src/gtest-death-test.cc \
251     3rdparty/googletest/googletest/src/gtest-filepath.cc \
252     3rdparty/googletest/googletest/src/gtest-internal-inl.h \
253     3rdparty/googletest/googletest/src/gtest_main.cc \
254     3rdparty/googletest/googletest/src/gtest-port.cc \
255     3rdparty/googletest/googletest/src/gtest-printers.cc \
256     3rdparty/googletest/googletest/src/gtest-test-part.cc \
257     3rdparty/googletest/googletest/src/gtest-typed-test.cc \
258     3rdparty/googletest/googletest/include/gtest/gtest-death-test.h \
259     3rdparty/googletest/googletest/include/gtest/gtest.h \
260     3rdparty/googletest/googletest/include/gtest/gtest-message.h \
261     3rdparty/googletest/googletest/include/gtest/gtest-param-test.h \
262     3rdparty/googletest/googletest/include/gtest/gtest-param-test.h.pump \
263     3rdparty/googletest/googletest/include/gtest/gtest_pred_impl.h \
264     3rdparty/googletest/googletest/include/gtest/gtest-printers.h \
265     3rdparty/googletest/googletest/include/gtest/gtest_prod.h \
266     3rdparty/googletest/googletest/include/gtest/gtest-spi.h \
267     3rdparty/googletest/googletest/include/gtest/gtest-test-part.h \
268     3rdparty/googletest/googletest/include/gtest/gtest-typed-test.h \
269     3rdparty/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h \
270     3rdparty/googletest/googletest/include/gtest/internal/gtest-filepath.h \
271     3rdparty/googletest/googletest/include/gtest/internal/gtest-internal.h \
272     3rdparty/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h \
273     3rdparty/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h \
274     3rdparty/googletest/googletest/include/gtest/internal/gtest-param-util.h \
275     3rdparty/googletest/googletest/include/gtest/internal/gtest-port-arch.h \
276     3rdparty/googletest/googletest/include/gtest/internal/gtest-port.h \
277     3rdparty/googletest/googletest/include/gtest/internal/gtest-string.h \
278     3rdparty/googletest/googletest/include/gtest/internal/gtest-tuple.h \
279     3rdparty/googletest/googletest/include/gtest/internal/gtest-type-util.h \
280     3rdparty/googletest/googletest/include/gtest/internal/custom/gtest.h \
281     3rdparty/googletest/googletest/include/gtest/internal/custom/gtest-port.h \
282     3rdparty/googletest/googletest/include/gtest/internal/custom/gtest-printers.h
283
284 libgtest_la_CPPFLAGS = \
285     -I$(top_srcdir)/3rdparty/googletest/googletest/include/ \
286     -I$(top_srcdir)/3rdparty/googletest/googletest/
287 libgtest_la_LIBADD = \
288     -lpthread
289
290 check_PROGRAMS = \
291     testrunner
292
293 testrunner_SOURCES = \
294     include/private/tst/asyncstoragemock.hpp \
295     include/private/tst/databaseconfigurationmock.hpp \
296     include/private/tst/enginemock.hpp \
297     include/private/tst/gettopsrcdir.hpp \
298     include/private/tst/namespaceconfigurationsmock.hpp \
299     include/private/tst/systemmock.hpp \
300     include/private/tst/wellknownerrorcode.hpp \
301     tst/abort_test.cpp \
302     tst/asyncdummystorage_test.cpp \
303     tst/asyncstorage_test.cpp \
304     tst/backenderror_test.cpp \
305     tst/configurationreader_test.cpp \
306     tst/databaseconfiguration_test.cpp \
307     tst/databaseconfigurationimpl_test.cpp \
308     tst/emptynamespace_test.cpp \
309     tst/engine_test.cpp \
310     tst/engineimpl_test.cpp \
311     tst/error_test.cpp \
312     tst/errorqueries_test.cpp \
313     tst/eventfd_test.cpp \
314     tst/gettopsrcdir.cpp \
315     tst/filedescriptor_test.cpp \
316     tst/hostandport_test.cpp \
317     tst/invalidnamespace_test.cpp \
318     tst/main.cpp \
319     tst/namespaceconfigurations_test.cpp \
320     tst/namespaceconfigurationsimpl_test.cpp \
321     tst/namespacevalidator_test.cpp \
322     tst/publisherid_test.cpp \
323     tst/syncstorage_test.cpp \
324     tst/syncstorageimpl_test.cpp \
325     tst/system_test.cpp \
326     tst/timer_test.cpp \
327     tst/timerfd_test.cpp \
328     tst/wellknownerrorcode.cpp
329 if REDIS
330 testrunner_SOURCES += \
331     include/private/tst/asynccommanddispatchermock.hpp \
332     include/private/tst/asyncdatabasediscoverymock.hpp \
333     include/private/tst/contentsbuildermock.hpp \
334     include/private/tst/redisreplybuilder.hpp \
335     include/private/tst/replymock.hpp \
336     tst/asynccommanddispatcher_test.cpp \
337     tst/asyncdatabasediscovery_test.cpp \
338     tst/asyncredisstorage_test.cpp \
339     tst/asyncsentineldatabasediscovery_test.cpp \
340     tst/asyncstorageimpl_test.cpp \
341     tst/contents_test.cpp \
342     tst/contentsbuilder_test.cpp \
343     tst/databaseinfo_test.cpp \
344     tst/redisgeneral_test.cpp \
345     tst/redisreplybuilder.cpp \
346     tst/reply_test.cpp
347 endif
348 if HIREDIS
349 testrunner_SOURCES += \
350     include/private/tst/hiredisepolladaptermock.hpp \
351     include/private/tst/hiredissystemmock.hpp \
352     tst/asynchirediscommanddispatcher_test.cpp \
353     tst/asynchiredisdatabasediscovery_test.cpp \
354     tst/hiredisepolladapter_test.cpp \
355     tst/hiredissystem_test.cpp
356 endif
357 if HIREDIS_VIP
358 testrunner_SOURCES += \
359     include/private/tst/hiredisclusterepolladaptermock.hpp \
360     include/private/tst/hiredisclustersystemmock.hpp \
361     tst/asynchiredisclustercommanddispatcher_test.cpp \
362     tst/hiredisclusterepolladapter_test.cpp \
363     tst/hiredisclustersystem_test.cpp
364 endif
365 testrunner_CPPFLAGS = \
366     $(BASE_CPPFLAGS) \
367     -I$(top_srcdir)/3rdparty/googletest/googlemock/include \
368     -I$(top_srcdir)/3rdparty/googletest/googletest/include \
369     $(HIREDIS_CFLAGS) \
370     $(HIREDIS_VIP_CFLAGS)
371 testrunner_LDADD = \
372     libsdl.la \
373     libgmock.la \
374     libgtest.la
375
376 TESTS = \
377     run-tests.sh
378
379 test: testrunner
380         ./run-tests.sh
381
382 clean-local:
383         rm -f libsdl.pc
384
385 @DX_RULES@
386
387 MOSTLYCLEANFILES = \
388     $(DX_CLEANFILES)
389
390 EXTRA_DIST = \
391     $(top_srcdir)/libsdl.pc.in \
392     $(top_srcdir)/tst/valgrind-suppressions.conf \
393     $(top_srcdir)/LICENSES.txt
394
395 AUTOMAKE_OPTIONS = \
396     serial-tests