fixing common off-by-one error with respect to maximum message size
[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_collection.c \
21   fs_directory.c \
22   fs_download.c \
23   fs_file_information.c \
24   fs_getopt.c \
25   fs_list_indexed.c \
26   fs_publish.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
66 gnunet_download_SOURCES =  \
67  gnunet-download.c         
68 gnunet_download_LDADD =  \
69  $(top_builddir)/src/fs/libgnunetfs.la \
70  $(top_builddir)/src/util/libgnunetutil.la \
71  $(GN_LIBINTL)
72
73 gnunet_publish_SOURCES =  \
74  gnunet-publish.c         
75 gnunet_publish_LDADD =  \
76  $(top_builddir)/src/fs/libgnunetfs.la \
77  $(top_builddir)/src/util/libgnunetutil.la \
78  $(GN_LIBINTL)
79
80 gnunet_pseudonym_SOURCES = \
81  gnunet-pseudonym.c
82 gnunet_pseudonym_LDADD = \
83   $(top_builddir)/src/fs/libgnunetfs.la \
84   $(top_builddir)/src/util/libgnunetutil.la \
85   -lextractor \
86   $(GN_LIBINTL)
87
88 gnunet_search_SOURCES = \
89  gnunet-search.c         
90 gnunet_search_LDADD = \
91   $(top_builddir)/src/fs/libgnunetfs.la \
92   $(top_builddir)/src/util/libgnunetutil.la \
93   $(GN_LIBINTL)
94
95 gnunet_service_fs_SOURCES =  \
96  gnunet-service-fs.c \
97  gnunet-service-fs_indexing.c gnunet-service-fs_indexing.h 
98 gnunet_service_fs_LDADD =  \
99  $(top_builddir)/src/fs/libgnunetfs.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_collection \
119  test_fs_directory \
120  test_fs_download \
121  test_fs_download_indexed \
122  test_fs_download_persistence \
123  test_fs_file_information \
124  test_fs_getopt \
125  test_fs_list_indexed \
126  test_fs_namespace \
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
139
140 if HAVE_PYTHON_PEXPECT
141 check_SCRIPTS = \
142  test_gnunet_fs_psd.py \
143  test_gnunet_fs_rec.py \
144  test_gnunet_fs_ns.py \
145  test_gnunet_fs_idx.py
146 endif
147
148 TESTS = \
149  test_fs_directory \
150  test_fs_download \
151  test_fs_download_indexed \
152  test_fs_download_persistence \
153  test_fs_file_information \
154  test_fs_list_indexed \
155  test_fs_namespace \
156  test_fs_publish \
157  test_fs_publish_persistence \
158  test_fs_search \
159  test_fs_search_persistence \
160  test_fs_start_stop \
161  test_fs_unindex \
162  test_fs_unindex_persistence \
163  test_fs_uri \
164  test_fs_test_lib \
165  test_gnunet_service_fs_migration \
166  test_gnunet_service_fs_p2p \
167  $(check_SCRIPTS) 
168 # $(check_PROGRAMS)
169
170
171 test_fs_collection_SOURCES = \
172  test_fs_collection.c
173 test_fs_collection_LDADD = \
174   $(top_builddir)/src/fs/libgnunetfs.la  \
175   $(top_builddir)/src/util/libgnunetutil.la  
176
177 test_fs_directory_SOURCES = \
178  test_fs_directory.c
179 test_fs_directory_LDADD = \
180   $(top_builddir)/src/fs/libgnunetfs.la  \
181   $(top_builddir)/src/util/libgnunetutil.la  
182
183 test_fs_download_SOURCES = \
184  test_fs_download.c
185 test_fs_download_LDADD = \
186   $(top_builddir)/src/fs/libgnunetfs.la  \
187   $(top_builddir)/src/util/libgnunetutil.la  
188
189 test_fs_download_indexed_SOURCES = \
190  test_fs_download_indexed.c
191 test_fs_download_indexed_LDADD = \
192   $(top_builddir)/src/fs/libgnunetfs.la  \
193   $(top_builddir)/src/util/libgnunetutil.la  
194
195 test_fs_download_persistence_SOURCES = \
196  test_fs_download_persistence.c
197 test_fs_download_persistence_LDADD = \
198   $(top_builddir)/src/fs/libgnunetfs.la  \
199   $(top_builddir)/src/util/libgnunetutil.la  
200
201 test_fs_file_information_SOURCES = \
202  test_fs_file_information.c
203 test_fs_file_information_LDADD = \
204   $(top_builddir)/src/fs/libgnunetfs.la  \
205   $(top_builddir)/src/util/libgnunetutil.la  
206
207 test_fs_getopt_SOURCES = \
208  test_fs_getopt.c
209 test_fs_getopt_LDADD = \
210   $(top_builddir)/src/fs/libgnunetfs.la  \
211   $(top_builddir)/src/util/libgnunetutil.la  
212
213 test_fs_list_indexed_SOURCES = \
214  test_fs_list_indexed.c
215 test_fs_list_indexed_LDADD = \
216   $(top_builddir)/src/fs/libgnunetfs.la  \
217   $(top_builddir)/src/util/libgnunetutil.la  
218
219 test_fs_namespace_SOURCES = \
220  test_fs_namespace.c
221 test_fs_namespace_LDADD = \
222   $(top_builddir)/src/fs/libgnunetfs.la  \
223   $(top_builddir)/src/util/libgnunetutil.la  
224
225 test_fs_publish_SOURCES = \
226  test_fs_publish.c
227 test_fs_publish_LDADD = \
228   $(top_builddir)/src/fs/libgnunetfs.la  \
229   $(top_builddir)/src/util/libgnunetutil.la  
230
231 test_fs_publish_persistence_SOURCES = \
232  test_fs_publish_persistence.c
233 test_fs_publish_persistence_LDADD = \
234   $(top_builddir)/src/fs/libgnunetfs.la  \
235   $(top_builddir)/src/util/libgnunetutil.la  
236
237 test_fs_search_SOURCES = \
238  test_fs_search.c
239 test_fs_search_LDADD = $(top_builddir)/src/fs/libgnunetfs.la    \
240   $(top_builddir)/src/util/libgnunetutil.la
241
242 test_fs_search_persistence_SOURCES = \
243  test_fs_search_persistence.c
244 test_fs_search_persistence_LDADD = $(top_builddir)/src/fs/libgnunetfs.la        \
245   $(top_builddir)/src/util/libgnunetutil.la
246
247 test_fs_start_stop_SOURCES = \
248  test_fs_start_stop.c
249 test_fs_start_stop_LDADD = \
250   $(top_builddir)/src/fs/libgnunetfs.la  \
251   $(top_builddir)/src/util/libgnunetutil.la  
252
253 test_fs_unindex_SOURCES = \
254  test_fs_unindex.c
255 test_fs_unindex_LDADD = \
256   $(top_builddir)/src/fs/libgnunetfs.la  \
257   $(top_builddir)/src/util/libgnunetutil.la  
258
259 test_fs_unindex_persistence_SOURCES = \
260  test_fs_unindex_persistence.c
261 test_fs_unindex_persistence_LDADD = \
262   $(top_builddir)/src/fs/libgnunetfs.la  \
263   $(top_builddir)/src/util/libgnunetutil.la  
264
265 test_fs_uri_SOURCES = \
266  test_fs_uri.c
267 test_fs_uri_LDADD = \
268   $(top_builddir)/src/fs/libgnunetfs.la  \
269   $(top_builddir)/src/util/libgnunetutil.la  
270
271 test_fs_test_lib_SOURCES = \
272  test_fs_test_lib.c
273 test_fs_test_lib_LDADD = \
274   $(top_builddir)/src/fs/libgnunetfstest.a \
275   $(top_builddir)/src/testing/libgnunettesting.la \
276   $(top_builddir)/src/fs/libgnunetfs.la  \
277   $(top_builddir)/src/util/libgnunetutil.la  
278
279 test_gnunet_service_fs_p2p_SOURCES = \
280  test_gnunet_service_fs_p2p.c
281 test_gnunet_service_fs_p2p_LDADD = \
282   $(top_builddir)/src/fs/libgnunetfstest.a \
283   $(top_builddir)/src/testing/libgnunettesting.la \
284   $(top_builddir)/src/fs/libgnunetfs.la  \
285   $(top_builddir)/src/util/libgnunetutil.la  
286
287 test_gnunet_service_fs_migration_SOURCES = \
288  test_gnunet_service_fs_migration.c
289 test_gnunet_service_fs_migration_LDADD = \
290   $(top_builddir)/src/fs/libgnunetfstest.a \
291   $(top_builddir)/src/testing/libgnunettesting.la \
292   $(top_builddir)/src/fs/libgnunetfs.la  \
293   $(top_builddir)/src/util/libgnunetutil.la  
294
295 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
296
297 test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile
298         $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py
299         chmod +x test_gnunet_fs_psd.py
300
301 test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile
302         $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py
303         chmod +x test_gnunet_fs_rec.py
304
305 test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile
306         $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py
307         chmod +x test_gnunet_fs_ns.py
308
309 test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile
310         $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py
311         chmod +x test_gnunet_fs_idx.py
312
313
314 EXTRA_DIST = \
315   fs_test_lib_data.conf \
316   test_fs_data.conf \
317   test_fs_collection_data.conf \
318   test_fs_download_data.conf \
319   test_fs_file_information_data.conf \
320   test_fs_file_information_data_image.jpg \
321   fs_test_lib_data.conf \
322   test_fs_list_indexed_data.conf \
323   test_fs_namespace_data.conf \
324   test_fs_publish_data.conf \
325   test_fs_search_data.conf \
326   test_fs_unindex_data.conf \
327   test_fs_uri_data.conf \
328   test_gnunet_service_fs_migration_data.conf \
329   test_gnunet_fs_idx_data.conf \
330   test_gnunet_fs_ns_data.conf \
331   test_gnunet_fs_psd_data.conf \
332   test_gnunet_fs_rec_data.conf \
333   test_gnunet_fs_rec_data.tgz \
334   test_gnunet_fs_psd.py.in \
335   test_gnunet_fs_rec.py.in \
336   test_gnunet_fs_ns.py.in \
337   test_gnunet_fs_idx.py.in
338
339 CLEANFILES = $(check_SCRIPTS)