-options to play with
[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 noinst_PROGRAMS = \
70   gnunet-fs-profiler \
71   gnunet-daemon-fsprofiler
72
73 bin_PROGRAMS = \
74   gnunet-auto-share \
75   gnunet-directory \
76   gnunet-download \
77   gnunet-publish \
78   gnunet-pseudonym \
79   gnunet-search \
80   gnunet-fs \
81   gnunet-unindex 
82
83 bin_SCRIPTS = \
84   gnunet-download-manager.scm
85
86 gnunet_directory_SOURCES = \
87  gnunet-directory.c
88 gnunet_directory_LDADD = \
89   $(top_builddir)/src/fs/libgnunetfs.la \
90   $(top_builddir)/src/util/libgnunetutil.la \
91   -lextractor \
92   $(GN_LIBINTL)
93 gnunet_directory_DEPENDENCIES = \
94   libgnunetfs.la
95
96 gnunet_fs_profiler_SOURCES = \
97  gnunet-fs-profiler.c
98 gnunet_fs_profiler_LDADD = \
99   $(top_builddir)/src/testbed/libgnunettestbed.la \
100   $(top_builddir)/src/util/libgnunetutil.la \
101   $(GN_LIBINTL)
102
103 gnunet_fs_SOURCES = \
104  gnunet-fs.c
105 gnunet_fs_LDADD = \
106   $(top_builddir)/src/fs/libgnunetfs.la \
107   $(top_builddir)/src/util/libgnunetutil.la \
108   -lextractor \
109   $(GN_LIBINTL)
110 gnunet_fs_DEPENDENCIES = \
111   libgnunetfs.la
112
113 gnunet_download_SOURCES =  \
114  gnunet-download.c         
115 gnunet_download_LDADD =  \
116  $(top_builddir)/src/fs/libgnunetfs.la \
117  $(top_builddir)/src/util/libgnunetutil.la \
118  $(GN_LIBINTL)
119 gnunet_download_DEPENDENCIES = \
120   libgnunetfs.la
121
122 gnunet_publish_SOURCES =  \
123  gnunet-publish.c         
124 gnunet_publish_LDADD =  \
125  $(top_builddir)/src/fs/libgnunetfs.la \
126  $(top_builddir)/src/util/libgnunetutil.la \
127  -lextractor \
128  $(GN_LIBINTL)
129 gnunet_publish_DEPENDENCIES = \
130   libgnunetfs.la
131
132 gnunet_auto_share_SOURCES =  \
133  gnunet-auto-share.c         
134 gnunet_auto_share_LDADD =  \
135  $(top_builddir)/src/util/libgnunetutil.la \
136  -lextractor \
137  $(GN_LIBINTL)
138 gnunet_auto_share_DEPENDENCIES = \
139   libgnunetfs.la
140
141 gnunet_helper_fs_publish_SOURCES =  \
142  gnunet-helper-fs-publish.c 
143 gnunet_helper_fs_publish_LDADD =  \
144  $(top_builddir)/src/util/libgnunetutil.la \
145  -lextractor \
146  $(GN_LIBINTL)
147 gnunet_helper_fs_publish_DEPENDENCIES = \
148   libgnunetfs.la
149
150 gnunet_pseudonym_SOURCES = \
151  gnunet-pseudonym.c
152 gnunet_pseudonym_LDADD = \
153   $(top_builddir)/src/fs/libgnunetfs.la \
154   $(top_builddir)/src/util/libgnunetutil.la \
155   -lextractor \
156   $(GN_LIBINTL)
157 gnunet_pseudonym_DEPENDENCIES = \
158   libgnunetfs.la
159
160 gnunet_search_SOURCES = \
161  gnunet-search.c         
162 gnunet_search_LDADD = \
163   $(top_builddir)/src/fs/libgnunetfs.la \
164   $(top_builddir)/src/util/libgnunetutil.la \
165  -lextractor \
166   $(GN_LIBINTL)
167 gnunet_search_DEPENDENCIES = \
168   libgnunetfs.la
169
170 gnunet_daemon_fsprofiler_SOURCES =  \
171  gnunet-daemon-fsprofiler.c
172 gnunet_daemon_fsprofiler_LDADD = \
173   $(top_builddir)/src/fs/libgnunetfs.la \
174   $(top_builddir)/src/statistics/libgnunetstatistics.la \
175   $(top_builddir)/src/util/libgnunetutil.la \
176   $(GN_LIBINTL)
177 gnunet_daemon_fsprofiler_DEPENDENCIES = \
178   libgnunetfs.la
179
180 gnunet_service_fs_SOURCES =  \
181  gnunet-service-fs.c gnunet-service-fs.h \
182  gnunet-service-fs_cp.c gnunet-service-fs_cp.h \
183  gnunet-service-fs_indexing.c gnunet-service-fs_indexing.h \
184  gnunet-service-fs_lc.c gnunet-service-fs_lc.h \
185  gnunet-service-fs_pe.c gnunet-service-fs_pe.h \
186  gnunet-service-fs_pr.c gnunet-service-fs_pr.h \
187  gnunet-service-fs_push.c gnunet-service-fs_push.h \
188  gnunet-service-fs_put.c gnunet-service-fs_put.h \
189  gnunet-service-fs_stream.c gnunet-service-fs_sream.h 
190 gnunet_service_fs_LDADD =  \
191  $(top_builddir)/src/fs/libgnunetfs.la \
192  $(top_builddir)/src/dht/libgnunetdht.la \
193  $(top_builddir)/src/block/libgnunetblock.la \
194  $(top_builddir)/src/datastore/libgnunetdatastore.la \
195  $(top_builddir)/src/statistics/libgnunetstatistics.la \
196  $(top_builddir)/src/stream/libgnunetstream.la \
197  $(top_builddir)/src/ats/libgnunetats.la \
198  $(top_builddir)/src/core/libgnunetcore.la \
199  $(top_builddir)/src/util/libgnunetutil.la \
200  $(GN_LIBINTL) -lm
201 gnunet_service_fs_DEPENDENCIES = \
202   libgnunetfs.la
203
204 gnunet_unindex_SOURCES = \
205  gnunet-unindex.c         
206 gnunet_unindex_LDADD = \
207   $(top_builddir)/src/fs/libgnunetfs.la \
208   $(top_builddir)/src/util/libgnunetutil.la \
209   $(GN_LIBINTL)
210 gnunet_unindex_DEPENDENCIES = \
211   libgnunetfs.la
212
213
214 libgnunet_plugin_block_fs_la_SOURCES = \
215   plugin_block_fs.c
216 libgnunet_plugin_block_fs_la_LIBADD = \
217   $(top_builddir)/src/block/libgnunetblock.la \
218   $(top_builddir)/src/util/libgnunetutil.la \
219   $(LTLIBINTL)
220 libgnunet_plugin_block_fs_la_LDFLAGS = \
221  $(GN_PLUGIN_LDFLAGS)
222 libgnunet_plugin_block_fs_la_DEPENDENCIES = \
223   $(top_builddir)/src/block/libgnunetblock.la
224
225
226
227 if HAVE_BENCHMARKS
228  FS_BENCHMARKS = \
229  perf_gnunet_service_fs_p2p \
230  perf_gnunet_service_fs_p2p_dht \
231  perf_gnunet_service_fs_p2p_index \
232  perf_gnunet_service_fs_p2p_respect 
233 endif
234
235 check_PROGRAMS = \
236  test_plugin_block_fs \
237  test_fs_directory \
238  test_fs_download \
239  test_fs_download_stream \
240  test_fs_download_indexed \
241  test_fs_download_persistence \
242  test_fs_file_information \
243  test_fs_getopt \
244  test_fs_list_indexed \
245  test_fs_namespace \
246  test_fs_namespace_list_updateable \
247  test_fs_publish \
248  test_fs_publish_persistence \
249  test_fs_search \
250  test_fs_search_probes \
251  test_fs_search_persistence \
252  test_fs_start_stop \
253  test_fs_test_lib \
254  test_fs_unindex \
255  test_fs_unindex_persistence \
256  test_fs_uri \
257  test_gnunet_service_fs_migration \
258  test_gnunet_service_fs_p2p \
259  test_gnunet_service_fs_p2p_stream \
260  $(FS_BENCHMARKS)
261
262 test_plugin_block_fs_SOURCES = \
263  test_plugin_block_fs.c
264 test_plugin_block_fs_LDADD = \
265  $(top_builddir)/src/block/libgnunetblock.la \
266  $(top_builddir)/src/util/libgnunetutil.la  
267
268 if HAVE_PYTHON
269 check_SCRIPTS = \
270  test_gnunet_fs_psd.py \
271  test_gnunet_fs_rec.py \
272  test_gnunet_fs_idx.py \
273  test_gnunet_fs_ns.py 
274 endif
275
276 if ENABLE_MONKEY
277  TESTS_ENVIRONMENT = @MONKEYPREFIX@
278  AM_LDFLAGS = -no-install
279 endif
280
281
282 if ENABLE_TEST_RUN
283 TESTS = \
284  test_fs_directory \
285  test_fs_download \
286  test_fs_download_indexed \
287  test_fs_download_persistence \
288  test_fs_file_information \
289  test_fs_list_indexed \
290  test_fs_namespace \
291  test_fs_namespace_list_updateable \
292  test_fs_publish \
293  test_fs_publish_persistence \
294  test_fs_search \
295  test_fs_search_probes \
296  test_fs_search_persistence \
297  test_fs_start_stop \
298  test_fs_unindex \
299  test_fs_unindex_persistence \
300  test_fs_uri \
301  test_fs_test_lib \
302  test_gnunet_service_fs_migration \
303  test_gnunet_service_fs_p2p \
304  test_gnunet_service_fs_p2p_stream \
305  perf_gnunet_service_fs_p2p \
306  perf_gnunet_service_fs_p2p_index \
307  perf_gnunet_service_fs_p2p_respect \
308  $(check_SCRIPTS)  
309 endif
310
311
312 test_fs_directory_SOURCES = \
313  test_fs_directory.c
314 test_fs_directory_LDADD = \
315   -lextractor \
316   $(top_builddir)/src/fs/libgnunetfs.la  \
317   $(top_builddir)/src/util/libgnunetutil.la  
318
319 test_fs_download_SOURCES = \
320  test_fs_download.c
321 test_fs_download_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_download_indexed_SOURCES = \
327  test_fs_download.c
328 test_fs_download_indexed_LDADD = \
329   $(top_builddir)/src/testing/libgnunettesting.la  \
330   $(top_builddir)/src/fs/libgnunetfs.la  \
331   $(top_builddir)/src/util/libgnunetutil.la  
332
333 test_fs_download_stream_SOURCES = \
334  test_fs_download.c
335 test_fs_download_stream_LDADD = \
336   $(top_builddir)/src/testing/libgnunettesting.la  \
337   $(top_builddir)/src/fs/libgnunetfs.la  \
338   $(top_builddir)/src/util/libgnunetutil.la  
339
340 test_fs_download_persistence_SOURCES = \
341  test_fs_download_persistence.c
342 test_fs_download_persistence_LDADD = \
343   $(top_builddir)/src/testing/libgnunettesting.la  \
344   $(top_builddir)/src/fs/libgnunetfs.la  \
345   $(top_builddir)/src/util/libgnunetutil.la  
346
347 test_fs_file_information_SOURCES = \
348  test_fs_file_information.c
349 test_fs_file_information_LDADD = \
350   -lextractor \
351   $(top_builddir)/src/fs/libgnunetfs.la  \
352   $(top_builddir)/src/util/libgnunetutil.la  
353
354 test_fs_getopt_SOURCES = \
355  test_fs_getopt.c
356 test_fs_getopt_LDADD = \
357   $(top_builddir)/src/fs/libgnunetfs.la  \
358   $(top_builddir)/src/util/libgnunetutil.la  
359
360 test_fs_list_indexed_SOURCES = \
361  test_fs_list_indexed.c
362 test_fs_list_indexed_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_namespace_SOURCES = \
368  test_fs_namespace.c
369 test_fs_namespace_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_namespace_list_updateable_SOURCES = \
375  test_fs_namespace_list_updateable.c
376 test_fs_namespace_list_updateable_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_publish_SOURCES = \
382  test_fs_publish.c
383 test_fs_publish_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_publish_persistence_SOURCES = \
389  test_fs_publish_persistence.c
390 test_fs_publish_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_search_SOURCES = \
396  test_fs_search.c
397 test_fs_search_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_search_probes_SOURCES = \
403  test_fs_search_probes.c
404 test_fs_search_probes_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_search_persistence_SOURCES = \
410  test_fs_search_persistence.c
411 test_fs_search_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_start_stop_SOURCES = \
417  test_fs_start_stop.c
418 test_fs_start_stop_LDADD = \
419   $(top_builddir)/src/testing/libgnunettesting.la \
420   $(top_builddir)/src/fs/libgnunetfs.la  \
421   $(top_builddir)/src/util/libgnunetutil.la  
422
423 test_fs_unindex_SOURCES = \
424  test_fs_unindex.c
425 test_fs_unindex_LDADD = \
426   $(top_builddir)/src/testing/libgnunettesting.la \
427   $(top_builddir)/src/fs/libgnunetfs.la \
428   $(top_builddir)/src/util/libgnunetutil.la  
429
430 test_fs_unindex_persistence_SOURCES = \
431  test_fs_unindex_persistence.c
432 test_fs_unindex_persistence_LDADD = \
433   $(top_builddir)/src/testing/libgnunettesting.la \
434   $(top_builddir)/src/fs/libgnunetfs.la \
435   $(top_builddir)/src/util/libgnunetutil.la  
436
437 test_fs_uri_SOURCES = \
438  test_fs_uri.c
439 test_fs_uri_LDADD = \
440   $(top_builddir)/src/fs/libgnunetfs.la  \
441   $(top_builddir)/src/util/libgnunetutil.la  
442
443 test_fs_test_lib_SOURCES = \
444  test_fs_test_lib.c
445 test_fs_test_lib_LDADD = \
446   $(top_builddir)/src/fs/libgnunetfstest.a \
447   $(top_builddir)/src/testbed/libgnunettestbed.la \
448   $(top_builddir)/src/fs/libgnunetfs.la  \
449   $(top_builddir)/src/util/libgnunetutil.la  
450
451 test_gnunet_service_fs_p2p_SOURCES = \
452  test_gnunet_service_fs_p2p.c
453 test_gnunet_service_fs_p2p_LDADD = \
454   $(top_builddir)/src/fs/libgnunetfstest.a \
455   $(top_builddir)/src/testbed/libgnunettestbed.la \
456   $(top_builddir)/src/fs/libgnunetfs.la  \
457   $(top_builddir)/src/util/libgnunetutil.la  
458
459 test_gnunet_service_fs_p2p_stream_SOURCES = \
460  test_gnunet_service_fs_p2p.c
461 test_gnunet_service_fs_p2p_stream_LDADD = \
462   $(top_builddir)/src/fs/libgnunetfstest.a \
463   $(top_builddir)/src/testbed/libgnunettestbed.la \
464   $(top_builddir)/src/fs/libgnunetfs.la  \
465   $(top_builddir)/src/util/libgnunetutil.la  
466
467 test_gnunet_service_fs_migration_SOURCES = \
468  test_gnunet_service_fs_migration.c
469 test_gnunet_service_fs_migration_LDADD = \
470   $(top_builddir)/src/fs/libgnunetfstest.a \
471   $(top_builddir)/src/testbed/libgnunettestbed.la \
472   $(top_builddir)/src/fs/libgnunetfs.la  \
473   $(top_builddir)/src/util/libgnunetutil.la  
474
475 perf_gnunet_service_fs_p2p_SOURCES = \
476  perf_gnunet_service_fs_p2p.c
477 perf_gnunet_service_fs_p2p_LDADD = \
478   $(top_builddir)/src/fs/libgnunetfstest.a \
479   $(top_builddir)/src/statistics/libgnunetstatistics.la \
480   $(top_builddir)/src/testbed/libgnunettestbed.la \
481   $(top_builddir)/src/fs/libgnunetfs.la  \
482   $(top_builddir)/src/util/libgnunetutil.la  
483
484 perf_gnunet_service_fs_p2p_index_SOURCES = \
485  perf_gnunet_service_fs_p2p.c
486 perf_gnunet_service_fs_p2p_index_LDADD = \
487   $(top_builddir)/src/fs/libgnunetfstest.a \
488   $(top_builddir)/src/statistics/libgnunetstatistics.la \
489   $(top_builddir)/src/testbed/libgnunettestbed.la \
490   $(top_builddir)/src/fs/libgnunetfs.la  \
491   $(top_builddir)/src/util/libgnunetutil.la  
492
493 perf_gnunet_service_fs_p2p_dht_SOURCES = \
494  perf_gnunet_service_fs_p2p.c
495 perf_gnunet_service_fs_p2p_dht_LDADD = \
496   $(top_builddir)/src/fs/libgnunetfstest.a \
497   $(top_builddir)/src/statistics/libgnunetstatistics.la \
498   $(top_builddir)/src/testbed/libgnunettestbed.la \
499   $(top_builddir)/src/fs/libgnunetfs.la  \
500   $(top_builddir)/src/util/libgnunetutil.la  
501
502 perf_gnunet_service_fs_p2p_respect_SOURCES = \
503  perf_gnunet_service_fs_p2p_respect.c
504 perf_gnunet_service_fs_p2p_respect_LDADD = \
505   $(top_builddir)/src/fs/libgnunetfstest.a \
506   $(top_builddir)/src/statistics/libgnunetstatistics.la \
507   $(top_builddir)/src/testbed/libgnunettestbed.la \
508   $(top_builddir)/src/fs/libgnunetfs.la  \
509   $(top_builddir)/src/util/libgnunetutil.la  
510
511
512 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
513
514 test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile
515         $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py
516         chmod +x test_gnunet_fs_psd.py
517
518 test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile
519         $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py
520         chmod +x test_gnunet_fs_rec.py
521
522 test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile
523         $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py
524         chmod +x test_gnunet_fs_ns.py
525
526 test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile
527         $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py
528         chmod +x test_gnunet_fs_idx.py
529
530
531 EXTRA_DIST = \
532   test_fs_defaults.conf \
533   fs_test_lib_data.conf \
534   test_fs_data.conf \
535   test_fs_download_data.conf \
536   test_fs_download_index.conf \
537   test_fs_download_stream.conf \
538   test_fs_file_information_data.conf \
539   fs_test_lib_data.conf \
540   test_fs_list_indexed_data.conf \
541   test_fs_namespace_data.conf \
542   test_fs_publish_data.conf \
543   test_fs_search_data.conf \
544   test_fs_unindex_data.conf \
545   test_fs_uri_data.conf \
546   test_gnunet_service_fs_migration_data.conf \
547   test_gnunet_service_fs_p2p_stream.conf \
548   test_gnunet_fs_idx_data.conf \
549   test_gnunet_fs_ns_data.conf \
550   test_gnunet_fs_psd_data.conf \
551   test_gnunet_fs_rec_data.conf \
552   perf_gnunet_service_fs_p2p.conf \
553   test_gnunet_fs_rec_data.tgz \
554   test_gnunet_fs_psd.py.in \
555   test_gnunet_fs_rec.py.in \
556   test_gnunet_fs_ns.py.in \
557   test_gnunet_fs_idx.py.in \
558   $(bin_SCRIPTS) 
559
560 CLEANFILES = $(check_SCRIPTS)