psycstore: postgres: remove size modifier from BYTEA fields
[oweals/gnunet.git] / src / fs / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -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 pkgcfgdir= $(pkgdatadir)/config.d/
14
15 libexecdir= $(pkglibdir)/libexec/
16
17 pkgcfg_DATA = \
18   fs.conf
19
20 plugindir = $(libdir)/gnunet
21
22
23 lib_LTLIBRARIES = libgnunetfs.la
24
25 plugin_LTLIBRARIES = \
26   libgnunet_plugin_block_fs.la
27
28 if HAVE_TESTING
29 noinst_LIBRARIES = libgnunetfstest.a
30 endif
31
32 libgnunetfs_la_SOURCES = \
33   fs_api.c fs_api.h fs.h \
34   fs_directory.c \
35   fs_dirmetascan.c \
36   fs_download.c \
37   fs_file_information.c \
38   fs_getopt.c \
39   fs_list_indexed.c \
40   fs_publish.c \
41   fs_publish_ksk.c \
42   fs_publish_ublock.c fs_publish_ublock.h \
43   fs_misc.c \
44   fs_namespace.c \
45   fs_search.c \
46   fs_sharetree.c \
47   fs_tree.c fs_tree.h \
48   fs_unindex.c \
49   fs_uri.c
50
51 libgnunetfs_la_LIBADD = \
52   $(top_builddir)/src/datastore/libgnunetdatastore.la \
53   $(top_builddir)/src/util/libgnunetutil.la \
54   $(GN_LIBINTL) $(XLIB) $(LIBGCRYPT_LIBS) -lunistring
55
56 if HAVE_LIBEXTRACTOR
57 libgnunetfs_la_LIBADD += \
58   -lextractor
59 endif
60
61 libgnunetfs_la_LDFLAGS = \
62   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
63   -version-info 3:1:1
64
65
66 libgnunetfstest_a_SOURCES = \
67   fs_test_lib.c fs_test_lib.h
68
69 libgnunetfstest_a_LIBADD = \
70   $(top_builddir)/src/testing/libgnunettesting.la \
71   $(top_builddir)/src/testbed/libgnunettestbed.la
72
73 libexec_PROGRAMS = \
74   gnunet-helper-fs-publish \
75   gnunet-service-fs
76
77 if HAVE_TESTING
78 noinst_PROGRAMS = \
79   gnunet-fs-profiler \
80   gnunet-daemon-fsprofiler
81 endif
82
83 bin_PROGRAMS = \
84   gnunet-auto-share \
85   gnunet-directory \
86   gnunet-download \
87   gnunet-publish \
88   gnunet-search \
89   gnunet-fs \
90   gnunet-unindex
91
92 bin_SCRIPTS = \
93   gnunet-download-manager.scm
94
95 gnunet_directory_SOURCES = \
96  gnunet-directory.c
97 gnunet_directory_LDADD = \
98   libgnunetfs.la \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(GN_LIBINTL)
101
102 if HAVE_LIBEXTRACTOR
103 gnunet_directory_LDADD += \
104   -lextractor
105 endif
106
107 gnunet_fs_profiler_SOURCES = \
108  gnunet-fs-profiler.c
109 gnunet_fs_profiler_LDADD = \
110   $(top_builddir)/src/testbed/libgnunettestbed.la \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(GN_LIBINTL)
113
114 gnunet_fs_SOURCES = \
115  gnunet-fs.c
116 gnunet_fs_LDADD = \
117   libgnunetfs.la \
118   $(top_builddir)/src/util/libgnunetutil.la \
119   $(GN_LIBINTL)
120
121 if HAVE_LIBEXTRACTOR
122 gnunet_fs_LDADD += \
123   -lextractor
124 endif
125
126 gnunet_download_SOURCES =  \
127  gnunet-download.c
128 gnunet_download_LDADD =  \
129  libgnunetfs.la \
130  $(top_builddir)/src/util/libgnunetutil.la \
131  $(GN_LIBINTL)
132
133 gnunet_publish_SOURCES =  \
134  gnunet-publish.c
135 gnunet_publish_LDADD =  \
136  $(top_builddir)/src/identity/libgnunetidentity.la \
137  libgnunetfs.la \
138  $(top_builddir)/src/util/libgnunetutil.la \
139  $(GN_LIBINTL)
140
141 if HAVE_LIBEXTRACTOR
142 gnunet_publish_LDADD += \
143   -lextractor
144 endif
145
146 gnunet_auto_share_SOURCES =  \
147  gnunet-auto-share.c
148 gnunet_auto_share_LDADD =  \
149  $(top_builddir)/src/util/libgnunetutil.la \
150  $(GN_LIBINTL)
151
152 if HAVE_LIBEXTRACTOR
153 gnunet_auto_share_LDADD += \
154   -lextractor
155 endif
156
157 gnunet_helper_fs_publish_SOURCES =  \
158  gnunet-helper-fs-publish.c
159 gnunet_helper_fs_publish_LDADD =  \
160  $(top_builddir)/src/util/libgnunetutil.la \
161  $(GN_LIBINTL)
162
163 if HAVE_LIBEXTRACTOR
164 gnunet_helper_fs_publish_LDADD += \
165   -lextractor
166 endif
167
168 gnunet_search_SOURCES = \
169  gnunet-search.c
170 gnunet_search_LDADD = \
171   libgnunetfs.la \
172   $(top_builddir)/src/util/libgnunetutil.la \
173   $(GN_LIBINTL)
174
175 if HAVE_LIBEXTRACTOR
176 gnunet_search_LDADD += \
177   -lextractor
178 endif
179
180
181 gnunet_daemon_fsprofiler_SOURCES =  \
182  gnunet-daemon-fsprofiler.c
183 gnunet_daemon_fsprofiler_LDADD = \
184   libgnunetfs.la \
185   $(top_builddir)/src/statistics/libgnunetstatistics.la \
186   $(top_builddir)/src/util/libgnunetutil.la \
187   $(GN_LIBINTL)
188
189 gnunet_service_fs_SOURCES =  \
190  gnunet-service-fs.c gnunet-service-fs.h \
191  gnunet-service-fs_cp.c gnunet-service-fs_cp.h \
192  gnunet-service-fs_indexing.c gnunet-service-fs_indexing.h \
193  gnunet-service-fs_pe.c gnunet-service-fs_pe.h \
194  gnunet-service-fs_pr.c gnunet-service-fs_pr.h \
195  gnunet-service-fs_push.c gnunet-service-fs_push.h \
196  gnunet-service-fs_put.c gnunet-service-fs_put.h \
197  gnunet-service-fs_cadet_client.c gnunet-service-fs_cadet.h \
198  gnunet-service-fs_cadet_server.c
199 gnunet_service_fs_LDADD =  \
200  libgnunetfs.la \
201  $(top_builddir)/src/dht/libgnunetdht.la \
202  $(top_builddir)/src/block/libgnunetblock.la \
203  $(top_builddir)/src/datastore/libgnunetdatastore.la \
204  $(top_builddir)/src/statistics/libgnunetstatistics.la \
205  $(top_builddir)/src/cadet/libgnunetcadet.la \
206  $(top_builddir)/src/ats/libgnunetats.la \
207  $(top_builddir)/src/core/libgnunetcore.la \
208  $(top_builddir)/src/util/libgnunetutil.la \
209  $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
210  $(GN_LIBINTL) -lm
211
212 gnunet_unindex_SOURCES = \
213  gnunet-unindex.c
214 gnunet_unindex_LDADD = \
215   libgnunetfs.la \
216   $(top_builddir)/src/util/libgnunetutil.la \
217   $(GN_LIBINTL)
218
219 libgnunet_plugin_block_fs_la_SOURCES = \
220   plugin_block_fs.c
221 libgnunet_plugin_block_fs_la_LIBADD = \
222   $(top_builddir)/src/block/libgnunetblock.la \
223   libgnunetfs.la \
224   $(top_builddir)/src/util/libgnunetutil.la \
225   $(LTLIBINTL)
226 libgnunet_plugin_block_fs_la_LDFLAGS = \
227  $(GN_PLUGIN_LDFLAGS)
228
229 if HAVE_BENCHMARKS
230  FS_BENCHMARKS = \
231  perf_gnunet_service_fs_p2p \
232  perf_gnunet_service_fs_p2p_dht \
233  perf_gnunet_service_fs_p2p_index \
234  perf_gnunet_service_fs_p2p_respect
235 endif
236
237 if HAVE_TESTING
238 check_PROGRAMS = \
239  test_plugin_block_fs \
240  test_fs_directory \
241  test_fs_download \
242  test_fs_download_cadet \
243  test_fs_download_indexed \
244  test_fs_download_persistence \
245  test_fs_file_information \
246  test_fs_getopt \
247  test_fs_list_indexed \
248  test_fs_namespace \
249  test_fs_namespace_list_updateable \
250  test_fs_publish \
251  test_fs_publish_persistence \
252  test_fs_search \
253  test_fs_search_with_and \
254  test_fs_search_probes \
255  test_fs_search_persistence \
256  test_fs_start_stop \
257  test_fs_test_lib \
258  test_fs_unindex \
259  test_fs_unindex_persistence \
260  test_fs_uri \
261  test_gnunet_service_fs_migration \
262  test_gnunet_service_fs_p2p \
263  test_gnunet_service_fs_p2p_cadet \
264  $(FS_BENCHMARKS)
265 endif
266
267 test_plugin_block_fs_SOURCES = \
268  test_plugin_block_fs.c
269 test_plugin_block_fs_LDADD = \
270  $(top_builddir)/src/block/libgnunetblock.la \
271  $(top_builddir)/src/util/libgnunetutil.la
272
273 if HAVE_PYTHON
274 check_SCRIPTS = \
275  test_gnunet_fs_rec.py \
276  test_gnunet_fs_idx.py
277
278 if HAVE_LIBEXTRACTOR
279 check_SCRIPTS += \
280  test_gnunet_fs_psd.py
281 endif
282 endif
283
284 if ENABLE_MONKEY
285  MONKEY = @MONKEYPREFIX@
286  AM_LDFLAGS = -no-install
287 endif
288
289
290 if ENABLE_TEST_RUN
291 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH; $(MONKEY)
292 TESTS = \
293  test_fs_directory \
294  test_fs_download \
295  test_fs_download_indexed \
296  test_fs_download_persistence \
297  test_fs_file_information \
298  test_fs_list_indexed \
299  test_fs_namespace \
300  test_fs_namespace_list_updateable \
301  test_fs_publish \
302  test_fs_publish_persistence \
303  test_fs_search \
304  test_fs_search_with_and \
305  test_fs_search_probes \
306  test_fs_search_persistence \
307  test_fs_start_stop \
308  test_fs_unindex \
309  test_fs_unindex_persistence \
310  test_fs_uri \
311  test_fs_test_lib \
312  test_gnunet_service_fs_migration \
313  test_gnunet_service_fs_p2p \
314  test_gnunet_service_fs_p2p_cadet \
315  perf_gnunet_service_fs_p2p \
316  perf_gnunet_service_fs_p2p_index \
317  perf_gnunet_service_fs_p2p_respect \
318  $(check_SCRIPTS)
319 endif
320
321
322 test_fs_directory_SOURCES = \
323  test_fs_directory.c
324 test_fs_directory_LDADD = \
325   libgnunetfs.la  \
326   $(top_builddir)/src/util/libgnunetutil.la
327
328 if HAVE_LIBEXTRACTOR
329 test_fs_directory_LDADD += \
330   -lextractor
331 endif
332
333
334 test_fs_download_SOURCES = \
335  test_fs_download.c
336 test_fs_download_LDADD = \
337   $(top_builddir)/src/testing/libgnunettesting.la  \
338   libgnunetfs.la  \
339   $(top_builddir)/src/util/libgnunetutil.la
340
341 test_fs_download_indexed_SOURCES = \
342  test_fs_download.c
343 test_fs_download_indexed_LDADD = \
344   $(top_builddir)/src/testing/libgnunettesting.la  \
345   libgnunetfs.la  \
346   $(top_builddir)/src/util/libgnunetutil.la
347
348 test_fs_download_cadet_SOURCES = \
349  test_fs_download.c
350 test_fs_download_cadet_LDADD = \
351   $(top_builddir)/src/testing/libgnunettesting.la  \
352   libgnunetfs.la  \
353   $(top_builddir)/src/util/libgnunetutil.la
354
355 test_fs_download_persistence_SOURCES = \
356  test_fs_download_persistence.c
357 test_fs_download_persistence_LDADD = \
358   $(top_builddir)/src/testing/libgnunettesting.la  \
359   libgnunetfs.la  \
360   $(top_builddir)/src/util/libgnunetutil.la
361
362 test_fs_file_information_SOURCES = \
363  test_fs_file_information.c
364 test_fs_file_information_LDADD = \
365   libgnunetfs.la  \
366   $(top_builddir)/src/util/libgnunetutil.la
367
368 if HAVE_LIBEXTRACTOR
369 test_fs_file_information_LDADD += \
370   -lextractor
371 endif
372
373
374 test_fs_getopt_SOURCES = \
375  test_fs_getopt.c
376 test_fs_getopt_LDADD = \
377   libgnunetfs.la  \
378   $(top_builddir)/src/util/libgnunetutil.la
379
380 test_fs_list_indexed_SOURCES = \
381  test_fs_list_indexed.c
382 test_fs_list_indexed_LDADD = \
383   $(top_builddir)/src/testing/libgnunettesting.la \
384   libgnunetfs.la  \
385   $(top_builddir)/src/util/libgnunetutil.la
386
387 test_fs_namespace_SOURCES = \
388  test_fs_namespace.c
389 test_fs_namespace_LDADD = \
390   $(top_builddir)/src/testing/libgnunettesting.la \
391   libgnunetfs.la  \
392   $(top_builddir)/src/util/libgnunetutil.la
393
394 test_fs_namespace_list_updateable_SOURCES = \
395  test_fs_namespace_list_updateable.c
396 test_fs_namespace_list_updateable_LDADD = \
397   $(top_builddir)/src/testing/libgnunettesting.la \
398   libgnunetfs.la  \
399   $(top_builddir)/src/util/libgnunetutil.la
400
401 test_fs_publish_SOURCES = \
402  test_fs_publish.c
403 test_fs_publish_LDADD = \
404   $(top_builddir)/src/testing/libgnunettesting.la \
405   libgnunetfs.la  \
406   $(top_builddir)/src/util/libgnunetutil.la
407
408 test_fs_publish_persistence_SOURCES = \
409  test_fs_publish_persistence.c
410 test_fs_publish_persistence_LDADD = \
411   $(top_builddir)/src/testing/libgnunettesting.la \
412   libgnunetfs.la  \
413   $(top_builddir)/src/util/libgnunetutil.la
414
415 test_fs_search_SOURCES = \
416  test_fs_search.c
417 test_fs_search_LDADD = \
418   $(top_builddir)/src/testing/libgnunettesting.la \
419   libgnunetfs.la        \
420   $(top_builddir)/src/util/libgnunetutil.la
421
422 test_fs_search_with_and_SOURCES = \
423  test_fs_search_with_and.c
424 test_fs_search_with_and_LDADD = \
425   $(top_builddir)/src/testing/libgnunettesting.la \
426   libgnunetfs.la        \
427   $(top_builddir)/src/util/libgnunetutil.la
428
429 test_fs_search_probes_SOURCES = \
430  test_fs_search_probes.c
431 test_fs_search_probes_LDADD = \
432   $(top_builddir)/src/testing/libgnunettesting.la \
433   libgnunetfs.la        \
434   $(top_builddir)/src/util/libgnunetutil.la
435
436 test_fs_search_persistence_SOURCES = \
437  test_fs_search_persistence.c
438 test_fs_search_persistence_LDADD = \
439   $(top_builddir)/src/testing/libgnunettesting.la \
440   libgnunetfs.la        \
441   $(top_builddir)/src/util/libgnunetutil.la
442
443 test_fs_start_stop_SOURCES = \
444  test_fs_start_stop.c
445 test_fs_start_stop_LDADD = \
446   $(top_builddir)/src/testing/libgnunettesting.la \
447   libgnunetfs.la  \
448   $(top_builddir)/src/util/libgnunetutil.la
449
450 test_fs_unindex_SOURCES = \
451  test_fs_unindex.c
452 test_fs_unindex_LDADD = \
453   $(top_builddir)/src/testing/libgnunettesting.la \
454   libgnunetfs.la \
455   $(top_builddir)/src/util/libgnunetutil.la
456
457 test_fs_unindex_persistence_SOURCES = \
458  test_fs_unindex_persistence.c
459 test_fs_unindex_persistence_LDADD = \
460   $(top_builddir)/src/testing/libgnunettesting.la \
461   libgnunetfs.la \
462   $(top_builddir)/src/util/libgnunetutil.la
463
464 test_fs_uri_SOURCES = \
465  test_fs_uri.c
466 test_fs_uri_LDADD = \
467   libgnunetfs.la  \
468   $(top_builddir)/src/util/libgnunetutil.la
469
470 test_fs_test_lib_SOURCES = \
471  test_fs_test_lib.c
472 test_fs_test_lib_LDADD = \
473   libgnunetfstest.a \
474   $(top_builddir)/src/testbed/libgnunettestbed.la \
475   libgnunetfs.la  \
476   $(top_builddir)/src/util/libgnunetutil.la
477
478 test_gnunet_service_fs_p2p_SOURCES = \
479  test_gnunet_service_fs_p2p.c
480 test_gnunet_service_fs_p2p_LDADD = \
481   libgnunetfstest.a \
482   $(top_builddir)/src/testbed/libgnunettestbed.la \
483   libgnunetfs.la  \
484   $(top_builddir)/src/util/libgnunetutil.la
485
486 test_gnunet_service_fs_p2p_cadet_SOURCES = \
487  test_gnunet_service_fs_p2p.c
488 test_gnunet_service_fs_p2p_cadet_LDADD = \
489   libgnunetfstest.a \
490   $(top_builddir)/src/testbed/libgnunettestbed.la \
491   libgnunetfs.la  \
492   $(top_builddir)/src/util/libgnunetutil.la
493
494 test_gnunet_service_fs_migration_SOURCES = \
495  test_gnunet_service_fs_migration.c
496 test_gnunet_service_fs_migration_LDADD = \
497   libgnunetfstest.a \
498   $(top_builddir)/src/testbed/libgnunettestbed.la \
499   libgnunetfs.la  \
500   $(top_builddir)/src/util/libgnunetutil.la
501
502 perf_gnunet_service_fs_p2p_SOURCES = \
503  perf_gnunet_service_fs_p2p.c
504 perf_gnunet_service_fs_p2p_LDADD = \
505   libgnunetfstest.a \
506   $(top_builddir)/src/statistics/libgnunetstatistics.la \
507   $(top_builddir)/src/testbed/libgnunettestbed.la \
508   libgnunetfs.la  \
509   $(top_builddir)/src/util/libgnunetutil.la
510
511 perf_gnunet_service_fs_p2p_index_SOURCES = \
512  perf_gnunet_service_fs_p2p.c
513 perf_gnunet_service_fs_p2p_index_LDADD = \
514   libgnunetfstest.a \
515   $(top_builddir)/src/statistics/libgnunetstatistics.la \
516   $(top_builddir)/src/testbed/libgnunettestbed.la \
517   libgnunetfs.la  \
518   $(top_builddir)/src/util/libgnunetutil.la
519
520 perf_gnunet_service_fs_p2p_dht_SOURCES = \
521  perf_gnunet_service_fs_p2p.c
522 perf_gnunet_service_fs_p2p_dht_LDADD = \
523   libgnunetfstest.a \
524   $(top_builddir)/src/statistics/libgnunetstatistics.la \
525   $(top_builddir)/src/testbed/libgnunettestbed.la \
526   libgnunetfs.la  \
527   $(top_builddir)/src/util/libgnunetutil.la
528
529 perf_gnunet_service_fs_p2p_respect_SOURCES = \
530  perf_gnunet_service_fs_p2p_respect.c
531 perf_gnunet_service_fs_p2p_respect_LDADD = \
532   libgnunetfstest.a \
533   $(top_builddir)/src/statistics/libgnunetstatistics.la \
534   $(top_builddir)/src/testbed/libgnunettestbed.la \
535   libgnunetfs.la  \
536   $(top_builddir)/src/util/libgnunetutil.la
537
538
539 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
540
541 test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile
542         $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py
543         chmod +x test_gnunet_fs_psd.py
544
545 test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile
546         $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py
547         chmod +x test_gnunet_fs_rec.py
548
549 test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile
550         $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py
551         chmod +x test_gnunet_fs_ns.py
552
553 test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile
554         $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py
555         chmod +x test_gnunet_fs_idx.py
556
557
558 EXTRA_DIST = \
559   fs_test_lib_data.conf \
560   perf_gnunet_service_fs_p2p.conf \
561   test_fs_data.conf \
562   test_fs_defaults.conf \
563   test_fs_download_data.conf \
564   test_fs_download_indexed.conf \
565   test_fs_file_information_data.conf \
566   test_fs_list_indexed_data.conf \
567   test_fs_namespace_data.conf \
568   test_fs_publish_data.conf \
569   test_fs_search_data.conf \
570   test_fs_unindex_data.conf \
571   test_gnunet_fs_idx_data.conf \
572   test_gnunet_fs_psd_data.conf \
573   test_gnunet_fs_rec_data.conf \
574   test_gnunet_fs_rec_data.tgz \
575   test_gnunet_fs_psd.py.in \
576   test_gnunet_fs_rec.py.in \
577   test_gnunet_fs_idx.py.in \
578   test_gnunet_service_fs_migration_data.conf \
579   test_gnunet_service_fs_p2p_cadet.conf \
580   test_pseudonym_data.conf \
581   $(bin_SCRIPTS)
582
583 CLEANFILES = $(check_SCRIPTS)