-add retries, and retry limit (#2659)
[oweals/gnunet.git] / src / fs / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if MINGW
4  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols 
5 endif
6
7 if USE_COVERAGE
8   AM_CFLAGS = --coverage -O0
9   XLIB = -lgcov
10 endif
11
12 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 libexecdir= $(pkglibdir)/libexec/
15
16 pkgcfg_DATA = \
17   fs.conf
18
19 plugindir = $(libdir)/gnunet
20
21
22 lib_LTLIBRARIES = libgnunetfs.la
23
24 plugin_LTLIBRARIES = \
25   libgnunet_plugin_block_fs.la 
26
27 noinst_LIBRARIES = libgnunetfstest.a
28
29 libgnunetfs_la_SOURCES = \
30   fs_api.c fs_api.h fs.h \
31   fs_directory.c \
32   fs_dirmetascan.c \
33   fs_download.c \
34   fs_file_information.c \
35   fs_getopt.c \
36   fs_list_indexed.c \
37   fs_publish.c \
38   fs_publish_ksk.c \
39   fs_misc.c \
40   fs_namespace.c \
41   fs_namespace_advertise.c \
42   fs_search.c \
43   fs_sharetree.c \
44   fs_tree.c fs_tree.h \
45   fs_unindex.c \
46   fs_uri.c 
47
48 libgnunetfs_la_LIBADD = \
49   $(top_builddir)/src/datastore/libgnunetdatastore.la \
50   $(top_builddir)/src/util/libgnunetutil.la \
51   $(GN_LIBINTL) $(XLIB) -lunistring -lextractor
52
53 libgnunetfs_la_LDFLAGS = \
54   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
55   -version-info 2:2:0
56
57
58 libgnunetfstest_a_SOURCES = \
59   fs_test_lib.c fs_test_lib.h
60
61 libgnunetfstest_a_LIBADD = \
62   $(top_builddir)/src/testing/libgnunettesting.la \
63   $(top_builddir)/src/testbed/libgnunettestbed.la 
64
65 libexec_PROGRAMS = \
66   gnunet-helper-fs-publish \
67   gnunet-service-fs 
68
69 bin_PROGRAMS = \
70   gnunet-auto-share \
71   gnunet-directory \
72   gnunet-download \
73   gnunet-publish \
74   gnunet-pseudonym \
75   gnunet-search \
76   gnunet-fs \
77   gnunet-unindex 
78
79 bin_SCRIPTS = \
80   gnunet-download-manager.scm
81
82 gnunet_directory_SOURCES = \
83  gnunet-directory.c
84 gnunet_directory_LDADD = \
85   $(top_builddir)/src/fs/libgnunetfs.la \
86   $(top_builddir)/src/util/libgnunetutil.la \
87   -lextractor \
88   $(GN_LIBINTL)
89 gnunet_directory_DEPENDENCIES = \
90   libgnunetfs.la
91
92 gnunet_fs_SOURCES = \
93  gnunet-fs.c
94 gnunet_fs_LDADD = \
95   $(top_builddir)/src/fs/libgnunetfs.la \
96   $(top_builddir)/src/util/libgnunetutil.la \
97   -lextractor \
98   $(GN_LIBINTL)
99 gnunet_fs_DEPENDENCIES = \
100   libgnunetfs.la
101
102 gnunet_download_SOURCES =  \
103  gnunet-download.c         
104 gnunet_download_LDADD =  \
105  $(top_builddir)/src/fs/libgnunetfs.la \
106  $(top_builddir)/src/util/libgnunetutil.la \
107  $(GN_LIBINTL)
108 gnunet_download_DEPENDENCIES = \
109   libgnunetfs.la
110
111 gnunet_publish_SOURCES =  \
112  gnunet-publish.c         
113 gnunet_publish_LDADD =  \
114  $(top_builddir)/src/fs/libgnunetfs.la \
115  $(top_builddir)/src/util/libgnunetutil.la \
116  -lextractor \
117  $(GN_LIBINTL)
118 gnunet_publish_DEPENDENCIES = \
119   libgnunetfs.la
120
121 gnunet_auto_share_SOURCES =  \
122  gnunet-auto-share.c         
123 gnunet_auto_share_LDADD =  \
124  $(top_builddir)/src/util/libgnunetutil.la \
125  -lextractor \
126  $(GN_LIBINTL)
127 gnunet_auto_share_DEPENDENCIES = \
128   libgnunetfs.la
129
130 gnunet_helper_fs_publish_SOURCES =  \
131  gnunet-helper-fs-publish.c 
132 gnunet_helper_fs_publish_LDADD =  \
133  $(top_builddir)/src/util/libgnunetutil.la \
134  -lextractor \
135  $(GN_LIBINTL)
136 gnunet_helper_fs_publish_DEPENDENCIES = \
137   libgnunetfs.la
138
139 gnunet_pseudonym_SOURCES = \
140  gnunet-pseudonym.c
141 gnunet_pseudonym_LDADD = \
142   $(top_builddir)/src/fs/libgnunetfs.la \
143   $(top_builddir)/src/util/libgnunetutil.la \
144   -lextractor \
145   $(GN_LIBINTL)
146 gnunet_pseudonym_DEPENDENCIES = \
147   libgnunetfs.la
148
149 gnunet_search_SOURCES = \
150  gnunet-search.c         
151 gnunet_search_LDADD = \
152   $(top_builddir)/src/fs/libgnunetfs.la \
153   $(top_builddir)/src/util/libgnunetutil.la \
154  -lextractor \
155   $(GN_LIBINTL)
156 gnunet_search_DEPENDENCIES = \
157   libgnunetfs.la
158
159 gnunet_service_fs_SOURCES =  \
160  gnunet-service-fs.c gnunet-service-fs.h \
161  gnunet-service-fs_cp.c gnunet-service-fs_cp.h \
162  gnunet-service-fs_indexing.c gnunet-service-fs_indexing.h \
163  gnunet-service-fs_lc.c gnunet-service-fs_lc.h \
164  gnunet-service-fs_pe.c gnunet-service-fs_pe.h \
165  gnunet-service-fs_pr.c gnunet-service-fs_pr.h \
166  gnunet-service-fs_push.c gnunet-service-fs_push.h \
167  gnunet-service-fs_put.c gnunet-service-fs_put.h \
168  gnunet-service-fs_stream.c gnunet-service-fs_sream.h 
169 gnunet_service_fs_LDADD =  \
170  $(top_builddir)/src/fs/libgnunetfs.la \
171  $(top_builddir)/src/dht/libgnunetdht.la \
172  $(top_builddir)/src/block/libgnunetblock.la \
173  $(top_builddir)/src/datastore/libgnunetdatastore.la \
174  $(top_builddir)/src/statistics/libgnunetstatistics.la \
175  $(top_builddir)/src/stream/libgnunetstream.la \
176  $(top_builddir)/src/ats/libgnunetats.la \
177  $(top_builddir)/src/core/libgnunetcore.la \
178  $(top_builddir)/src/util/libgnunetutil.la \
179  $(GN_LIBINTL) -lm
180 gnunet_service_fs_DEPENDENCIES = \
181   libgnunetfs.la
182
183 gnunet_unindex_SOURCES = \
184  gnunet-unindex.c         
185 gnunet_unindex_LDADD = \
186   $(top_builddir)/src/fs/libgnunetfs.la \
187   $(top_builddir)/src/util/libgnunetutil.la \
188   $(GN_LIBINTL)
189 gnunet_unindex_DEPENDENCIES = \
190   libgnunetfs.la
191
192
193 libgnunet_plugin_block_fs_la_SOURCES = \
194   plugin_block_fs.c
195 libgnunet_plugin_block_fs_la_LIBADD = \
196   $(top_builddir)/src/block/libgnunetblock.la \
197   $(top_builddir)/src/util/libgnunetutil.la \
198   $(LTLIBINTL)
199 libgnunet_plugin_block_fs_la_LDFLAGS = \
200  $(GN_PLUGIN_LDFLAGS)
201 libgnunet_plugin_block_fs_la_DEPENDENCIES = \
202   $(top_builddir)/src/block/libgnunetblock.la
203
204
205
206 if HAVE_BENCHMARKS
207  FS_BENCHMARKS = \
208  perf_gnunet_service_fs_p2p \
209  perf_gnunet_service_fs_p2p_dht \
210  perf_gnunet_service_fs_p2p_index \
211  perf_gnunet_service_fs_p2p_respect 
212 endif
213
214 check_PROGRAMS = \
215  test_plugin_block_fs \
216  test_fs_directory \
217  test_fs_download \
218  test_fs_download_stream \
219  test_fs_download_indexed \
220  test_fs_download_persistence \
221  test_fs_file_information \
222  test_fs_getopt \
223  test_fs_list_indexed \
224  test_fs_namespace \
225  test_fs_namespace_list_updateable \
226  test_fs_publish \
227  test_fs_publish_persistence \
228  test_fs_search \
229  test_fs_search_probes \
230  test_fs_search_persistence \
231  test_fs_start_stop \
232  test_fs_test_lib \
233  test_fs_unindex \
234  test_fs_unindex_persistence \
235  test_fs_uri \
236  test_gnunet_service_fs_migration \
237  test_gnunet_service_fs_p2p \
238  test_gnunet_service_fs_p2p_stream \
239  $(FS_BENCHMARKS)
240
241 test_plugin_block_fs_SOURCES = \
242  test_plugin_block_fs.c
243 test_plugin_block_fs_LDADD = \
244  $(top_builddir)/src/block/libgnunetblock.la \
245  $(top_builddir)/src/util/libgnunetutil.la  
246
247 if HAVE_PYTHON
248 check_SCRIPTS = \
249  test_gnunet_fs_psd.py \
250  test_gnunet_fs_rec.py \
251  test_gnunet_fs_idx.py \
252  test_gnunet_fs_ns.py 
253 endif
254
255 if ENABLE_MONKEY
256  TESTS_ENVIRONMENT = @MONKEYPREFIX@
257  AM_LDFLAGS = -no-install
258 endif
259
260
261 if ENABLE_TEST_RUN
262 TESTS = \
263  test_fs_directory \
264  test_fs_download \
265  test_fs_download_indexed \
266  test_fs_download_persistence \
267  test_fs_file_information \
268  test_fs_list_indexed \
269  test_fs_namespace \
270  test_fs_namespace_list_updateable \
271  test_fs_publish \
272  test_fs_publish_persistence \
273  test_fs_search \
274  test_fs_search_probes \
275  test_fs_search_persistence \
276  test_fs_start_stop \
277  test_fs_unindex \
278  test_fs_unindex_persistence \
279  test_fs_uri \
280  test_fs_test_lib \
281  test_gnunet_service_fs_migration \
282  test_gnunet_service_fs_p2p \
283  test_gnunet_service_fs_p2p_stream \
284  perf_gnunet_service_fs_p2p \
285  perf_gnunet_service_fs_p2p_index \
286  perf_gnunet_service_fs_p2p_respect \
287  $(check_SCRIPTS)  
288 endif
289
290
291 test_fs_directory_SOURCES = \
292  test_fs_directory.c
293 test_fs_directory_LDADD = \
294   -lextractor \
295   $(top_builddir)/src/fs/libgnunetfs.la  \
296   $(top_builddir)/src/util/libgnunetutil.la  
297
298 test_fs_download_SOURCES = \
299  test_fs_download.c
300 test_fs_download_LDADD = \
301   $(top_builddir)/src/testing/libgnunettesting.la  \
302   $(top_builddir)/src/fs/libgnunetfs.la  \
303   $(top_builddir)/src/util/libgnunetutil.la  
304
305 test_fs_download_indexed_SOURCES = \
306  test_fs_download.c
307 test_fs_download_indexed_LDADD = \
308   $(top_builddir)/src/testing/libgnunettesting.la  \
309   $(top_builddir)/src/fs/libgnunetfs.la  \
310   $(top_builddir)/src/util/libgnunetutil.la  
311
312 test_fs_download_stream_SOURCES = \
313  test_fs_download.c
314 test_fs_download_stream_LDADD = \
315   $(top_builddir)/src/testing/libgnunettesting.la  \
316   $(top_builddir)/src/fs/libgnunetfs.la  \
317   $(top_builddir)/src/util/libgnunetutil.la  
318
319 test_fs_download_persistence_SOURCES = \
320  test_fs_download_persistence.c
321 test_fs_download_persistence_LDADD = \
322   $(top_builddir)/src/testing/libgnunettesting.la  \
323   $(top_builddir)/src/fs/libgnunetfs.la  \
324   $(top_builddir)/src/util/libgnunetutil.la  
325
326 test_fs_file_information_SOURCES = \
327  test_fs_file_information.c
328 test_fs_file_information_LDADD = \
329   -lextractor \
330   $(top_builddir)/src/fs/libgnunetfs.la  \
331   $(top_builddir)/src/util/libgnunetutil.la  
332
333 test_fs_getopt_SOURCES = \
334  test_fs_getopt.c
335 test_fs_getopt_LDADD = \
336   $(top_builddir)/src/fs/libgnunetfs.la  \
337   $(top_builddir)/src/util/libgnunetutil.la  
338
339 test_fs_list_indexed_SOURCES = \
340  test_fs_list_indexed.c
341 test_fs_list_indexed_LDADD = \
342   $(top_builddir)/src/testing/libgnunettesting.la \
343   $(top_builddir)/src/fs/libgnunetfs.la  \
344   $(top_builddir)/src/util/libgnunetutil.la  
345
346 test_fs_namespace_SOURCES = \
347  test_fs_namespace.c
348 test_fs_namespace_LDADD = \
349   $(top_builddir)/src/testing/libgnunettesting.la \
350   $(top_builddir)/src/fs/libgnunetfs.la  \
351   $(top_builddir)/src/util/libgnunetutil.la  
352
353 test_fs_namespace_list_updateable_SOURCES = \
354  test_fs_namespace_list_updateable.c
355 test_fs_namespace_list_updateable_LDADD = \
356   $(top_builddir)/src/testing/libgnunettesting.la \
357   $(top_builddir)/src/fs/libgnunetfs.la  \
358   $(top_builddir)/src/util/libgnunetutil.la  
359
360 test_fs_publish_SOURCES = \
361  test_fs_publish.c
362 test_fs_publish_LDADD = \
363   $(top_builddir)/src/testing/libgnunettesting.la \
364   $(top_builddir)/src/fs/libgnunetfs.la  \
365   $(top_builddir)/src/util/libgnunetutil.la  
366
367 test_fs_publish_persistence_SOURCES = \
368  test_fs_publish_persistence.c
369 test_fs_publish_persistence_LDADD = \
370   $(top_builddir)/src/testing/libgnunettesting.la \
371   $(top_builddir)/src/fs/libgnunetfs.la  \
372   $(top_builddir)/src/util/libgnunetutil.la  
373
374 test_fs_search_SOURCES = \
375  test_fs_search.c
376 test_fs_search_LDADD = \
377   $(top_builddir)/src/testing/libgnunettesting.la \
378   $(top_builddir)/src/fs/libgnunetfs.la \
379   $(top_builddir)/src/util/libgnunetutil.la
380
381 test_fs_search_probes_SOURCES = \
382  test_fs_search_probes.c
383 test_fs_search_probes_LDADD = \
384   $(top_builddir)/src/testing/libgnunettesting.la \
385   $(top_builddir)/src/fs/libgnunetfs.la \
386   $(top_builddir)/src/util/libgnunetutil.la
387
388 test_fs_search_persistence_SOURCES = \
389  test_fs_search_persistence.c
390 test_fs_search_persistence_LDADD = \
391   $(top_builddir)/src/testing/libgnunettesting.la \
392   $(top_builddir)/src/fs/libgnunetfs.la \
393   $(top_builddir)/src/util/libgnunetutil.la
394
395 test_fs_start_stop_SOURCES = \
396  test_fs_start_stop.c
397 test_fs_start_stop_LDADD = \
398   $(top_builddir)/src/testing/libgnunettesting.la \
399   $(top_builddir)/src/fs/libgnunetfs.la  \
400   $(top_builddir)/src/util/libgnunetutil.la  
401
402 test_fs_unindex_SOURCES = \
403  test_fs_unindex.c
404 test_fs_unindex_LDADD = \
405   $(top_builddir)/src/testing/libgnunettesting.la \
406   $(top_builddir)/src/fs/libgnunetfs.la \
407   $(top_builddir)/src/util/libgnunetutil.la  
408
409 test_fs_unindex_persistence_SOURCES = \
410  test_fs_unindex_persistence.c
411 test_fs_unindex_persistence_LDADD = \
412   $(top_builddir)/src/testing/libgnunettesting.la \
413   $(top_builddir)/src/fs/libgnunetfs.la \
414   $(top_builddir)/src/util/libgnunetutil.la  
415
416 test_fs_uri_SOURCES = \
417  test_fs_uri.c
418 test_fs_uri_LDADD = \
419   $(top_builddir)/src/fs/libgnunetfs.la  \
420   $(top_builddir)/src/util/libgnunetutil.la  
421
422 test_fs_test_lib_SOURCES = \
423  test_fs_test_lib.c
424 test_fs_test_lib_LDADD = \
425   $(top_builddir)/src/fs/libgnunetfstest.a \
426   $(top_builddir)/src/testbed/libgnunettestbed.la \
427   $(top_builddir)/src/fs/libgnunetfs.la  \
428   $(top_builddir)/src/util/libgnunetutil.la  
429
430 test_gnunet_service_fs_p2p_SOURCES = \
431  test_gnunet_service_fs_p2p.c
432 test_gnunet_service_fs_p2p_LDADD = \
433   $(top_builddir)/src/fs/libgnunetfstest.a \
434   $(top_builddir)/src/testbed/libgnunettestbed.la \
435   $(top_builddir)/src/fs/libgnunetfs.la  \
436   $(top_builddir)/src/util/libgnunetutil.la  
437
438 test_gnunet_service_fs_p2p_stream_SOURCES = \
439  test_gnunet_service_fs_p2p.c
440 test_gnunet_service_fs_p2p_stream_LDADD = \
441   $(top_builddir)/src/fs/libgnunetfstest.a \
442   $(top_builddir)/src/testbed/libgnunettestbed.la \
443   $(top_builddir)/src/fs/libgnunetfs.la  \
444   $(top_builddir)/src/util/libgnunetutil.la  
445
446 test_gnunet_service_fs_migration_SOURCES = \
447  test_gnunet_service_fs_migration.c
448 test_gnunet_service_fs_migration_LDADD = \
449   $(top_builddir)/src/fs/libgnunetfstest.a \
450   $(top_builddir)/src/testbed/libgnunettestbed.la \
451   $(top_builddir)/src/fs/libgnunetfs.la  \
452   $(top_builddir)/src/util/libgnunetutil.la  
453
454 perf_gnunet_service_fs_p2p_SOURCES = \
455  perf_gnunet_service_fs_p2p.c
456 perf_gnunet_service_fs_p2p_LDADD = \
457   $(top_builddir)/src/fs/libgnunetfstest.a \
458   $(top_builddir)/src/statistics/libgnunetstatistics.la \
459   $(top_builddir)/src/testbed/libgnunettestbed.la \
460   $(top_builddir)/src/fs/libgnunetfs.la  \
461   $(top_builddir)/src/util/libgnunetutil.la  
462
463 perf_gnunet_service_fs_p2p_index_SOURCES = \
464  perf_gnunet_service_fs_p2p.c
465 perf_gnunet_service_fs_p2p_index_LDADD = \
466   $(top_builddir)/src/fs/libgnunetfstest.a \
467   $(top_builddir)/src/statistics/libgnunetstatistics.la \
468   $(top_builddir)/src/testbed/libgnunettestbed.la \
469   $(top_builddir)/src/fs/libgnunetfs.la  \
470   $(top_builddir)/src/util/libgnunetutil.la  
471
472 perf_gnunet_service_fs_p2p_dht_SOURCES = \
473  perf_gnunet_service_fs_p2p.c
474 perf_gnunet_service_fs_p2p_dht_LDADD = \
475   $(top_builddir)/src/fs/libgnunetfstest.a \
476   $(top_builddir)/src/statistics/libgnunetstatistics.la \
477   $(top_builddir)/src/testbed/libgnunettestbed.la \
478   $(top_builddir)/src/fs/libgnunetfs.la  \
479   $(top_builddir)/src/util/libgnunetutil.la  
480
481 perf_gnunet_service_fs_p2p_respect_SOURCES = \
482  perf_gnunet_service_fs_p2p_respect.c
483 perf_gnunet_service_fs_p2p_respect_LDADD = \
484   $(top_builddir)/src/fs/libgnunetfstest.a \
485   $(top_builddir)/src/statistics/libgnunetstatistics.la \
486   $(top_builddir)/src/testbed/libgnunettestbed.la \
487   $(top_builddir)/src/fs/libgnunetfs.la  \
488   $(top_builddir)/src/util/libgnunetutil.la  
489
490
491 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
492
493 test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile
494         $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py
495         chmod +x test_gnunet_fs_psd.py
496
497 test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile
498         $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py
499         chmod +x test_gnunet_fs_rec.py
500
501 test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile
502         $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py
503         chmod +x test_gnunet_fs_ns.py
504
505 test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile
506         $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py
507         chmod +x test_gnunet_fs_idx.py
508
509
510 EXTRA_DIST = \
511   test_fs_defaults.conf \
512   fs_test_lib_data.conf \
513   test_fs_data.conf \
514   test_fs_download_data.conf \
515   test_fs_download_index.conf \
516   test_fs_download_stream.conf \
517   test_fs_file_information_data.conf \
518   fs_test_lib_data.conf \
519   test_fs_list_indexed_data.conf \
520   test_fs_namespace_data.conf \
521   test_fs_publish_data.conf \
522   test_fs_search_data.conf \
523   test_fs_unindex_data.conf \
524   test_fs_uri_data.conf \
525   test_gnunet_service_fs_migration_data.conf \
526   test_gnunet_service_fs_p2p_stream.conf \
527   test_gnunet_fs_idx_data.conf \
528   test_gnunet_fs_ns_data.conf \
529   test_gnunet_fs_psd_data.conf \
530   test_gnunet_fs_rec_data.conf \
531   perf_gnunet_service_fs_p2p.conf \
532   test_gnunet_fs_rec_data.tgz \
533   test_gnunet_fs_psd.py.in \
534   test_gnunet_fs_rec.py.in \
535   test_gnunet_fs_ns.py.in \
536   test_gnunet_fs_idx.py.in \
537   $(bin_SCRIPTS) 
538
539 CLEANFILES = $(check_SCRIPTS)