implementing plugin session monitoring API (#3452)
[oweals/gnunet.git] / src / datastore / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 pkgcfgdir= $(pkgdatadir)/config.d/
6
7 libexecdir= $(pkglibdir)/libexec/
8
9 pkgcfg_DATA = \
10   datastore.conf
11
12 if MINGW
13   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
14 endif
15
16 if USE_COVERAGE
17   AM_CFLAGS = --coverage -O0
18   XLIBS = -lgcov
19 endif
20
21
22 lib_LTLIBRARIES = \
23   libgnunetdatastore.la
24
25 libgnunetdatastore_la_SOURCES = \
26   datastore_api.c datastore.h 
27 libgnunetdatastore_la_LIBADD = \
28   $(top_builddir)/src/statistics/libgnunetstatistics.la \
29   $(top_builddir)/src/util/libgnunetutil.la \
30   $(GN_LIBINTL) 
31 libgnunetdatastore_la_LDFLAGS = \
32   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
33   -version-info 1:0:0
34
35 bin_PROGRAMS = \
36  gnunet-datastore
37
38 libexec_PROGRAMS = \
39  gnunet-service-datastore
40
41 gnunet_service_datastore_SOURCES = \
42  gnunet-service-datastore.c 
43 gnunet_service_datastore_LDADD = \
44   $(top_builddir)/src/statistics/libgnunetstatistics.la \
45   $(top_builddir)/src/util/libgnunetutil.la \
46   $(GN_LIBINTL)
47
48 gnunet_datastore_SOURCES = \
49  gnunet-datastore.c 
50 gnunet_datastore_LDADD = \
51   libgnunetdatastore.la \
52   $(top_builddir)/src/util/libgnunetutil.la \
53   $(GN_LIBINTL)
54
55
56 if HAVE_MYSQL
57  MYSQL_PLUGIN = libgnunet_plugin_datastore_mysql.la
58 if HAVE_TESTING
59 if HAVE_BENCHMARKS
60   MYSQL_BENCHMARKS = \
61    perf_datastore_api_mysql \
62    perf_plugin_datastore_mysql
63 endif
64  MYSQL_TESTS = \
65   test_datastore_api_mysql \
66   test_datastore_api_management_mysql \
67   test_plugin_datastore_mysql \
68   $(MYSQL_BENCHMARKS)
69 endif
70 endif
71 if HAVE_SQLITE
72  SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la
73 if HAVE_TESTING
74 if HAVE_BENCHMARKS
75   SQLITE_BENCHMARKS = \
76    perf_datastore_api_sqlite \
77    perf_plugin_datastore_sqlite
78 endif
79  SQLITE_TESTS = \
80   test_datastore_api_sqlite \
81   test_datastore_api_management_sqlite \
82   test_plugin_datastore_sqlite \
83   $(SQLITE_BENCHMARKS)
84 endif
85 endif
86 if HAVE_POSTGRESQL
87  POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la
88 if HAVE_TESTING
89 if HAVE_BENCHMARKS
90   POSTGRES_BENCHMARKS = \
91    perf_datastore_api_postgres \
92    perf_plugin_datastore_postgres
93 endif
94  POSTGRES_TESTS = \
95   test_datastore_api_postgres \
96   test_datastore_api_management_postgres \
97   test_plugin_datastore_postgres \
98   $(POSTGRES_BENCHMARKS)
99 endif
100 endif
101
102 plugin_LTLIBRARIES = \
103   $(SQLITE_PLUGIN) \
104   $(MYSQL_PLUGIN) \
105   $(POSTGRES_PLUGIN) \
106   libgnunet_plugin_datastore_heap.la \
107   libgnunet_plugin_datastore_template.la 
108
109
110 libgnunet_plugin_datastore_sqlite_la_SOURCES = \
111   plugin_datastore_sqlite.c
112 libgnunet_plugin_datastore_sqlite_la_LIBADD = \
113   $(top_builddir)/src/statistics/libgnunetstatistics.la \
114   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
115   $(LTLIBINTL)
116 libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \
117  $(GN_PLUGIN_LDFLAGS)
118
119
120 libgnunet_plugin_datastore_heap_la_SOURCES = \
121   plugin_datastore_heap.c
122 libgnunet_plugin_datastore_heap_la_LIBADD = \
123   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
124   $(LTLIBINTL)
125 libgnunet_plugin_datastore_heap_la_LDFLAGS = \
126  $(GN_PLUGIN_LDFLAGS)
127
128
129 libgnunet_plugin_datastore_mysql_la_SOURCES = \
130   plugin_datastore_mysql.c
131 libgnunet_plugin_datastore_mysql_la_LIBADD = \
132   $(top_builddir)/src/mysql/libgnunetmysql.la \
133   $(top_builddir)/src/statistics/libgnunetstatistics.la \
134   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) $(Z_LIBS) -lmysqlclient
135 libgnunet_plugin_datastore_mysql_la_LDFLAGS = \
136  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
137 libgnunet_plugin_datastore_mysql_la_CPPFLAGS = \
138  $(MYSQL_CPPFLAGS) $(AM_CPPFLAGS)
139
140 libgnunet_plugin_datastore_postgres_la_SOURCES = \
141   plugin_datastore_postgres.c
142 libgnunet_plugin_datastore_postgres_la_LIBADD = \
143   $(top_builddir)/src/statistics/libgnunetstatistics.la \
144   $(top_builddir)/src/postgres/libgnunetpostgres.la \
145   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq
146 libgnunet_plugin_datastore_postgres_la_LDFLAGS = \
147  $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
148 libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \
149  $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS)
150
151
152 libgnunet_plugin_datastore_template_la_SOURCES = \
153   plugin_datastore_template.c
154 libgnunet_plugin_datastore_template_la_LIBADD = \
155   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
156   $(LTLIBINTL)
157 libgnunet_plugin_datastore_template_la_LDFLAGS = \
158  $(GN_PLUGIN_LDFLAGS)
159
160 check_PROGRAMS = \
161   test_datastore_api_heap \
162   test_datastore_api_management_heap \
163   perf_datastore_api_heap \
164   perf_plugin_datastore_heap \
165   test_plugin_datastore_heap \
166   $(SQLITE_TESTS) \
167   $(MYSQL_TESTS) \
168   $(POSTGRES_TESTS)
169
170 if ENABLE_TEST_RUN
171 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
172 TESTS = $(check_PROGRAMS)
173 endif
174
175 test_datastore_api_heap_SOURCES = \
176  test_datastore_api.c
177 test_datastore_api_heap_LDADD = \
178  $(top_builddir)/src/testing/libgnunettesting.la \
179  libgnunetdatastore.la \
180  $(top_builddir)/src/util/libgnunetutil.la  
181
182 test_datastore_api_management_heap_SOURCES = \
183  test_datastore_api_management.c
184 test_datastore_api_management_heap_LDADD = \
185  $(top_builddir)/src/testing/libgnunettesting.la \
186  libgnunetdatastore.la \
187  $(top_builddir)/src/util/libgnunetutil.la  
188
189 perf_datastore_api_heap_SOURCES = \
190  perf_datastore_api.c
191 perf_datastore_api_heap_LDADD = \
192  $(top_builddir)/src/testing/libgnunettesting.la \
193  libgnunetdatastore.la \
194  $(top_builddir)/src/util/libgnunetutil.la  
195
196 perf_plugin_datastore_heap_SOURCES = \
197  perf_plugin_datastore.c
198 perf_plugin_datastore_heap_LDADD = \
199  $(top_builddir)/src/testing/libgnunettesting.la \
200  $(top_builddir)/src/util/libgnunetutil.la  
201
202 test_plugin_datastore_heap_SOURCES = \
203  test_plugin_datastore.c
204 test_plugin_datastore_heap_LDADD = \
205  $(top_builddir)/src/testing/libgnunettesting.la \
206  $(top_builddir)/src/util/libgnunetutil.la  
207
208
209 test_datastore_api_sqlite_SOURCES = \
210  test_datastore_api.c
211 test_datastore_api_sqlite_LDADD = \
212  $(top_builddir)/src/testing/libgnunettesting.la \
213  libgnunetdatastore.la \
214  $(top_builddir)/src/util/libgnunetutil.la  
215
216 test_datastore_api_management_sqlite_SOURCES = \
217  test_datastore_api_management.c
218 test_datastore_api_management_sqlite_LDADD = \
219  $(top_builddir)/src/testing/libgnunettesting.la \
220  libgnunetdatastore.la \
221  $(top_builddir)/src/util/libgnunetutil.la  
222
223 perf_datastore_api_sqlite_SOURCES = \
224  perf_datastore_api.c
225 perf_datastore_api_sqlite_LDADD = \
226  $(top_builddir)/src/testing/libgnunettesting.la \
227  libgnunetdatastore.la \
228  $(top_builddir)/src/util/libgnunetutil.la  
229
230 perf_plugin_datastore_sqlite_SOURCES = \
231  perf_plugin_datastore.c
232 perf_plugin_datastore_sqlite_LDADD = \
233  $(top_builddir)/src/testing/libgnunettesting.la \
234  $(top_builddir)/src/util/libgnunetutil.la  
235
236 test_plugin_datastore_sqlite_SOURCES = \
237  test_plugin_datastore.c
238 test_plugin_datastore_sqlite_LDADD = \
239  $(top_builddir)/src/testing/libgnunettesting.la \
240  $(top_builddir)/src/util/libgnunetutil.la  
241
242
243 test_datastore_api_mysql_SOURCES = \
244  test_datastore_api.c
245 test_datastore_api_mysql_LDADD = \
246  $(top_builddir)/src/testing/libgnunettesting.la \
247  libgnunetdatastore.la \
248  $(top_builddir)/src/util/libgnunetutil.la  
249
250 test_datastore_api_management_mysql_SOURCES = \
251  test_datastore_api_management.c
252 test_datastore_api_management_mysql_LDADD = \
253  $(top_builddir)/src/testing/libgnunettesting.la \
254  libgnunetdatastore.la \
255  $(top_builddir)/src/util/libgnunetutil.la  
256
257 perf_datastore_api_mysql_SOURCES = \
258  perf_datastore_api.c
259 perf_datastore_api_mysql_LDADD = \
260  $(top_builddir)/src/testing/libgnunettesting.la \
261  libgnunetdatastore.la \
262  $(top_builddir)/src/util/libgnunetutil.la  
263
264 test_plugin_datastore_mysql_SOURCES = \
265  test_plugin_datastore.c
266 test_plugin_datastore_mysql_LDADD = \
267  $(top_builddir)/src/testing/libgnunettesting.la \
268  $(top_builddir)/src/util/libgnunetutil.la  
269
270 perf_plugin_datastore_mysql_SOURCES = \
271  perf_plugin_datastore.c
272 perf_plugin_datastore_mysql_LDADD = \
273  $(top_builddir)/src/testing/libgnunettesting.la \
274  $(top_builddir)/src/util/libgnunetutil.la  
275
276
277 test_datastore_api_postgres_SOURCES = \
278  test_datastore_api.c
279 test_datastore_api_postgres_LDADD = \
280  $(top_builddir)/src/testing/libgnunettesting.la \
281  libgnunetdatastore.la \
282  $(top_builddir)/src/util/libgnunetutil.la  
283
284 test_datastore_api_management_postgres_SOURCES = \
285  test_datastore_api_management.c
286 test_datastore_api_management_postgres_LDADD = \
287  $(top_builddir)/src/testing/libgnunettesting.la \
288  libgnunetdatastore.la \
289  $(top_builddir)/src/util/libgnunetutil.la  
290
291 perf_datastore_api_postgres_SOURCES = \
292  perf_datastore_api.c
293 perf_datastore_api_postgres_LDADD = \
294  $(top_builddir)/src/testing/libgnunettesting.la \
295  libgnunetdatastore.la \
296  $(top_builddir)/src/util/libgnunetutil.la  
297
298 test_plugin_datastore_postgres_SOURCES = \
299  test_plugin_datastore.c
300 test_plugin_datastore_postgres_LDADD = \
301  $(top_builddir)/src/testing/libgnunettesting.la \
302  $(top_builddir)/src/util/libgnunetutil.la  
303
304 perf_plugin_datastore_postgres_SOURCES = \
305  perf_plugin_datastore.c
306 perf_plugin_datastore_postgres_LDADD = \
307  $(top_builddir)/src/testing/libgnunettesting.la \
308  $(top_builddir)/src/util/libgnunetutil.la  
309
310
311 EXTRA_DIST = \
312  test_defaults.conf \
313  test_datastore_api_data_sqlite.conf \
314  perf_plugin_datastore_data_sqlite.conf \
315  test_plugin_datastore_data_sqlite.conf \
316  test_datastore_api_data_heap.conf \
317  perf_plugin_datastore_data_heap.conf \
318  test_plugin_datastore_data_heap.conf \
319  test_datastore_api_data_mysql.conf \
320  perf_plugin_datastore_data_mysql.conf \
321  test_plugin_datastore_data_mysql.conf \
322  test_datastore_api_data_postgres.conf \
323  perf_plugin_datastore_data_postgres.conf \
324  test_plugin_datastore_data_postgres.conf