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