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