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