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