add function conv param string
[oweals/gnunet.git] / src / namestore / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include $(POSTGRESQL_CPPFLAGS)
3
4 plugindir = $(libdir)/gnunet
5
6 pkgcfgdir= $(pkgdatadir)/config.d/
7
8 libexecdir= $(pkglibdir)/libexec/
9
10 pkgcfg_DATA = \
11    namestore.conf
12
13
14 if MINGW
15   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
16 endif
17
18 if USE_COVERAGE
19   AM_CFLAGS = --coverage -O0
20   XLIBS = -lgcov
21 endif
22
23 if HAVE_EXPERIMENTAL
24 FLAT_PLUGIN = libgnunet_plugin_namestore_flat.la
25 if HAVE_TESTING
26 FLAT_TESTS = test_plugin_namestore_flat
27 endif
28 endif
29
30 if HAVE_SQLITE
31 SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
32 if HAVE_TESTING
33 SQLITE_TESTS = test_plugin_namestore_sqlite
34 endif
35 endif
36
37 if HAVE_POSTGRESQL
38 # postgres doesn't even build yet; thus: experimental!
39 POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
40 if HAVE_TESTING
41 POSTGRES_TESTS = test_plugin_namestore_postgres
42 endif
43 endif
44
45 # testcases do not even build yet; thus: experimental!
46 if HAVE_TESTING
47 TESTING_TESTS = \
48  test_namestore_api_store \
49  test_namestore_api_store_update \
50  test_namestore_api_lookup_public \
51  test_namestore_api_lookup_private \
52  test_namestore_api_lookup_nick \
53  test_namestore_api_lookup_shadow \
54  test_namestore_api_lookup_shadow_filter \
55  test_namestore_api_remove \
56  test_namestore_api_remove_not_existing_record \
57  test_namestore_api_zone_iteration \
58  test_namestore_api_zone_iteration_nick \
59  test_namestore_api_zone_iteration_specific_zone \
60  test_namestore_api_zone_iteration_stop \
61  test_namestore_api_monitoring \
62  test_namestore_api_monitoring_existing
63 # test_namestore_api_zone_to_name
64 endif
65
66 if HAVE_SQLITE
67 check_PROGRAMS = \
68  $(SQLITE_TESTS) \
69  $(POSTGRES_TESTS) \
70  $(FLAT_TESTS) \
71  $(TESTING_TESTS)
72 endif
73
74 if HAVE_MHD
75 if HAVE_JSON
76 REST_PLUGIN=libgnunet_plugin_rest_namestore.la
77 endif
78 endif
79
80 if ENABLE_TEST_RUN
81 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
82 TESTS = \
83   $(check_PROGRAMS) \
84   $(check_SCRIPTS)
85 endif
86
87 lib_LTLIBRARIES = \
88   libgnunetnamestore.la
89
90
91 libgnunetnamestore_la_SOURCES = \
92   namestore_api.c \
93   namestore_api_monitor.c \
94   namestore.h
95 libgnunetnamestore_la_LIBADD = \
96   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
97   $(top_builddir)/src/statistics/libgnunetstatistics.la \
98   $(top_builddir)/src/dns/libgnunetdnsparser.la \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(GN_LIBINTL)
101 libgnunetnamestore_la_LDFLAGS = \
102   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
103   -version-info 0:1:0
104
105 libexec_PROGRAMS = \
106  gnunet-service-namestore
107
108 bin_PROGRAMS = \
109  gnunet-namestore
110
111 if HAVE_MHD
112 libexec_PROGRAMS += \
113  gnunet-namestore-fcfsd
114 endif
115
116
117 gnunet_namestore_SOURCES = \
118  gnunet-namestore.c
119 gnunet_namestore_LDADD = \
120   $(top_builddir)/src/identity/libgnunetidentity.la \
121   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   libgnunetnamestore.la \
124   $(GN_LIBINTL)
125
126
127 gnunet_namestore_fcfsd_SOURCES = \
128  gnunet-namestore-fcfsd.c
129 gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
130   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
131   $(top_builddir)/src/identity/libgnunetidentity.la \
132   libgnunetnamestore.la \
133   $(top_builddir)/src/util/libgnunetutil.la \
134   $(GN_LIBINTL)
135
136
137
138 gnunet_service_namestore_SOURCES = \
139  gnunet-service-namestore.c
140
141 gnunet_service_namestore_LDADD = \
142   $(top_builddir)/src/namecache/libgnunetnamecache.la \
143   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
144   $(top_builddir)/src/statistics/libgnunetstatistics.la \
145   $(top_builddir)/src/util/libgnunetutil.la \
146   libgnunetnamestore.la \
147   $(GN_LIBINTL)
148
149
150 plugin_LTLIBRARIES = \
151   $(SQLITE_PLUGIN) \
152   $(POSTGRES_PLUGIN) \
153         $(FLAT_PLUGIN) \
154         $(REST_PLUGIN)
155
156
157
158 libgnunet_plugin_namestore_flat_la_SOURCES = \
159   plugin_namestore_flat.c
160 libgnunet_plugin_namestore_flat_la_LIBADD = \
161   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
162   $(top_builddir)/src/statistics/libgnunetstatistics.la \
163   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
164   $(LTLIBINTL)
165 libgnunet_plugin_namestore_flat_la_LDFLAGS = \
166  $(GN_PLUGIN_LDFLAGS)
167
168
169 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
170   plugin_namestore_sqlite.c
171 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
172   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
173   $(top_builddir)/src/statistics/libgnunetstatistics.la \
174   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
175   $(LTLIBINTL)
176 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
177  $(GN_PLUGIN_LDFLAGS)
178
179 libgnunet_plugin_namestore_postgres_la_SOURCES = \
180   plugin_namestore_postgres.c
181 libgnunet_plugin_namestore_postgres_la_LIBADD = \
182   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
183   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
184   $(top_builddir)/src/pq/libgnunetpq.la  \
185   $(top_builddir)/src/statistics/libgnunetstatistics.la \
186   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
187   $(LTLIBINTL)
188 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
189  $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
190
191 libgnunet_plugin_rest_namestore_la_SOURCES = \
192   plugin_rest_namestore.c
193 libgnunet_plugin_rest_namestore_la_LIBADD = \
194   libgnunetnamestore.la \
195   $(top_builddir)/src/rest/libgnunetrest.la \
196   $(top_builddir)/src/identity/libgnunetidentity.la \
197         $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \
198   $(top_builddir)/src/jsonapi/libgnunetjsonapiutils.la \  
199   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
200   $(LTLIBINTL) -ljansson -lmicrohttpd
201 libgnunet_plugin_rest_namestore_la_LDFLAGS = \
202  $(GN_PLUGIN_LDFLAGS)
203
204
205 test_namestore_api_store_SOURCES = \
206  test_namestore_api_store.c
207 test_namestore_api_store_LDADD = \
208   $(top_builddir)/src/testing/libgnunettesting.la \
209   $(top_builddir)/src/util/libgnunetutil.la \
210   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
211   libgnunetnamestore.la
212
213 test_namestore_api_store_update_SOURCES = \
214  test_namestore_api_store_update.c
215 test_namestore_api_store_update_LDADD = \
216   $(top_builddir)/src/testing/libgnunettesting.la \
217   $(top_builddir)/src/util/libgnunetutil.la \
218   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
219   $(top_builddir)/src/namecache/libgnunetnamecache.la \
220   libgnunetnamestore.la
221
222 test_namestore_api_lookup_public_SOURCES = \
223  test_namestore_api_lookup_public.c
224 test_namestore_api_lookup_public_LDADD = \
225   $(top_builddir)/src/testing/libgnunettesting.la \
226   $(top_builddir)/src/util/libgnunetutil.la \
227   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
228   $(top_builddir)/src/namecache/libgnunetnamecache.la \
229   libgnunetnamestore.la
230
231 test_namestore_api_lookup_nick_SOURCES = \
232  test_namestore_api_lookup_nick.c
233 test_namestore_api_lookup_nick_LDADD = \
234   $(top_builddir)/src/testing/libgnunettesting.la \
235   $(top_builddir)/src/util/libgnunetutil.la \
236   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
237   $(top_builddir)/src/namecache/libgnunetnamecache.la \
238   libgnunetnamestore.la
239
240 test_namestore_api_lookup_private_SOURCES = \
241  test_namestore_api_lookup_private.c
242 test_namestore_api_lookup_private_LDADD = \
243   $(top_builddir)/src/testing/libgnunettesting.la \
244   $(top_builddir)/src/util/libgnunetutil.la \
245   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
246   $(top_builddir)/src/namecache/libgnunetnamecache.la \
247   libgnunetnamestore.la
248
249 test_namestore_api_lookup_shadow_SOURCES = \
250  test_namestore_api_lookup_shadow.c
251 test_namestore_api_lookup_shadow_LDADD = \
252   $(top_builddir)/src/testing/libgnunettesting.la \
253   $(top_builddir)/src/util/libgnunetutil.la \
254   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
255   $(top_builddir)/src/namecache/libgnunetnamecache.la \
256   libgnunetnamestore.la
257
258 test_namestore_api_lookup_shadow_filter_SOURCES = \
259  test_namestore_api_lookup_shadow_filter.c
260 test_namestore_api_lookup_shadow_filter_LDADD = \
261   $(top_builddir)/src/testing/libgnunettesting.la \
262   $(top_builddir)/src/util/libgnunetutil.la \
263   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
264   $(top_builddir)/src/namecache/libgnunetnamecache.la \
265   libgnunetnamestore.la
266
267 test_namestore_api_remove_SOURCES = \
268  test_namestore_api_remove.c
269 test_namestore_api_remove_LDADD = \
270   $(top_builddir)/src/testing/libgnunettesting.la \
271   $(top_builddir)/src/util/libgnunetutil.la \
272   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
273   libgnunetnamestore.la
274
275 test_namestore_api_remove_not_existing_record_SOURCES = \
276  test_namestore_api_remove_not_existing_record.c
277 test_namestore_api_remove_not_existing_record_LDADD = \
278   $(top_builddir)/src/testing/libgnunettesting.la \
279   $(top_builddir)/src/util/libgnunetutil.la \
280   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
281   libgnunetnamestore.la
282
283 #test_namestore_api_zone_to_name_SOURCES = \
284 # test_namestore_api_zone_to_name.c
285 #test_namestore_api_zone_to_name_LDADD = \
286 #  $(top_builddir)/src/testing/libgnunettesting.la \
287 #  $(top_builddir)/src/util/libgnunetutil.la \
288 #  libgnunetnamestore.la
289
290 test_namestore_api_monitoring_SOURCES = \
291  test_namestore_api_monitoring.c
292 test_namestore_api_monitoring_LDADD = \
293   $(top_builddir)/src/testing/libgnunettesting.la \
294   libgnunetnamestore.la \
295   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
296   $(top_builddir)/src/util/libgnunetutil.la
297
298 test_namestore_api_monitoring_existing_SOURCES = \
299  test_namestore_api_monitoring_existing.c
300 test_namestore_api_monitoring_existing_LDADD = \
301   $(top_builddir)/src/testing/libgnunettesting.la \
302   libgnunetnamestore.la \
303   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
304   $(top_builddir)/src/util/libgnunetutil.la
305
306 test_namestore_api_zone_iteration_SOURCES = \
307  test_namestore_api_zone_iteration.c
308 test_namestore_api_zone_iteration_LDADD = \
309   $(top_builddir)/src/testing/libgnunettesting.la \
310   $(top_builddir)/src/util/libgnunetutil.la \
311   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
312   libgnunetnamestore.la
313
314 test_namestore_api_zone_iteration_nick_SOURCES = \
315  test_namestore_api_zone_iteration_nick.c
316 test_namestore_api_zone_iteration_nick_LDADD = \
317   $(top_builddir)/src/testing/libgnunettesting.la \
318   $(top_builddir)/src/util/libgnunetutil.la \
319   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
320   libgnunetnamestore.la
321
322
323 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
324  test_namestore_api_zone_iteration_specific_zone.c
325 test_namestore_api_zone_iteration_specific_zone_LDADD = \
326   $(top_builddir)/src/testing/libgnunettesting.la \
327   $(top_builddir)/src/util/libgnunetutil.la \
328   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
329   libgnunetnamestore.la
330
331 test_namestore_api_zone_iteration_stop_SOURCES = \
332  test_namestore_api_zone_iteration_stop.c
333 test_namestore_api_zone_iteration_stop_LDADD = \
334   $(top_builddir)/src/testing/libgnunettesting.la \
335   $(top_builddir)/src/util/libgnunetutil.la \
336   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
337   libgnunetnamestore.la
338
339 test_plugin_namestore_flat_SOURCES = \
340  test_plugin_namestore.c
341 test_plugin_namestore_flat_LDADD = \
342  $(top_builddir)/src/testing/libgnunettesting.la \
343  $(top_builddir)/src/util/libgnunetutil.la
344
345 test_plugin_namestore_sqlite_SOURCES = \
346  test_plugin_namestore.c
347 test_plugin_namestore_sqlite_LDADD = \
348  $(top_builddir)/src/testing/libgnunettesting.la \
349  $(top_builddir)/src/util/libgnunetutil.la
350
351 test_plugin_namestore_postgres_SOURCES = \
352  test_plugin_namestore.c
353 test_plugin_namestore_postgres_LDADD = \
354  $(top_builddir)/src/testing/libgnunettesting.la \
355  $(top_builddir)/src/util/libgnunetutil.la
356
357 check_SCRIPTS = \
358         test_namestore_put.sh \
359         test_namestore_lookup.sh \
360         test_namestore_delete.sh
361
362 EXTRA_DIST = \
363   test_namestore_api.conf \
364   test_plugin_namestore_sqlite.conf \
365   test_plugin_namestore_postgres.conf \
366         test_plugin_namestore_flat.conf \
367   test_hostkey \
368   zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \
369   zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \
370   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
371   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey \
372   $(check_SCRIPTS)
373