zone iteration stop
[oweals/gnunet.git] / src / namestore / Makefile.am
1 INCLUDES = -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 if HAVE_EXPERIMENTAL
32 POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
33 if HAVE_TESTING
34 POSTGRES_TESTS = test_plugin_namestore_postgres
35 endif
36 endif
37 endif
38
39 # testcases do not even build yet; thus: experimental!
40 if HAVE_EXPERIMENTAL
41
42 if HAVE_TESTING
43 TESTING_TESTS = \
44  test_namestore_api_store \
45  test_namestore_api_remove \
46  test_namestore_api_zone_iteration \
47  test_namestore_api_zone_iteration_specific_zone \
48  test_namestore_api_zone_iteration_stop
49 # test_namestore_api_lookup 
50 #test_namestore_api_lookup_specific_type
51 #test_namestore_api_create 
52 #test_namestore_api_create_update
53 #test_namestore_api_remove_not_existing_record 
54 #test_namestore_api_zone_to_name 
55 #test_namestore_api_monitoring 
56  
57  
58 #
59 endif
60
61 if HAVE_SQLITE
62 check_PROGRAMS = \
63  test_namestore_record_serialization \
64  test_namestore_api_blocks \
65  $(SQLITE_TESTS) \
66  $(POSTGRES_TESTS) \
67  $(TESTING_TESTS)
68 endif
69
70 # end of 'HAVE_EXPERIMENTAL' for testcases 
71 endif
72
73 if ENABLE_TEST_RUN
74 TESTS = $(check_PROGRAMS)
75 endif
76
77 lib_LTLIBRARIES = \
78   libgnunetnamestore.la
79
80 libgnunetnamestore_la_SOURCES = \
81   namestore_api.c \
82   namestore_api_monitor.c \
83   namestore_api_common.c \
84   namestore.h
85 libgnunetnamestore_la_LIBADD = \
86   $(top_builddir)/src/statistics/libgnunetstatistics.la \
87   $(top_builddir)/src/util/libgnunetutil.la \
88   $(GN_LIBINTL) 
89 libgnunetnamestore_la_LDFLAGS = \
90   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
91   -version-info 0:1:0
92
93 libexec_PROGRAMS = \
94  gnunet-service-namestore 
95
96 bin_PROGRAMS = \
97  gnunet-namestore 
98
99 if HAVE_MHD
100 bin_PROGRAMS += \
101  gnunet-namestore-fcfsd
102 endif
103
104 gnunet_namestore_SOURCES = \
105  gnunet-namestore.c 
106 gnunet_namestore_LDADD = \
107   $(top_builddir)/src/util/libgnunetutil.la \
108   $(top_builddir)/src/identity/libgnunetidentity.la \
109   libgnunetnamestore.la \
110   $(GN_LIBINTL)
111 gnunet_namestore_DEPENDENCIES = \
112   $(top_builddir)/src/identity/libgnunetidentity.la \
113   $(top_builddir)/src/util/libgnunetutil.la \
114   libgnunetnamestore.la
115
116
117 gnunet_namestore_fcfsd_SOURCES = \
118  gnunet-namestore-fcfsd.c 
119 gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
120   $(top_builddir)/src/util/libgnunetutil.la \
121   $(top_builddir)/src/identity/libgnunetidentity.la \
122   $(top_builddir)/src/namestore/libgnunetnamestore.la \
123   $(GN_LIBINTL)
124 gnunet_namestore_fcfsd_DEPENDENCIES = \
125   $(top_builddir)/src/util/libgnunetutil.la \
126   libgnunetnamestore.la
127
128
129
130 gnunet_service_namestore_SOURCES = \
131  gnunet-service-namestore.c
132
133 gnunet_service_namestore_LDADD = \
134   $(top_builddir)/src/statistics/libgnunetstatistics.la \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   libgnunetnamestore.la \
137   $(GN_LIBINTL)
138 gnunet_service_namestore_DEPENDENCIES = \
139   $(top_builddir)/src/statistics/libgnunetstatistics.la \
140   $(top_builddir)/src/util/libgnunetutil.la \
141   libgnunetnamestore.la
142
143
144 plugin_LTLIBRARIES = \
145   $(SQLITE_PLUGIN) \
146   $(POSTGRES_PLUGIN)
147
148 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
149   plugin_namestore_sqlite.c 
150 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
151   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
152   $(top_builddir)/src/statistics/libgnunetstatistics.la \
153   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
154   $(LTLIBINTL)
155 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
156  $(GN_PLUGIN_LDFLAGS)
157 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
158   $(top_builddir)/src/statistics/libgnunetstatistics.la \
159   $(top_builddir)/src/util/libgnunetutil.la \
160   libgnunetnamestore.la
161
162
163 libgnunet_plugin_namestore_postgres_la_SOURCES = \
164   plugin_namestore_postgres.c 
165 libgnunet_plugin_namestore_postgres_la_LIBADD = \
166   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
167   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
168   $(top_builddir)/src/statistics/libgnunetstatistics.la \
169   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
170   $(LTLIBINTL)
171 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
172  $(GN_PLUGIN_LDFLAGS)
173 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
174   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
175   $(top_builddir)/src/statistics/libgnunetstatistics.la \
176   $(top_builddir)/src/util/libgnunetutil.la \
177   libgnunetnamestore.la
178
179 test_namestore_api_blocks_SOURCES = \
180  test_namestore_api_blocks.c
181 test_namestore_api_blocks_LDADD = \
182   $(top_builddir)/src/util/libgnunetutil.la \
183   $(top_builddir)/src/testing/libgnunettesting.la \
184   $(top_builddir)/src/namestore/libgnunetnamestore.la
185
186 test_namestore_api_store_SOURCES = \
187  test_namestore_api_store.c
188 test_namestore_api_store_LDADD = \
189   $(top_builddir)/src/testing/libgnunettesting.la \
190   $(top_builddir)/src/util/libgnunetutil.la \
191   $(top_builddir)/src/namestore/libgnunetnamestore.la
192
193 test_namestore_api_put_SOURCES = \
194  test_namestore_api_put.c
195 test_namestore_api_put_LDADD = \
196   $(top_builddir)/src/testing/libgnunettesting.la \
197   $(top_builddir)/src/util/libgnunetutil.la \
198   $(top_builddir)/src/namestore/libgnunetnamestore.la
199
200 test_namestore_api_lookup_SOURCES = \
201  test_namestore_api_lookup.c
202 test_namestore_api_lookup_LDADD = \
203   $(top_builddir)/src/testing/libgnunettesting.la \
204   $(top_builddir)/src/util/libgnunetutil.la \
205   $(top_builddir)/src/namestore/libgnunetnamestore.la
206
207 test_namestore_api_lookup_specific_type_SOURCES = \
208  test_namestore_api_lookup_specific_type.c
209 test_namestore_api_lookup_specific_type_LDADD = \
210   $(top_builddir)/src/testing/libgnunettesting.la \
211   $(top_builddir)/src/util/libgnunetutil.la \
212   $(top_builddir)/src/namestore/libgnunetnamestore.la
213
214
215 test_namestore_api_create_SOURCES = \
216  test_namestore_api_create.c
217 test_namestore_api_create_LDADD = \
218   $(top_builddir)/src/testing/libgnunettesting.la \
219   $(top_builddir)/src/util/libgnunetutil.la \
220   $(top_builddir)/src/namestore/libgnunetnamestore.la
221
222 test_namestore_api_create_update_SOURCES = \
223  test_namestore_api_create_update.c
224 test_namestore_api_create_update_LDADD = \
225   $(top_builddir)/src/testing/libgnunettesting.la \
226   $(top_builddir)/src/util/libgnunetutil.la \
227   $(top_builddir)/src/namestore/libgnunetnamestore.la
228
229
230 test_namestore_api_remove_SOURCES = \
231  test_namestore_api_remove.c
232 test_namestore_api_remove_LDADD = \
233   $(top_builddir)/src/testing/libgnunettesting.la \
234   $(top_builddir)/src/util/libgnunetutil.la \
235   $(top_builddir)/src/namestore/libgnunetnamestore.la
236
237 test_namestore_api_remove_not_existing_record_SOURCES = \
238  test_namestore_api_remove_not_existing_record.c
239 test_namestore_api_remove_not_existing_record_LDADD = \
240   $(top_builddir)/src/testing/libgnunettesting.la \
241   $(top_builddir)/src/util/libgnunetutil.la \
242   $(top_builddir)/src/namestore/libgnunetnamestore.la
243
244 test_namestore_api_zone_to_name_SOURCES = \
245  test_namestore_api_zone_to_name.c
246 test_namestore_api_zone_to_name_LDADD = \
247   $(top_builddir)/src/testing/libgnunettesting.la \
248   $(top_builddir)/src/util/libgnunetutil.la \
249   $(top_builddir)/src/namestore/libgnunetnamestore.la
250
251 test_namestore_api_monitoring_SOURCES = \
252  test_namestore_api_monitoring.c
253 test_namestore_api_monitoring_LDADD = \
254   $(top_builddir)/src/testing/libgnunettesting.la \
255   $(top_builddir)/src/namestore/libgnunetnamestore.la \
256   $(top_builddir)/src/util/libgnunetutil.la 
257
258 test_namestore_api_zone_iteration_SOURCES = \
259  test_namestore_api_zone_iteration.c
260 test_namestore_api_zone_iteration_LDADD = \
261   $(top_builddir)/src/testing/libgnunettesting.la \
262   $(top_builddir)/src/util/libgnunetutil.la \
263   $(top_builddir)/src/namestore/libgnunetnamestore.la  
264
265 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
266  test_namestore_api_zone_iteration_specific_zone.c
267 test_namestore_api_zone_iteration_specific_zone_LDADD = \
268   $(top_builddir)/src/testing/libgnunettesting.la \
269   $(top_builddir)/src/util/libgnunetutil.la \
270   $(top_builddir)/src/namestore/libgnunetnamestore.la  
271
272 test_namestore_api_zone_iteration_stop_SOURCES = \
273  test_namestore_api_zone_iteration_stop.c
274 test_namestore_api_zone_iteration_stop_LDADD = \
275   $(top_builddir)/src/testing/libgnunettesting.la \
276   $(top_builddir)/src/util/libgnunetutil.la \
277   $(top_builddir)/src/namestore/libgnunetnamestore.la    
278
279 test_namestore_record_serialization_SOURCES = \
280  test_namestore_record_serialization.c
281 test_namestore_record_serialization_LDADD = \
282   $(top_builddir)/src/testing/libgnunettesting.la \
283   $(top_builddir)/src/util/libgnunetutil.la \
284   $(top_builddir)/src/namestore/libgnunetnamestore.la  
285
286 EXTRA_DIST = \
287   test_namestore_api.conf \
288   test_plugin_namestore_sqlite.conf \
289   test_plugin_namestore_postgres.conf \
290   test_hostkey \
291   zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \
292   zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \
293   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
294   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
295
296
297
298 test_plugin_namestore_sqlite_SOURCES = \
299  test_plugin_namestore.c
300 test_plugin_namestore_sqlite_LDADD = \
301  $(top_builddir)/src/testing/libgnunettesting.la \
302  $(top_builddir)/src/util/libgnunetutil.la  
303
304 test_plugin_namestore_postgres_SOURCES = \
305  test_plugin_namestore.c
306 test_plugin_namestore_postgres_LDADD = \
307  $(top_builddir)/src/testing/libgnunettesting.la \
308  $(top_builddir)/src/util/libgnunetutil.la