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