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