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