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