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