arg
[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/core/libgnunetcore.la \
123  $(top_builddir)/src/util/libgnunetutil.la \
124  $(GN_LIBINTL)
125 gnunet_service_fs_DEPENDENCIES = \
126   libgnunetfs.la
127
128 gnunet_unindex_SOURCES = \
129  gnunet-unindex.c         
130 gnunet_unindex_LDADD = \
131   $(top_builddir)/src/fs/libgnunetfs.la \
132   $(top_builddir)/src/util/libgnunetutil.la \
133   $(GN_LIBINTL)
134 gnunet_unindex_DEPENDENCIES = \
135   libgnunetfs.la
136
137 if HAVE_BENCHMARKS
138  FS_BENCHMARKS = \
139  perf_gnunet_service_fs_p2p \
140  perf_gnunet_service_fs_p2p_dht \
141  perf_gnunet_service_fs_p2p_index \
142  perf_gnunet_service_fs_p2p_trust 
143 endif
144
145 check_PROGRAMS = \
146  test_fs_directory \
147  test_fs_download \
148  test_fs_download_indexed \
149  test_fs_download_persistence \
150  test_fs_file_information \
151  test_fs_getopt \
152  test_fs_list_indexed \
153  test_fs_namespace \
154  test_fs_namespace_list_updateable \
155  test_fs_publish \
156  test_fs_publish_persistence \
157  test_fs_search \
158  test_fs_search_persistence \
159  test_fs_start_stop \
160  test_fs_test_lib \
161  test_fs_unindex \
162  test_fs_unindex_persistence \
163  test_fs_uri \
164  test_gnunet_service_fs_migration \
165  test_gnunet_service_fs_p2p \
166  $(FS_BENCHMARKS)
167
168
169 if HAVE_PYTHON_PEXPECT
170 check_SCRIPTS = \
171  test_gnunet_fs_psd.py \
172  test_gnunet_fs_rec.py \
173  test_gnunet_fs_idx.py \
174  test_gnunet_fs_ns.py 
175 endif
176
177
178 if ENABLE_TEST_RUN
179 TESTS = \
180  test_fs_directory \
181  test_fs_download \
182  test_fs_download_indexed \
183  test_fs_download_persistence \
184  test_fs_file_information \
185  test_fs_list_indexed \
186  test_fs_namespace \
187  test_fs_namespace_list_updateable \
188  test_fs_publish \
189  test_fs_publish_persistence \
190  test_fs_search \
191  test_fs_search_persistence \
192  test_fs_start_stop \
193  test_fs_unindex \
194  test_fs_unindex_persistence \
195  test_fs_uri \
196  test_fs_test_lib \
197  test_gnunet_service_fs_migration \
198  test_gnunet_service_fs_p2p \
199  perf_gnunet_service_fs_p2p \
200  perf_gnunet_service_fs_p2p_index \
201  perf_gnunet_service_fs_p2p_trust \
202  $(check_SCRIPTS)  
203 endif
204
205
206
207
208 test_fs_directory_SOURCES = \
209  test_fs_directory.c
210 test_fs_directory_LDADD = \
211   -lextractor \
212   $(top_builddir)/src/fs/libgnunetfs.la  \
213   $(top_builddir)/src/util/libgnunetutil.la  
214
215 test_fs_download_SOURCES = \
216  test_fs_download.c
217 test_fs_download_LDADD = \
218   $(top_builddir)/src/fs/libgnunetfs.la  \
219   $(top_builddir)/src/util/libgnunetutil.la  
220
221 test_fs_download_indexed_SOURCES = \
222  test_fs_download_indexed.c
223 test_fs_download_indexed_LDADD = \
224   $(top_builddir)/src/fs/libgnunetfs.la  \
225   $(top_builddir)/src/util/libgnunetutil.la  
226
227 test_fs_download_persistence_SOURCES = \
228  test_fs_download_persistence.c
229 test_fs_download_persistence_LDADD = \
230   $(top_builddir)/src/fs/libgnunetfs.la  \
231   $(top_builddir)/src/util/libgnunetutil.la  
232
233 test_fs_file_information_SOURCES = \
234  test_fs_file_information.c
235 test_fs_file_information_LDADD = \
236   -lextractor \
237   $(top_builddir)/src/fs/libgnunetfs.la  \
238   $(top_builddir)/src/util/libgnunetutil.la  
239
240 test_fs_getopt_SOURCES = \
241  test_fs_getopt.c
242 test_fs_getopt_LDADD = \
243   $(top_builddir)/src/fs/libgnunetfs.la  \
244   $(top_builddir)/src/util/libgnunetutil.la  
245
246 test_fs_list_indexed_SOURCES = \
247  test_fs_list_indexed.c
248 test_fs_list_indexed_LDADD = \
249   $(top_builddir)/src/fs/libgnunetfs.la  \
250   $(top_builddir)/src/util/libgnunetutil.la  
251
252 test_fs_namespace_SOURCES = \
253  test_fs_namespace.c
254 test_fs_namespace_LDADD = \
255   $(top_builddir)/src/fs/libgnunetfs.la  \
256   $(top_builddir)/src/util/libgnunetutil.la  
257
258 test_fs_namespace_list_updateable_SOURCES = \
259  test_fs_namespace_list_updateable.c
260 test_fs_namespace_list_updateable_LDADD = \
261   $(top_builddir)/src/fs/libgnunetfs.la  \
262   $(top_builddir)/src/util/libgnunetutil.la  
263
264 test_fs_publish_SOURCES = \
265  test_fs_publish.c
266 test_fs_publish_LDADD = \
267   $(top_builddir)/src/fs/libgnunetfs.la  \
268   $(top_builddir)/src/util/libgnunetutil.la  
269
270 test_fs_publish_persistence_SOURCES = \
271  test_fs_publish_persistence.c
272 test_fs_publish_persistence_LDADD = \
273   $(top_builddir)/src/fs/libgnunetfs.la  \
274   $(top_builddir)/src/util/libgnunetutil.la  
275
276 test_fs_search_SOURCES = \
277  test_fs_search.c
278 test_fs_search_LDADD = $(top_builddir)/src/fs/libgnunetfs.la    \
279   $(top_builddir)/src/util/libgnunetutil.la
280
281 test_fs_search_persistence_SOURCES = \
282  test_fs_search_persistence.c
283 test_fs_search_persistence_LDADD = $(top_builddir)/src/fs/libgnunetfs.la        \
284   $(top_builddir)/src/util/libgnunetutil.la
285
286 test_fs_start_stop_SOURCES = \
287  test_fs_start_stop.c
288 test_fs_start_stop_LDADD = \
289   $(top_builddir)/src/fs/libgnunetfs.la  \
290   $(top_builddir)/src/util/libgnunetutil.la  
291
292 test_fs_unindex_SOURCES = \
293  test_fs_unindex.c
294 test_fs_unindex_LDADD = \
295   $(top_builddir)/src/fs/libgnunetfs.la  \
296   $(top_builddir)/src/util/libgnunetutil.la  
297
298 test_fs_unindex_persistence_SOURCES = \
299  test_fs_unindex_persistence.c
300 test_fs_unindex_persistence_LDADD = \
301   $(top_builddir)/src/fs/libgnunetfs.la  \
302   $(top_builddir)/src/util/libgnunetutil.la  
303
304 test_fs_uri_SOURCES = \
305  test_fs_uri.c
306 test_fs_uri_LDADD = \
307   $(top_builddir)/src/fs/libgnunetfs.la  \
308   $(top_builddir)/src/util/libgnunetutil.la  
309
310 test_fs_test_lib_SOURCES = \
311  test_fs_test_lib.c
312 test_fs_test_lib_LDADD = \
313   $(top_builddir)/src/fs/libgnunetfstest.a \
314   $(top_builddir)/src/testing/libgnunettesting.la \
315   $(top_builddir)/src/fs/libgnunetfs.la  \
316   $(top_builddir)/src/util/libgnunetutil.la  
317
318 test_gnunet_service_fs_p2p_SOURCES = \
319  test_gnunet_service_fs_p2p.c
320 test_gnunet_service_fs_p2p_LDADD = \
321   $(top_builddir)/src/fs/libgnunetfstest.a \
322   $(top_builddir)/src/testing/libgnunettesting.la \
323   $(top_builddir)/src/fs/libgnunetfs.la  \
324   $(top_builddir)/src/util/libgnunetutil.la  
325
326 test_gnunet_service_fs_migration_SOURCES = \
327  test_gnunet_service_fs_migration.c
328 test_gnunet_service_fs_migration_LDADD = \
329   $(top_builddir)/src/fs/libgnunetfstest.a \
330   $(top_builddir)/src/testing/libgnunettesting.la \
331   $(top_builddir)/src/fs/libgnunetfs.la  \
332   $(top_builddir)/src/util/libgnunetutil.la  
333
334 perf_gnunet_service_fs_p2p_SOURCES = \
335  perf_gnunet_service_fs_p2p.c
336 perf_gnunet_service_fs_p2p_LDADD = \
337   $(top_builddir)/src/fs/libgnunetfstest.a \
338   $(top_builddir)/src/statistics/libgnunetstatistics.la \
339   $(top_builddir)/src/testing/libgnunettesting.la \
340   $(top_builddir)/src/fs/libgnunetfs.la  \
341   $(top_builddir)/src/util/libgnunetutil.la  
342
343 perf_gnunet_service_fs_p2p_index_SOURCES = \
344  perf_gnunet_service_fs_p2p.c
345 perf_gnunet_service_fs_p2p_index_LDADD = \
346   $(top_builddir)/src/fs/libgnunetfstest.a \
347   $(top_builddir)/src/statistics/libgnunetstatistics.la \
348   $(top_builddir)/src/testing/libgnunettesting.la \
349   $(top_builddir)/src/fs/libgnunetfs.la  \
350   $(top_builddir)/src/util/libgnunetutil.la  
351
352 perf_gnunet_service_fs_p2p_dht_SOURCES = \
353  perf_gnunet_service_fs_p2p.c
354 perf_gnunet_service_fs_p2p_dht_LDADD = \
355   $(top_builddir)/src/fs/libgnunetfstest.a \
356   $(top_builddir)/src/statistics/libgnunetstatistics.la \
357   $(top_builddir)/src/testing/libgnunettesting.la \
358   $(top_builddir)/src/fs/libgnunetfs.la  \
359   $(top_builddir)/src/util/libgnunetutil.la  
360
361 perf_gnunet_service_fs_p2p_trust_SOURCES = \
362  perf_gnunet_service_fs_p2p_trust.c
363 perf_gnunet_service_fs_p2p_trust_LDADD = \
364   $(top_builddir)/src/fs/libgnunetfstest.a \
365   $(top_builddir)/src/statistics/libgnunetstatistics.la \
366   $(top_builddir)/src/testing/libgnunettesting.la \
367   $(top_builddir)/src/fs/libgnunetfs.la  \
368   $(top_builddir)/src/util/libgnunetutil.la  
369
370
371 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
372
373 test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile
374         $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py
375         chmod +x test_gnunet_fs_psd.py
376
377 test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile
378         $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py
379         chmod +x test_gnunet_fs_rec.py
380
381 test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile
382         $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py
383         chmod +x test_gnunet_fs_ns.py
384
385 test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile
386         $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py
387         chmod +x test_gnunet_fs_idx.py
388
389
390 EXTRA_DIST = \
391   fs_test_lib_data.conf \
392   test_fs_data.conf \
393   test_fs_download_data.conf \
394   test_fs_file_information_data.conf \
395   test_fs_file_information_meta_data_image.jpg \
396   fs_test_lib_data.conf \
397   test_fs_list_indexed_data.conf \
398   test_fs_namespace_data.conf \
399   test_fs_publish_data.conf \
400   test_fs_search_data.conf \
401   test_fs_unindex_data.conf \
402   test_fs_uri_data.conf \
403   test_gnunet_service_fs_migration_data.conf \
404   test_gnunet_fs_idx_data.conf \
405   test_gnunet_fs_ns_data.conf \
406   test_gnunet_fs_psd_data.conf \
407   test_gnunet_fs_rec_data.conf \
408   test_gnunet_fs_rec_data.tgz \
409   test_gnunet_fs_psd.py.in \
410   test_gnunet_fs_rec.py.in \
411   test_gnunet_fs_ns.py.in \
412   test_gnunet_fs_idx.py.in
413
414 CLEANFILES = $(check_SCRIPTS)