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