added adaptive step-intervals
[oweals/gnunet.git] / src / namestore / 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    namestore.conf
11
12
13 if MINGW
14   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = --coverage -O0
19   XLIBS = -lgcov
20 endif
21
22 if HAVE_SQLITE
23 SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
24 if HAVE_TESTING
25 SQLITE_TESTS = test_plugin_namestore_sqlite
26 endif
27 endif
28
29 if HAVE_POSTGRES
30 # postgres doesn't even build yet; thus: experimental!
31 POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
32 if HAVE_TESTING
33 POSTGRES_TESTS = test_plugin_namestore_postgres
34 endif
35 endif
36
37 # testcases do not even build yet; thus: experimental!
38 if HAVE_TESTING
39 TESTING_TESTS = \
40  test_namestore_api_store \
41  test_namestore_api_store_update \
42  test_namestore_api_lookup_public \
43  test_namestore_api_lookup_private \
44  test_namestore_api_lookup_shadow \
45  test_namestore_api_lookup_shadow_filter \
46  test_namestore_api_remove \
47  test_namestore_api_remove_not_existing_record \
48  test_namestore_api_zone_iteration \
49  test_namestore_api_zone_iteration_specific_zone \
50  test_namestore_api_zone_iteration_stop \
51  test_namestore_api_monitoring \
52  test_namestore_api_monitoring_existing
53 #test_namestore_api_zone_to_name
54 endif
55
56 if HAVE_SQLITE
57 check_PROGRAMS = \
58  $(SQLITE_TESTS) \
59  $(POSTGRES_TESTS) \
60  $(TESTING_TESTS)
61 endif
62
63 if ENABLE_TEST_RUN
64 TESTS = \
65   $(check_PROGRAMS) \
66   $(check_SCRIPTS)
67 endif
68
69 lib_LTLIBRARIES = \
70   libgnunetnamestore.la
71
72 libgnunetnamestore_la_SOURCES = \
73   namestore_api.c \
74   namestore_api_monitor.c \
75   namestore.h
76 libgnunetnamestore_la_LIBADD = \
77   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
78   $(top_builddir)/src/statistics/libgnunetstatistics.la \
79   $(top_builddir)/src/dns/libgnunetdnsparser.la \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(GN_LIBINTL)
82 libgnunetnamestore_la_LDFLAGS = \
83   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
84   -version-info 0:1:0
85
86 libexec_PROGRAMS = \
87  gnunet-service-namestore
88
89 bin_PROGRAMS = \
90  gnunet-namestore
91
92 if HAVE_MHD
93 libexec_PROGRAMS += \
94  gnunet-namestore-fcfsd
95 endif
96
97 gnunet_namestore_SOURCES = \
98  gnunet-namestore.c
99 gnunet_namestore_LDADD = \
100   $(top_builddir)/src/identity/libgnunetidentity.la \
101   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
102   $(top_builddir)/src/util/libgnunetutil.la \
103   libgnunetnamestore.la \
104   $(GN_LIBINTL)
105 gnunet_namestore_DEPENDENCIES = \
106   $(top_builddir)/src/identity/libgnunetidentity.la \
107   $(top_builddir)/src/util/libgnunetutil.la \
108   libgnunetnamestore.la
109
110
111 gnunet_namestore_fcfsd_SOURCES = \
112  gnunet-namestore-fcfsd.c
113 gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
114   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
115   $(top_builddir)/src/identity/libgnunetidentity.la \
116   $(top_builddir)/src/namestore/libgnunetnamestore.la \
117   $(top_builddir)/src/util/libgnunetutil.la \
118   $(GN_LIBINTL)
119 gnunet_namestore_fcfsd_DEPENDENCIES = \
120   $(top_builddir)/src/util/libgnunetutil.la \
121   libgnunetnamestore.la
122
123
124
125 gnunet_service_namestore_SOURCES = \
126  gnunet-service-namestore.c
127
128 gnunet_service_namestore_LDADD = \
129   $(top_builddir)/src/namecache/libgnunetnamecache.la \
130   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
131   $(top_builddir)/src/statistics/libgnunetstatistics.la \
132   $(top_builddir)/src/util/libgnunetutil.la \
133   libgnunetnamestore.la \
134   $(GN_LIBINTL)
135 gnunet_service_namestore_DEPENDENCIES = \
136   $(top_builddir)/src/statistics/libgnunetstatistics.la \
137   $(top_builddir)/src/util/libgnunetutil.la \
138   libgnunetnamestore.la
139
140
141 plugin_LTLIBRARIES = \
142   $(SQLITE_PLUGIN) \
143   $(POSTGRES_PLUGIN)
144
145 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
146   plugin_namestore_sqlite.c
147 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
148   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
149   $(top_builddir)/src/statistics/libgnunetstatistics.la \
150   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
151   $(LTLIBINTL)
152 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
153  $(GN_PLUGIN_LDFLAGS)
154 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
155   $(top_builddir)/src/statistics/libgnunetstatistics.la \
156   $(top_builddir)/src/util/libgnunetutil.la \
157   libgnunetnamestore.la
158
159
160 libgnunet_plugin_namestore_postgres_la_SOURCES = \
161   plugin_namestore_postgres.c
162 libgnunet_plugin_namestore_postgres_la_LIBADD = \
163   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
164   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
165   $(top_builddir)/src/statistics/libgnunetstatistics.la \
166   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
167   $(LTLIBINTL)
168 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
169  $(GN_PLUGIN_LDFLAGS)
170 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
171   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
172   $(top_builddir)/src/statistics/libgnunetstatistics.la \
173   $(top_builddir)/src/util/libgnunetutil.la \
174   libgnunetnamestore.la
175
176 test_namestore_api_store_SOURCES = \
177  test_namestore_api_store.c
178 test_namestore_api_store_LDADD = \
179   $(top_builddir)/src/testing/libgnunettesting.la \
180   $(top_builddir)/src/util/libgnunetutil.la \
181   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
182   $(top_builddir)/src/namestore/libgnunetnamestore.la
183
184 test_namestore_api_store_update_SOURCES = \
185  test_namestore_api_store_update.c
186 test_namestore_api_store_update_LDADD = \
187   $(top_builddir)/src/testing/libgnunettesting.la \
188   $(top_builddir)/src/util/libgnunetutil.la \
189   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
190   $(top_builddir)/src/namecache/libgnunetnamecache.la \
191   $(top_builddir)/src/namestore/libgnunetnamestore.la
192
193 test_namestore_api_lookup_public_SOURCES = \
194  test_namestore_api_lookup_public.c
195 test_namestore_api_lookup_public_LDADD = \
196   $(top_builddir)/src/testing/libgnunettesting.la \
197   $(top_builddir)/src/util/libgnunetutil.la \
198   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
199   $(top_builddir)/src/namecache/libgnunetnamecache.la \
200   $(top_builddir)/src/namestore/libgnunetnamestore.la
201
202 test_namestore_api_lookup_private_SOURCES = \
203  test_namestore_api_lookup_private.c
204 test_namestore_api_lookup_private_LDADD = \
205   $(top_builddir)/src/testing/libgnunettesting.la \
206   $(top_builddir)/src/util/libgnunetutil.la \
207   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
208   $(top_builddir)/src/namecache/libgnunetnamecache.la \
209   $(top_builddir)/src/namestore/libgnunetnamestore.la
210
211 test_namestore_api_lookup_shadow_SOURCES = \
212  test_namestore_api_lookup_shadow.c
213 test_namestore_api_lookup_shadow_LDADD = \
214   $(top_builddir)/src/testing/libgnunettesting.la \
215   $(top_builddir)/src/util/libgnunetutil.la \
216   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
217   $(top_builddir)/src/namecache/libgnunetnamecache.la \
218   $(top_builddir)/src/namestore/libgnunetnamestore.la
219
220 test_namestore_api_lookup_shadow_filter_SOURCES = \
221  test_namestore_api_lookup_shadow_filter.c
222 test_namestore_api_lookup_shadow_filter_LDADD = \
223   $(top_builddir)/src/testing/libgnunettesting.la \
224   $(top_builddir)/src/util/libgnunetutil.la \
225   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
226   $(top_builddir)/src/namecache/libgnunetnamecache.la \
227   $(top_builddir)/src/namestore/libgnunetnamestore.la
228
229 test_namestore_api_put_SOURCES = \
230  test_namestore_api_put.c
231 test_namestore_api_put_LDADD = \
232   $(top_builddir)/src/testing/libgnunettesting.la \
233   $(top_builddir)/src/util/libgnunetutil.la \
234   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
235   $(top_builddir)/src/namestore/libgnunetnamestore.la
236
237 test_namestore_api_remove_SOURCES = \
238  test_namestore_api_remove.c
239 test_namestore_api_remove_LDADD = \
240   $(top_builddir)/src/testing/libgnunettesting.la \
241   $(top_builddir)/src/util/libgnunetutil.la \
242   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
243   $(top_builddir)/src/namestore/libgnunetnamestore.la
244
245 test_namestore_api_remove_not_existing_record_SOURCES = \
246  test_namestore_api_remove_not_existing_record.c
247 test_namestore_api_remove_not_existing_record_LDADD = \
248   $(top_builddir)/src/testing/libgnunettesting.la \
249   $(top_builddir)/src/util/libgnunetutil.la \
250   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
251   $(top_builddir)/src/namestore/libgnunetnamestore.la
252
253 test_namestore_api_zone_to_name_SOURCES = \
254  test_namestore_api_zone_to_name.c
255 test_namestore_api_zone_to_name_LDADD = \
256   $(top_builddir)/src/testing/libgnunettesting.la \
257   $(top_builddir)/src/util/libgnunetutil.la \
258   $(top_builddir)/src/namestore/libgnunetnamestore.la
259
260 test_namestore_api_monitoring_SOURCES = \
261  test_namestore_api_monitoring.c
262 test_namestore_api_monitoring_LDADD = \
263   $(top_builddir)/src/testing/libgnunettesting.la \
264   $(top_builddir)/src/namestore/libgnunetnamestore.la \
265   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
266   $(top_builddir)/src/util/libgnunetutil.la
267
268 test_namestore_api_monitoring_existing_SOURCES = \
269  test_namestore_api_monitoring_existing.c
270 test_namestore_api_monitoring_existing_LDADD = \
271   $(top_builddir)/src/testing/libgnunettesting.la \
272   $(top_builddir)/src/namestore/libgnunetnamestore.la \
273   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
274   $(top_builddir)/src/util/libgnunetutil.la
275
276 test_namestore_api_zone_iteration_SOURCES = \
277  test_namestore_api_zone_iteration.c
278 test_namestore_api_zone_iteration_LDADD = \
279   $(top_builddir)/src/testing/libgnunettesting.la \
280   $(top_builddir)/src/util/libgnunetutil.la \
281   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
282   $(top_builddir)/src/namestore/libgnunetnamestore.la
283
284 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
285  test_namestore_api_zone_iteration_specific_zone.c
286 test_namestore_api_zone_iteration_specific_zone_LDADD = \
287   $(top_builddir)/src/testing/libgnunettesting.la \
288   $(top_builddir)/src/util/libgnunetutil.la \
289   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
290   $(top_builddir)/src/namestore/libgnunetnamestore.la
291
292 test_namestore_api_zone_iteration_stop_SOURCES = \
293  test_namestore_api_zone_iteration_stop.c
294 test_namestore_api_zone_iteration_stop_LDADD = \
295   $(top_builddir)/src/testing/libgnunettesting.la \
296   $(top_builddir)/src/util/libgnunetutil.la \
297   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
298   $(top_builddir)/src/namestore/libgnunetnamestore.la
299
300 test_plugin_namestore_sqlite_SOURCES = \
301  test_plugin_namestore.c
302 test_plugin_namestore_sqlite_LDADD = \
303  $(top_builddir)/src/testing/libgnunettesting.la \
304  $(top_builddir)/src/util/libgnunetutil.la
305
306 test_plugin_namestore_postgres_SOURCES = \
307  test_plugin_namestore.c
308 test_plugin_namestore_postgres_LDADD = \
309  $(top_builddir)/src/testing/libgnunettesting.la \
310  $(top_builddir)/src/util/libgnunetutil.la
311
312 check_SCRIPTS = \
313         test_namestore_put.sh \
314         test_namestore_lookup.sh \
315         test_namestore_delete.sh
316
317 EXTRA_DIST = \
318   test_namestore_api.conf \
319   test_plugin_namestore_sqlite.conf \
320   test_plugin_namestore_postgres.conf \
321   test_namestore_defaults.conf \
322   test_hostkey \
323   zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \
324   zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \
325   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
326   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey \
327   $(check_SCRIPTS)
328