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