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