-never store NICKs anywhere but in '+', do not display nicks in gnunet-namestore
[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_nick \
45  test_namestore_api_lookup_shadow \
46  test_namestore_api_lookup_shadow_filter \
47  test_namestore_api_remove \
48  test_namestore_api_remove_not_existing_record \
49  test_namestore_api_zone_iteration \
50  test_namestore_api_zone_iteration_nick \
51  test_namestore_api_zone_iteration_specific_zone \
52  test_namestore_api_zone_iteration_stop \
53  test_namestore_api_monitoring \
54  test_namestore_api_monitoring_existing
55 #test_namestore_api_zone_to_name
56 endif
57
58 if HAVE_SQLITE
59 check_PROGRAMS = \
60  $(SQLITE_TESTS) \
61  $(POSTGRES_TESTS) \
62  $(TESTING_TESTS)
63 endif
64
65 if ENABLE_TEST_RUN
66 TESTS = \
67   $(check_PROGRAMS) \
68   $(check_SCRIPTS)
69 endif
70
71 lib_LTLIBRARIES = \
72   libgnunetnamestore.la
73
74 libgnunetnamestore_la_SOURCES = \
75   namestore_api.c \
76   namestore_api_monitor.c \
77   namestore.h
78 libgnunetnamestore_la_LIBADD = \
79   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
80   $(top_builddir)/src/statistics/libgnunetstatistics.la \
81   $(top_builddir)/src/dns/libgnunetdnsparser.la \
82   $(top_builddir)/src/util/libgnunetutil.la \
83   $(GN_LIBINTL)
84 libgnunetnamestore_la_LDFLAGS = \
85   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
86   -version-info 0:1:0
87
88 libexec_PROGRAMS = \
89  gnunet-service-namestore
90
91 bin_PROGRAMS = \
92  gnunet-namestore
93
94 if HAVE_MHD
95 libexec_PROGRAMS += \
96  gnunet-namestore-fcfsd
97 endif
98
99 gnunet_namestore_SOURCES = \
100  gnunet-namestore.c
101 gnunet_namestore_LDADD = \
102   $(top_builddir)/src/identity/libgnunetidentity.la \
103   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
104   $(top_builddir)/src/util/libgnunetutil.la \
105   libgnunetnamestore.la \
106   $(GN_LIBINTL)
107 gnunet_namestore_DEPENDENCIES = \
108   $(top_builddir)/src/identity/libgnunetidentity.la \
109   $(top_builddir)/src/util/libgnunetutil.la \
110   libgnunetnamestore.la
111
112
113 gnunet_namestore_fcfsd_SOURCES = \
114  gnunet-namestore-fcfsd.c
115 gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
116   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
117   $(top_builddir)/src/identity/libgnunetidentity.la \
118   $(top_builddir)/src/namestore/libgnunetnamestore.la \
119   $(top_builddir)/src/util/libgnunetutil.la \
120   $(GN_LIBINTL)
121 gnunet_namestore_fcfsd_DEPENDENCIES = \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   libgnunetnamestore.la
124
125
126
127 gnunet_service_namestore_SOURCES = \
128  gnunet-service-namestore.c
129
130 gnunet_service_namestore_LDADD = \
131   $(top_builddir)/src/namecache/libgnunetnamecache.la \
132   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
133   $(top_builddir)/src/statistics/libgnunetstatistics.la \
134   $(top_builddir)/src/util/libgnunetutil.la \
135   libgnunetnamestore.la \
136   $(GN_LIBINTL)
137 gnunet_service_namestore_DEPENDENCIES = \
138   $(top_builddir)/src/statistics/libgnunetstatistics.la \
139   $(top_builddir)/src/util/libgnunetutil.la \
140   libgnunetnamestore.la
141
142
143 plugin_LTLIBRARIES = \
144   $(SQLITE_PLUGIN) \
145   $(POSTGRES_PLUGIN)
146
147 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
148   plugin_namestore_sqlite.c
149 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
150   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
151   $(top_builddir)/src/statistics/libgnunetstatistics.la \
152   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
153   $(LTLIBINTL)
154 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
155  $(GN_PLUGIN_LDFLAGS)
156 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
157   $(top_builddir)/src/statistics/libgnunetstatistics.la \
158   $(top_builddir)/src/util/libgnunetutil.la \
159   libgnunetnamestore.la
160
161
162 libgnunet_plugin_namestore_postgres_la_SOURCES = \
163   plugin_namestore_postgres.c
164 libgnunet_plugin_namestore_postgres_la_LIBADD = \
165   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la  \
166   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
167   $(top_builddir)/src/statistics/libgnunetstatistics.la \
168   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
169   $(LTLIBINTL)
170 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
171  $(GN_PLUGIN_LDFLAGS)
172 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
173   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
174   $(top_builddir)/src/statistics/libgnunetstatistics.la \
175   $(top_builddir)/src/util/libgnunetutil.la \
176   libgnunetnamestore.la
177
178 test_namestore_api_store_SOURCES = \
179  test_namestore_api_store.c
180 test_namestore_api_store_LDADD = \
181   $(top_builddir)/src/testing/libgnunettesting.la \
182   $(top_builddir)/src/util/libgnunetutil.la \
183   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
184   $(top_builddir)/src/namestore/libgnunetnamestore.la
185
186 test_namestore_api_store_update_SOURCES = \
187  test_namestore_api_store_update.c
188 test_namestore_api_store_update_LDADD = \
189   $(top_builddir)/src/testing/libgnunettesting.la \
190   $(top_builddir)/src/util/libgnunetutil.la \
191   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
192   $(top_builddir)/src/namecache/libgnunetnamecache.la \
193   $(top_builddir)/src/namestore/libgnunetnamestore.la
194
195 test_namestore_api_lookup_public_SOURCES = \
196  test_namestore_api_lookup_public.c
197 test_namestore_api_lookup_public_LDADD = \
198   $(top_builddir)/src/testing/libgnunettesting.la \
199   $(top_builddir)/src/util/libgnunetutil.la \
200   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
201   $(top_builddir)/src/namecache/libgnunetnamecache.la \
202   $(top_builddir)/src/namestore/libgnunetnamestore.la
203
204 test_namestore_api_lookup_nick_SOURCES = \
205  test_namestore_api_lookup_nick.c
206 test_namestore_api_lookup_nick_LDADD = \
207   $(top_builddir)/src/testing/libgnunettesting.la \
208   $(top_builddir)/src/util/libgnunetutil.la \
209   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
210   $(top_builddir)/src/namecache/libgnunetnamecache.la \
211   $(top_builddir)/src/namestore/libgnunetnamestore.la
212
213 test_namestore_api_lookup_private_SOURCES = \
214  test_namestore_api_lookup_private.c
215 test_namestore_api_lookup_private_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   $(top_builddir)/src/namestore/libgnunetnamestore.la
221
222 test_namestore_api_lookup_shadow_SOURCES = \
223  test_namestore_api_lookup_shadow.c
224 test_namestore_api_lookup_shadow_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   $(top_builddir)/src/namestore/libgnunetnamestore.la
230
231 test_namestore_api_lookup_shadow_filter_SOURCES = \
232  test_namestore_api_lookup_shadow_filter.c
233 test_namestore_api_lookup_shadow_filter_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   $(top_builddir)/src/namestore/libgnunetnamestore.la
239
240 test_namestore_api_remove_SOURCES = \
241  test_namestore_api_remove.c
242 test_namestore_api_remove_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/namestore/libgnunetnamestore.la
247
248 test_namestore_api_remove_not_existing_record_SOURCES = \
249  test_namestore_api_remove_not_existing_record.c
250 test_namestore_api_remove_not_existing_record_LDADD = \
251   $(top_builddir)/src/testing/libgnunettesting.la \
252   $(top_builddir)/src/util/libgnunetutil.la \
253   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
254   $(top_builddir)/src/namestore/libgnunetnamestore.la
255
256 test_namestore_api_zone_to_name_SOURCES = \
257  test_namestore_api_zone_to_name.c
258 test_namestore_api_zone_to_name_LDADD = \
259   $(top_builddir)/src/testing/libgnunettesting.la \
260   $(top_builddir)/src/util/libgnunetutil.la \
261   $(top_builddir)/src/namestore/libgnunetnamestore.la
262
263 test_namestore_api_monitoring_SOURCES = \
264  test_namestore_api_monitoring.c
265 test_namestore_api_monitoring_LDADD = \
266   $(top_builddir)/src/testing/libgnunettesting.la \
267   $(top_builddir)/src/namestore/libgnunetnamestore.la \
268   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
269   $(top_builddir)/src/util/libgnunetutil.la
270
271 test_namestore_api_monitoring_existing_SOURCES = \
272  test_namestore_api_monitoring_existing.c
273 test_namestore_api_monitoring_existing_LDADD = \
274   $(top_builddir)/src/testing/libgnunettesting.la \
275   $(top_builddir)/src/namestore/libgnunetnamestore.la \
276   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
277   $(top_builddir)/src/util/libgnunetutil.la
278
279 test_namestore_api_zone_iteration_SOURCES = \
280  test_namestore_api_zone_iteration.c
281 test_namestore_api_zone_iteration_LDADD = \
282   $(top_builddir)/src/testing/libgnunettesting.la \
283   $(top_builddir)/src/util/libgnunetutil.la \
284   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
285   $(top_builddir)/src/namestore/libgnunetnamestore.la
286
287 test_namestore_api_zone_iteration_nick_SOURCES = \
288  test_namestore_api_zone_iteration_nick.c
289 test_namestore_api_zone_iteration_nick_LDADD = \
290   $(top_builddir)/src/testing/libgnunettesting.la \
291   $(top_builddir)/src/util/libgnunetutil.la \
292   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
293   $(top_builddir)/src/namestore/libgnunetnamestore.la
294
295
296 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
297  test_namestore_api_zone_iteration_specific_zone.c
298 test_namestore_api_zone_iteration_specific_zone_LDADD = \
299   $(top_builddir)/src/testing/libgnunettesting.la \
300   $(top_builddir)/src/util/libgnunetutil.la \
301   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
302   $(top_builddir)/src/namestore/libgnunetnamestore.la
303
304 test_namestore_api_zone_iteration_stop_SOURCES = \
305  test_namestore_api_zone_iteration_stop.c
306 test_namestore_api_zone_iteration_stop_LDADD = \
307   $(top_builddir)/src/testing/libgnunettesting.la \
308   $(top_builddir)/src/util/libgnunetutil.la \
309   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
310   $(top_builddir)/src/namestore/libgnunetnamestore.la
311
312 test_plugin_namestore_sqlite_SOURCES = \
313  test_plugin_namestore.c
314 test_plugin_namestore_sqlite_LDADD = \
315  $(top_builddir)/src/testing/libgnunettesting.la \
316  $(top_builddir)/src/util/libgnunetutil.la
317
318 test_plugin_namestore_postgres_SOURCES = \
319  test_plugin_namestore.c
320 test_plugin_namestore_postgres_LDADD = \
321  $(top_builddir)/src/testing/libgnunettesting.la \
322  $(top_builddir)/src/util/libgnunetutil.la
323
324 check_SCRIPTS = \
325         test_namestore_put.sh \
326         test_namestore_lookup.sh \
327         test_namestore_delete.sh
328
329 EXTRA_DIST = \
330   test_namestore_api.conf \
331   test_plugin_namestore_sqlite.conf \
332   test_plugin_namestore_postgres.conf \
333   test_hostkey \
334   zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \
335   zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \
336   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
337   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey \
338   $(check_SCRIPTS)
339