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