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