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