(no commit message)
[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_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   $(GN_LIBINTL)
64
65 gnunet_download_SOURCES =  \
66  gnunet-download.c         
67 gnunet_download_LDADD =  \
68  $(top_builddir)/src/fs/libgnunetfs.la \
69  $(top_builddir)/src/util/libgnunetutil.la \
70  $(GN_LIBINTL)
71
72 gnunet_publish_SOURCES =  \
73  gnunet-publish.c         
74 gnunet_publish_LDADD =  \
75  $(top_builddir)/src/fs/libgnunetfs.la \
76  $(top_builddir)/src/util/libgnunetutil.la \
77  $(GN_LIBINTL)
78
79 gnunet_pseudonym_SOURCES = \
80  gnunet-pseudonym.c
81 gnunet_pseudonym_LDADD = \
82   $(top_builddir)/src/fs/libgnunetfs.la \
83   $(top_builddir)/src/util/libgnunetutil.la \
84   -lextractor \
85   $(GN_LIBINTL)
86
87 gnunet_search_SOURCES = \
88  gnunet-search.c         
89 gnunet_search_LDADD = \
90   $(top_builddir)/src/fs/libgnunetfs.la \
91   $(top_builddir)/src/util/libgnunetutil.la \
92   $(GN_LIBINTL)
93
94 gnunet_service_fs_SOURCES =  \
95  gnunet-service-fs.c \
96  gnunet-service-fs_indexing.c gnunet-service-fs_indexing.h 
97 gnunet_service_fs_LDADD =  \
98  $(top_builddir)/src/fs/libgnunetfs.la \
99  $(top_builddir)/src/dht/libgnunetdht.la \
100  $(top_builddir)/src/block/libgnunetblock.la \
101  $(top_builddir)/src/datastore/libgnunetdatastore.la \
102  $(top_builddir)/src/statistics/libgnunetstatistics.la \
103  $(top_builddir)/src/core/libgnunetcore.la \
104  $(top_builddir)/src/util/libgnunetutil.la \
105  $(GN_LIBINTL)
106
107 gnunet_unindex_SOURCES = \
108  gnunet-unindex.c         
109 gnunet_unindex_LDADD = \
110   $(top_builddir)/src/fs/libgnunetfs.la \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(GN_LIBINTL)
113
114
115
116
117 check_PROGRAMS = \
118  test_fs_directory \
119  test_fs_download \
120  test_fs_download_indexed \
121  test_fs_download_persistence \
122  test_fs_file_information \
123  test_fs_getopt \
124  test_fs_list_indexed \
125  test_fs_namespace \
126  test_fs_namespace_list_updateable \
127  test_fs_publish \
128  test_fs_publish_persistence \
129  test_fs_search \
130  test_fs_search_persistence \
131  test_fs_start_stop \
132  test_fs_test_lib \
133  test_fs_unindex \
134  test_fs_unindex_persistence \
135  test_fs_uri \
136  test_gnunet_service_fs_migration \
137  test_gnunet_service_fs_p2p \
138  perf_gnunet_service_fs_p2p \
139  perf_gnunet_service_fs_p2p_dht \
140  perf_gnunet_service_fs_p2p_index
141
142
143 if HAVE_PYTHON_PEXPECT
144 check_SCRIPTS = \
145  test_gnunet_fs_psd.py \
146  test_gnunet_fs_rec.py \
147  test_gnunet_fs_ns.py \
148  test_gnunet_fs_idx.py
149 endif
150
151 if !DISABLE_TEST_RUN
152 TESTS = \
153  test_fs_directory \
154  test_fs_download \
155  test_fs_download_indexed \
156  test_fs_download_persistence \
157  test_fs_file_information \
158  test_fs_list_indexed \
159  test_fs_namespace \
160  test_fs_namespace_list_updateable \
161  test_fs_publish \
162  test_fs_publish_persistence \
163  test_fs_search \
164  test_fs_search_persistence \
165  test_fs_start_stop \
166  test_fs_unindex \
167  test_fs_unindex_persistence \
168  test_fs_uri \
169  test_fs_test_lib \
170  test_gnunet_service_fs_migration \
171  test_gnunet_service_fs_p2p \
172  $(check_SCRIPTS)  
173 endif
174
175
176 test_fs_directory_SOURCES = \
177  test_fs_directory.c
178 test_fs_directory_LDADD = \
179   $(top_builddir)/src/fs/libgnunetfs.la  \
180   $(top_builddir)/src/util/libgnunetutil.la  
181
182 test_fs_download_SOURCES = \
183  test_fs_download.c
184 test_fs_download_LDADD = \
185   $(top_builddir)/src/fs/libgnunetfs.la  \
186   $(top_builddir)/src/util/libgnunetutil.la  
187
188 test_fs_download_indexed_SOURCES = \
189  test_fs_download_indexed.c
190 test_fs_download_indexed_LDADD = \
191   $(top_builddir)/src/fs/libgnunetfs.la  \
192   $(top_builddir)/src/util/libgnunetutil.la  
193
194 test_fs_download_persistence_SOURCES = \
195  test_fs_download_persistence.c
196 test_fs_download_persistence_LDADD = \
197   $(top_builddir)/src/fs/libgnunetfs.la  \
198   $(top_builddir)/src/util/libgnunetutil.la  
199
200 test_fs_file_information_SOURCES = \
201  test_fs_file_information.c
202 test_fs_file_information_LDADD = \
203   $(top_builddir)/src/fs/libgnunetfs.la  \
204   $(top_builddir)/src/util/libgnunetutil.la  
205
206 test_fs_getopt_SOURCES = \
207  test_fs_getopt.c
208 test_fs_getopt_LDADD = \
209   $(top_builddir)/src/fs/libgnunetfs.la  \
210   $(top_builddir)/src/util/libgnunetutil.la  
211
212 test_fs_list_indexed_SOURCES = \
213  test_fs_list_indexed.c
214 test_fs_list_indexed_LDADD = \
215   $(top_builddir)/src/fs/libgnunetfs.la  \
216   $(top_builddir)/src/util/libgnunetutil.la  
217
218 test_fs_namespace_SOURCES = \
219  test_fs_namespace.c
220 test_fs_namespace_LDADD = \
221   $(top_builddir)/src/fs/libgnunetfs.la  \
222   $(top_builddir)/src/util/libgnunetutil.la  
223
224 test_fs_namespace_list_updateable_SOURCES = \
225  test_fs_namespace_list_updateable.c
226 test_fs_namespace_list_updateable_LDADD = \
227   $(top_builddir)/src/fs/libgnunetfs.la  \
228   $(top_builddir)/src/util/libgnunetutil.la  
229
230 test_fs_publish_SOURCES = \
231  test_fs_publish.c
232 test_fs_publish_LDADD = \
233   $(top_builddir)/src/fs/libgnunetfs.la  \
234   $(top_builddir)/src/util/libgnunetutil.la  
235
236 test_fs_publish_persistence_SOURCES = \
237  test_fs_publish_persistence.c
238 test_fs_publish_persistence_LDADD = \
239   $(top_builddir)/src/fs/libgnunetfs.la  \
240   $(top_builddir)/src/util/libgnunetutil.la  
241
242 test_fs_search_SOURCES = \
243  test_fs_search.c
244 test_fs_search_LDADD = $(top_builddir)/src/fs/libgnunetfs.la    \
245   $(top_builddir)/src/util/libgnunetutil.la
246
247 test_fs_search_persistence_SOURCES = \
248  test_fs_search_persistence.c
249 test_fs_search_persistence_LDADD = $(top_builddir)/src/fs/libgnunetfs.la        \
250   $(top_builddir)/src/util/libgnunetutil.la
251
252 test_fs_start_stop_SOURCES = \
253  test_fs_start_stop.c
254 test_fs_start_stop_LDADD = \
255   $(top_builddir)/src/fs/libgnunetfs.la  \
256   $(top_builddir)/src/util/libgnunetutil.la  
257
258 test_fs_unindex_SOURCES = \
259  test_fs_unindex.c
260 test_fs_unindex_LDADD = \
261   $(top_builddir)/src/fs/libgnunetfs.la  \
262   $(top_builddir)/src/util/libgnunetutil.la  
263
264 test_fs_unindex_persistence_SOURCES = \
265  test_fs_unindex_persistence.c
266 test_fs_unindex_persistence_LDADD = \
267   $(top_builddir)/src/fs/libgnunetfs.la  \
268   $(top_builddir)/src/util/libgnunetutil.la  
269
270 test_fs_uri_SOURCES = \
271  test_fs_uri.c
272 test_fs_uri_LDADD = \
273   $(top_builddir)/src/fs/libgnunetfs.la  \
274   $(top_builddir)/src/util/libgnunetutil.la  
275
276 test_fs_test_lib_SOURCES = \
277  test_fs_test_lib.c
278 test_fs_test_lib_LDADD = \
279   $(top_builddir)/src/fs/libgnunetfstest.a \
280   $(top_builddir)/src/testing/libgnunettesting.la \
281   $(top_builddir)/src/fs/libgnunetfs.la  \
282   $(top_builddir)/src/util/libgnunetutil.la  
283
284 test_gnunet_service_fs_p2p_SOURCES = \
285  test_gnunet_service_fs_p2p.c
286 test_gnunet_service_fs_p2p_LDADD = \
287   $(top_builddir)/src/fs/libgnunetfstest.a \
288   $(top_builddir)/src/testing/libgnunettesting.la \
289   $(top_builddir)/src/fs/libgnunetfs.la  \
290   $(top_builddir)/src/util/libgnunetutil.la  
291
292 test_gnunet_service_fs_migration_SOURCES = \
293  test_gnunet_service_fs_migration.c
294 test_gnunet_service_fs_migration_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 perf_gnunet_service_fs_p2p_SOURCES = \
301  perf_gnunet_service_fs_p2p.c
302 perf_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 perf_gnunet_service_fs_p2p_index_SOURCES = \
309  perf_gnunet_service_fs_p2p.c
310 perf_gnunet_service_fs_p2p_index_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_dht_SOURCES = \
317  perf_gnunet_service_fs_p2p.c
318 perf_gnunet_service_fs_p2p_dht_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
325 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
326
327 test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile
328         $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py
329         chmod +x test_gnunet_fs_psd.py
330
331 test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile
332         $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py
333         chmod +x test_gnunet_fs_rec.py
334
335 test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile
336         $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py
337         chmod +x test_gnunet_fs_ns.py
338
339 test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile
340         $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py
341         chmod +x test_gnunet_fs_idx.py
342
343
344 EXTRA_DIST = \
345   fs_test_lib_data.conf \
346   test_fs_data.conf \
347   test_fs_download_data.conf \
348   test_fs_file_information_data.conf \
349   test_fs_file_information_meta_data_image.jpg \
350   fs_test_lib_data.conf \
351   test_fs_list_indexed_data.conf \
352   test_fs_namespace_data.conf \
353   test_fs_publish_data.conf \
354   test_fs_search_data.conf \
355   test_fs_unindex_data.conf \
356   test_fs_uri_data.conf \
357   test_gnunet_service_fs_migration_data.conf \
358   test_gnunet_fs_idx_data.conf \
359   test_gnunet_fs_ns_data.conf \
360   test_gnunet_fs_psd_data.conf \
361   test_gnunet_fs_rec_data.conf \
362   test_gnunet_fs_rec_data.tgz \
363   test_gnunet_fs_psd.py.in \
364   test_gnunet_fs_rec.py.in \
365   test_gnunet_fs_ns.py.in \
366   test_gnunet_fs_idx.py.in
367
368 CLEANFILES = $(check_SCRIPTS)