-towards resolving thread-issue
[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_misc.c \
37   fs_namespace.c \
38   fs_search.c \
39   fs_sharetree.c \
40   fs_tree.c fs_tree.h \
41   fs_unindex.c \
42   fs_uri.c 
43
44 libgnunetfs_la_LIBADD = \
45   $(top_builddir)/src/datastore/libgnunetdatastore.la \
46   $(top_builddir)/src/util/libgnunetutil.la \
47   -lextractor \
48   $(GN_LIBINTL) $(XLIB) -lunistring
49
50 libgnunetfs_la_LDFLAGS = \
51   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
52   -version-info 1:0:1
53
54
55 libgnunetfstest_a_SOURCES = \
56   fs_test_lib.c fs_test_lib.h
57
58 libgnunetfstest_a_LIBADD = \
59   $(top_builddir)/src/testing/libgnunettesting.la 
60
61 bin_PROGRAMS = \
62   gnunet-directory \
63   gnunet-download \
64   gnunet-publish \
65   gnunet-helper-fs-publish \
66   gnunet-pseudonym \
67   gnunet-search \
68   gnunet-service-fs \
69   gnunet-fs \
70   gnunet-unindex 
71
72 bin_SCRIPTS = \
73   gnunet-download-manager.scm
74
75 gnunet_directory_SOURCES = \
76  gnunet-directory.c
77 gnunet_directory_LDADD = \
78   $(top_builddir)/src/fs/libgnunetfs.la \
79   $(top_builddir)/src/util/libgnunetutil.la \
80   -lextractor \
81   $(GN_LIBINTL)
82 gnunet_directory_DEPENDENCIES = \
83   libgnunetfs.la
84
85 gnunet_fs_SOURCES = \
86  gnunet-fs.c
87 gnunet_fs_LDADD = \
88   $(top_builddir)/src/fs/libgnunetfs.la \
89   $(top_builddir)/src/util/libgnunetutil.la \
90   -lextractor \
91   $(GN_LIBINTL)
92 gnunet_fs_DEPENDENCIES = \
93   libgnunetfs.la
94
95 gnunet_download_SOURCES =  \
96  gnunet-download.c         
97 gnunet_download_LDADD =  \
98  $(top_builddir)/src/fs/libgnunetfs.la \
99  $(top_builddir)/src/util/libgnunetutil.la \
100  $(GN_LIBINTL)
101 gnunet_download_DEPENDENCIES = \
102   libgnunetfs.la
103
104 gnunet_publish_SOURCES =  \
105  gnunet-publish.c         
106 gnunet_publish_LDADD =  \
107  $(top_builddir)/src/fs/libgnunetfs.la \
108  $(top_builddir)/src/util/libgnunetutil.la \
109  -lextractor \
110  $(GN_LIBINTL)
111 gnunet_publish_DEPENDENCIES = \
112   libgnunetfs.la
113
114 gnunet_helper_fs_publish_SOURCES =  \
115  gnunet-helper-fs-publish.c 
116 gnunet_helper_fs_publish_LDADD =  \
117  $(top_builddir)/src/fs/libgnunetfs.la \
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 libgnunet_plugin_block_fs_la_LDFLAGS = \
182  $(GN_PLUGIN_LDFLAGS)
183 libgnunet_plugin_block_fs_la_DEPENDENCIES = \
184   $(top_builddir)/src/block/libgnunetblock.la
185
186
187
188 if HAVE_BENCHMARKS
189  FS_BENCHMARKS = \
190  perf_gnunet_service_fs_p2p \
191  perf_gnunet_service_fs_p2p_dht \
192  perf_gnunet_service_fs_p2p_index \
193  perf_gnunet_service_fs_p2p_trust 
194 endif
195
196 check_PROGRAMS = \
197  test_fs_directory \
198  test_fs_download \
199  test_fs_download_indexed \
200  test_fs_download_persistence \
201  test_fs_file_information \
202  test_fs_getopt \
203  test_fs_list_indexed \
204  test_fs_namespace \
205  test_fs_namespace_list_updateable \
206  test_fs_publish \
207  test_fs_publish_persistence \
208  test_fs_search \
209  test_fs_search_persistence \
210  test_fs_start_stop \
211  test_fs_test_lib \
212  test_fs_unindex \
213  test_fs_unindex_persistence \
214  test_fs_uri \
215  test_gnunet_service_fs_migration \
216  test_gnunet_service_fs_p2p \
217  $(FS_BENCHMARKS)
218
219
220 if HAVE_PYTHON_PEXPECT
221 check_SCRIPTS = \
222  test_gnunet_fs_psd.py \
223  test_gnunet_fs_rec.py \
224  test_gnunet_fs_idx.py \
225  test_gnunet_fs_ns.py 
226 endif
227
228
229 if ENABLE_TEST_RUN
230 TESTS = \
231  test_fs_directory \
232  test_fs_download \
233  test_fs_download_indexed \
234  test_fs_download_persistence \
235  test_fs_file_information \
236  test_fs_list_indexed \
237  test_fs_namespace \
238  test_fs_namespace_list_updateable \
239  test_fs_publish \
240  test_fs_publish_persistence \
241  test_fs_search \
242  test_fs_search_persistence \
243  test_fs_start_stop \
244  test_fs_unindex \
245  test_fs_unindex_persistence \
246  test_fs_uri \
247  test_fs_test_lib \
248  test_gnunet_service_fs_migration \
249  test_gnunet_service_fs_p2p \
250  perf_gnunet_service_fs_p2p \
251  perf_gnunet_service_fs_p2p_index \
252  perf_gnunet_service_fs_p2p_trust \
253  $(check_SCRIPTS)  
254 endif
255
256
257
258
259 test_fs_directory_SOURCES = \
260  test_fs_directory.c
261 test_fs_directory_LDADD = \
262   -lextractor \
263   $(top_builddir)/src/fs/libgnunetfs.la  \
264   $(top_builddir)/src/util/libgnunetutil.la  
265
266 test_fs_download_SOURCES = \
267  test_fs_download.c
268 test_fs_download_LDADD = \
269   $(top_builddir)/src/fs/libgnunetfs.la  \
270   $(top_builddir)/src/util/libgnunetutil.la  
271
272 test_fs_download_indexed_SOURCES = \
273  test_fs_download_indexed.c
274 test_fs_download_indexed_LDADD = \
275   $(top_builddir)/src/fs/libgnunetfs.la  \
276   $(top_builddir)/src/util/libgnunetutil.la  
277
278 test_fs_download_persistence_SOURCES = \
279  test_fs_download_persistence.c
280 test_fs_download_persistence_LDADD = \
281   $(top_builddir)/src/fs/libgnunetfs.la  \
282   $(top_builddir)/src/util/libgnunetutil.la  
283
284 test_fs_file_information_SOURCES = \
285  test_fs_file_information.c
286 test_fs_file_information_LDADD = \
287   -lextractor \
288   $(top_builddir)/src/fs/libgnunetfs.la  \
289   $(top_builddir)/src/util/libgnunetutil.la  
290
291 test_fs_getopt_SOURCES = \
292  test_fs_getopt.c
293 test_fs_getopt_LDADD = \
294   $(top_builddir)/src/fs/libgnunetfs.la  \
295   $(top_builddir)/src/util/libgnunetutil.la  
296
297 test_fs_list_indexed_SOURCES = \
298  test_fs_list_indexed.c
299 test_fs_list_indexed_LDADD = \
300   $(top_builddir)/src/fs/libgnunetfs.la  \
301   $(top_builddir)/src/util/libgnunetutil.la  
302
303 test_fs_namespace_SOURCES = \
304  test_fs_namespace.c
305 test_fs_namespace_LDADD = \
306   $(top_builddir)/src/fs/libgnunetfs.la  \
307   $(top_builddir)/src/util/libgnunetutil.la  
308
309 test_fs_namespace_list_updateable_SOURCES = \
310  test_fs_namespace_list_updateable.c
311 test_fs_namespace_list_updateable_LDADD = \
312   $(top_builddir)/src/fs/libgnunetfs.la  \
313   $(top_builddir)/src/util/libgnunetutil.la  
314
315 test_fs_publish_SOURCES = \
316  test_fs_publish.c
317 test_fs_publish_LDADD = \
318   $(top_builddir)/src/fs/libgnunetfs.la  \
319   $(top_builddir)/src/util/libgnunetutil.la  
320
321 test_fs_publish_persistence_SOURCES = \
322  test_fs_publish_persistence.c
323 test_fs_publish_persistence_LDADD = \
324   $(top_builddir)/src/fs/libgnunetfs.la  \
325   $(top_builddir)/src/util/libgnunetutil.la  
326
327 test_fs_search_SOURCES = \
328  test_fs_search.c
329 test_fs_search_LDADD = $(top_builddir)/src/fs/libgnunetfs.la    \
330   $(top_builddir)/src/util/libgnunetutil.la
331
332 test_fs_search_persistence_SOURCES = \
333  test_fs_search_persistence.c
334 test_fs_search_persistence_LDADD = $(top_builddir)/src/fs/libgnunetfs.la        \
335   $(top_builddir)/src/util/libgnunetutil.la
336
337 test_fs_start_stop_SOURCES = \
338  test_fs_start_stop.c
339 test_fs_start_stop_LDADD = \
340   $(top_builddir)/src/fs/libgnunetfs.la  \
341   $(top_builddir)/src/util/libgnunetutil.la  
342
343 test_fs_unindex_SOURCES = \
344  test_fs_unindex.c
345 test_fs_unindex_LDADD = \
346   $(top_builddir)/src/fs/libgnunetfs.la  \
347   $(top_builddir)/src/util/libgnunetutil.la  
348
349 test_fs_unindex_persistence_SOURCES = \
350  test_fs_unindex_persistence.c
351 test_fs_unindex_persistence_LDADD = \
352   $(top_builddir)/src/fs/libgnunetfs.la  \
353   $(top_builddir)/src/util/libgnunetutil.la  
354
355 test_fs_uri_SOURCES = \
356  test_fs_uri.c
357 test_fs_uri_LDADD = \
358   $(top_builddir)/src/fs/libgnunetfs.la  \
359   $(top_builddir)/src/util/libgnunetutil.la  
360
361 test_fs_test_lib_SOURCES = \
362  test_fs_test_lib.c
363 test_fs_test_lib_LDADD = \
364   $(top_builddir)/src/fs/libgnunetfstest.a \
365   $(top_builddir)/src/testing/libgnunettesting.la \
366   $(top_builddir)/src/fs/libgnunetfs.la  \
367   $(top_builddir)/src/util/libgnunetutil.la  
368
369 test_gnunet_service_fs_p2p_SOURCES = \
370  test_gnunet_service_fs_p2p.c
371 test_gnunet_service_fs_p2p_LDADD = \
372   $(top_builddir)/src/fs/libgnunetfstest.a \
373   $(top_builddir)/src/testing/libgnunettesting.la \
374   $(top_builddir)/src/fs/libgnunetfs.la  \
375   $(top_builddir)/src/util/libgnunetutil.la  
376
377 test_gnunet_service_fs_migration_SOURCES = \
378  test_gnunet_service_fs_migration.c
379 test_gnunet_service_fs_migration_LDADD = \
380   $(top_builddir)/src/fs/libgnunetfstest.a \
381   $(top_builddir)/src/testing/libgnunettesting.la \
382   $(top_builddir)/src/fs/libgnunetfs.la  \
383   $(top_builddir)/src/util/libgnunetutil.la  
384
385 perf_gnunet_service_fs_p2p_SOURCES = \
386  perf_gnunet_service_fs_p2p.c
387 perf_gnunet_service_fs_p2p_LDADD = \
388   $(top_builddir)/src/fs/libgnunetfstest.a \
389   $(top_builddir)/src/statistics/libgnunetstatistics.la \
390   $(top_builddir)/src/testing/libgnunettesting.la \
391   $(top_builddir)/src/fs/libgnunetfs.la  \
392   $(top_builddir)/src/util/libgnunetutil.la  
393
394 perf_gnunet_service_fs_p2p_index_SOURCES = \
395  perf_gnunet_service_fs_p2p.c
396 perf_gnunet_service_fs_p2p_index_LDADD = \
397   $(top_builddir)/src/fs/libgnunetfstest.a \
398   $(top_builddir)/src/statistics/libgnunetstatistics.la \
399   $(top_builddir)/src/testing/libgnunettesting.la \
400   $(top_builddir)/src/fs/libgnunetfs.la  \
401   $(top_builddir)/src/util/libgnunetutil.la  
402
403 perf_gnunet_service_fs_p2p_dht_SOURCES = \
404  perf_gnunet_service_fs_p2p.c
405 perf_gnunet_service_fs_p2p_dht_LDADD = \
406   $(top_builddir)/src/fs/libgnunetfstest.a \
407   $(top_builddir)/src/statistics/libgnunetstatistics.la \
408   $(top_builddir)/src/testing/libgnunettesting.la \
409   $(top_builddir)/src/fs/libgnunetfs.la  \
410   $(top_builddir)/src/util/libgnunetutil.la  
411
412 perf_gnunet_service_fs_p2p_trust_SOURCES = \
413  perf_gnunet_service_fs_p2p_trust.c
414 perf_gnunet_service_fs_p2p_trust_LDADD = \
415   $(top_builddir)/src/fs/libgnunetfstest.a \
416   $(top_builddir)/src/statistics/libgnunetstatistics.la \
417   $(top_builddir)/src/testing/libgnunettesting.la \
418   $(top_builddir)/src/fs/libgnunetfs.la  \
419   $(top_builddir)/src/util/libgnunetutil.la  
420
421
422 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
423
424 test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile
425         $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py
426         chmod +x test_gnunet_fs_psd.py
427
428 test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile
429         $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py
430         chmod +x test_gnunet_fs_rec.py
431
432 test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile
433         $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py
434         chmod +x test_gnunet_fs_ns.py
435
436 test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile
437         $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py
438         chmod +x test_gnunet_fs_idx.py
439
440
441 EXTRA_DIST = \
442   test_fs_defaults.conf \
443   fs_test_lib_data.conf \
444   test_fs_data.conf \
445   test_fs_download_data.conf \
446   test_fs_file_information_data.conf \
447   test_fs_file_information_meta_data_image.jpg \
448   fs_test_lib_data.conf \
449   test_fs_list_indexed_data.conf \
450   test_fs_namespace_data.conf \
451   test_fs_publish_data.conf \
452   test_fs_search_data.conf \
453   test_fs_unindex_data.conf \
454   test_fs_uri_data.conf \
455   test_gnunet_service_fs_migration_data.conf \
456   test_gnunet_fs_idx_data.conf \
457   test_gnunet_fs_ns_data.conf \
458   test_gnunet_fs_psd_data.conf \
459   test_gnunet_fs_rec_data.conf \
460   test_gnunet_fs_rec_data.tgz \
461   test_gnunet_fs_psd.py.in \
462   test_gnunet_fs_rec.py.in \
463   test_gnunet_fs_ns.py.in \
464   test_gnunet_fs_idx.py.in
465
466 CLEANFILES = $(check_SCRIPTS)