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