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