(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/block/libgnunetblock.la \
100  $(top_builddir)/src/datastore/libgnunetdatastore.la \
101  $(top_builddir)/src/statistics/libgnunetstatistics.la \
102  $(top_builddir)/src/core/libgnunetcore.la \
103  $(top_builddir)/src/util/libgnunetutil.la \
104  $(GN_LIBINTL)
105
106 gnunet_unindex_SOURCES = \
107  gnunet-unindex.c         
108 gnunet_unindex_LDADD = \
109   $(top_builddir)/src/fs/libgnunetfs.la \
110   $(top_builddir)/src/util/libgnunetutil.la \
111   $(GN_LIBINTL)
112
113
114
115
116 check_PROGRAMS = \
117  test_fs_directory \
118  test_fs_download \
119  test_fs_download_indexed \
120  test_fs_download_persistence \
121  test_fs_file_information \
122  test_fs_getopt \
123  test_fs_list_indexed \
124  test_fs_namespace \
125  test_fs_publish \
126  test_fs_publish_persistence \
127  test_fs_search \
128  test_fs_search_persistence \
129  test_fs_start_stop \
130  test_fs_test_lib \
131  test_fs_unindex \
132  test_fs_unindex_persistence \
133  test_fs_uri \
134  test_gnunet_service_fs_migration \
135  test_gnunet_service_fs_p2p
136
137
138 if HAVE_PYTHON_PEXPECT
139 check_SCRIPTS = \
140  test_gnunet_fs_psd.py \
141  test_gnunet_fs_rec.py \
142  test_gnunet_fs_ns.py \
143  test_gnunet_fs_idx.py
144 endif
145
146 TESTS = \
147  test_fs_directory \
148  test_fs_download \
149  test_fs_download_indexed \
150  test_fs_download_persistence \
151  test_fs_file_information \
152  test_fs_list_indexed \
153  test_fs_namespace \
154  test_fs_publish \
155  test_fs_publish_persistence \
156  test_fs_search \
157  test_fs_search_persistence \
158  test_fs_start_stop \
159  test_fs_unindex \
160  test_fs_unindex_persistence \
161  test_fs_uri \
162  test_fs_test_lib \
163  test_gnunet_service_fs_migration \
164  test_gnunet_service_fs_p2p \
165  $(check_SCRIPTS)  
166
167
168 test_fs_directory_SOURCES = \
169  test_fs_directory.c
170 test_fs_directory_LDADD = \
171   $(top_builddir)/src/fs/libgnunetfs.la  \
172   $(top_builddir)/src/util/libgnunetutil.la  
173
174 test_fs_download_SOURCES = \
175  test_fs_download.c
176 test_fs_download_LDADD = \
177   $(top_builddir)/src/fs/libgnunetfs.la  \
178   $(top_builddir)/src/util/libgnunetutil.la  
179
180 test_fs_download_indexed_SOURCES = \
181  test_fs_download_indexed.c
182 test_fs_download_indexed_LDADD = \
183   $(top_builddir)/src/fs/libgnunetfs.la  \
184   $(top_builddir)/src/util/libgnunetutil.la  
185
186 test_fs_download_persistence_SOURCES = \
187  test_fs_download_persistence.c
188 test_fs_download_persistence_LDADD = \
189   $(top_builddir)/src/fs/libgnunetfs.la  \
190   $(top_builddir)/src/util/libgnunetutil.la  
191
192 test_fs_file_information_SOURCES = \
193  test_fs_file_information.c
194 test_fs_file_information_LDADD = \
195   $(top_builddir)/src/fs/libgnunetfs.la  \
196   $(top_builddir)/src/util/libgnunetutil.la  
197
198 test_fs_getopt_SOURCES = \
199  test_fs_getopt.c
200 test_fs_getopt_LDADD = \
201   $(top_builddir)/src/fs/libgnunetfs.la  \
202   $(top_builddir)/src/util/libgnunetutil.la  
203
204 test_fs_list_indexed_SOURCES = \
205  test_fs_list_indexed.c
206 test_fs_list_indexed_LDADD = \
207   $(top_builddir)/src/fs/libgnunetfs.la  \
208   $(top_builddir)/src/util/libgnunetutil.la  
209
210 test_fs_namespace_SOURCES = \
211  test_fs_namespace.c
212 test_fs_namespace_LDADD = \
213   $(top_builddir)/src/fs/libgnunetfs.la  \
214   $(top_builddir)/src/util/libgnunetutil.la  
215
216 test_fs_publish_SOURCES = \
217  test_fs_publish.c
218 test_fs_publish_LDADD = \
219   $(top_builddir)/src/fs/libgnunetfs.la  \
220   $(top_builddir)/src/util/libgnunetutil.la  
221
222 test_fs_publish_persistence_SOURCES = \
223  test_fs_publish_persistence.c
224 test_fs_publish_persistence_LDADD = \
225   $(top_builddir)/src/fs/libgnunetfs.la  \
226   $(top_builddir)/src/util/libgnunetutil.la  
227
228 test_fs_search_SOURCES = \
229  test_fs_search.c
230 test_fs_search_LDADD = $(top_builddir)/src/fs/libgnunetfs.la    \
231   $(top_builddir)/src/util/libgnunetutil.la
232
233 test_fs_search_persistence_SOURCES = \
234  test_fs_search_persistence.c
235 test_fs_search_persistence_LDADD = $(top_builddir)/src/fs/libgnunetfs.la        \
236   $(top_builddir)/src/util/libgnunetutil.la
237
238 test_fs_start_stop_SOURCES = \
239  test_fs_start_stop.c
240 test_fs_start_stop_LDADD = \
241   $(top_builddir)/src/fs/libgnunetfs.la  \
242   $(top_builddir)/src/util/libgnunetutil.la  
243
244 test_fs_unindex_SOURCES = \
245  test_fs_unindex.c
246 test_fs_unindex_LDADD = \
247   $(top_builddir)/src/fs/libgnunetfs.la  \
248   $(top_builddir)/src/util/libgnunetutil.la  
249
250 test_fs_unindex_persistence_SOURCES = \
251  test_fs_unindex_persistence.c
252 test_fs_unindex_persistence_LDADD = \
253   $(top_builddir)/src/fs/libgnunetfs.la  \
254   $(top_builddir)/src/util/libgnunetutil.la  
255
256 test_fs_uri_SOURCES = \
257  test_fs_uri.c
258 test_fs_uri_LDADD = \
259   $(top_builddir)/src/fs/libgnunetfs.la  \
260   $(top_builddir)/src/util/libgnunetutil.la  
261
262 test_fs_test_lib_SOURCES = \
263  test_fs_test_lib.c
264 test_fs_test_lib_LDADD = \
265   $(top_builddir)/src/fs/libgnunetfstest.a \
266   $(top_builddir)/src/testing/libgnunettesting.la \
267   $(top_builddir)/src/fs/libgnunetfs.la  \
268   $(top_builddir)/src/util/libgnunetutil.la  
269
270 test_gnunet_service_fs_p2p_SOURCES = \
271  test_gnunet_service_fs_p2p.c
272 test_gnunet_service_fs_p2p_LDADD = \
273   $(top_builddir)/src/fs/libgnunetfstest.a \
274   $(top_builddir)/src/testing/libgnunettesting.la \
275   $(top_builddir)/src/fs/libgnunetfs.la  \
276   $(top_builddir)/src/util/libgnunetutil.la  
277
278 test_gnunet_service_fs_migration_SOURCES = \
279  test_gnunet_service_fs_migration.c
280 test_gnunet_service_fs_migration_LDADD = \
281   $(top_builddir)/src/fs/libgnunetfstest.a \
282   $(top_builddir)/src/testing/libgnunettesting.la \
283   $(top_builddir)/src/fs/libgnunetfs.la  \
284   $(top_builddir)/src/util/libgnunetutil.la  
285
286 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
287
288 test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile
289         $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py
290         chmod +x test_gnunet_fs_psd.py
291
292 test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile
293         $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py
294         chmod +x test_gnunet_fs_rec.py
295
296 test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile
297         $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py
298         chmod +x test_gnunet_fs_ns.py
299
300 test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile
301         $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py
302         chmod +x test_gnunet_fs_idx.py
303
304
305 EXTRA_DIST = \
306   fs_test_lib_data.conf \
307   test_fs_data.conf \
308   test_fs_download_data.conf \
309   test_fs_file_information_data.conf \
310   test_fs_file_information_meta_data_image.jpg \
311   fs_test_lib_data.conf \
312   test_fs_list_indexed_data.conf \
313   test_fs_namespace_data.conf \
314   test_fs_publish_data.conf \
315   test_fs_search_data.conf \
316   test_fs_unindex_data.conf \
317   test_fs_uri_data.conf \
318   test_gnunet_service_fs_migration_data.conf \
319   test_gnunet_fs_idx_data.conf \
320   test_gnunet_fs_ns_data.conf \
321   test_gnunet_fs_psd_data.conf \
322   test_gnunet_fs_rec_data.conf \
323   test_gnunet_fs_rec_data.tgz \
324   test_gnunet_fs_psd.py.in \
325   test_gnunet_fs_rec.py.in \
326   test_gnunet_fs_ns.py.in \
327   test_gnunet_fs_idx.py.in
328
329 CLEANFILES = $(check_SCRIPTS)