implement impl_in_flight API for MQ, replacing evacuation
[oweals/gnunet.git] / src / util / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 plugindir = $(libdir)/gnunet
5
6 libexecdir= $(pkglibdir)/libexec/
7
8 pkgcfgdir= $(pkgdatadir)/config.d/
9
10 dist_pkgcfg_DATA = \
11   util.conf
12
13 pkgcfg_DATA = \
14   resolver.conf
15
16 if MINGW
17 noinst_LTLIBRARIES = \
18   libgnunetutilwin.la
19 libgnunetutilwin_la_SOURCES = \
20   win.c \
21   winproc.c
22 libgnunetutilwin_la_LDFLAGS = \
23   -no-undefined -Wl,--export-all-symbols
24 libgnunetutilwin_la_LIBADD = \
25   -lshell32 -liconv -lstdc++ \
26   -lcomdlg32 -lgdi32 -liphlpapi
27 WINLIB = libgnunetutilwin.la
28 W32CAT = w32cat
29 W32CONSOLEHELPER = gnunet-helper-w32-console
30 endif
31
32 if !MINGW
33  SERVER_CLIENT_UNIX = test_server_with_client_unix
34 endif
35
36 if USE_COVERAGE
37   AM_CFLAGS = --coverage -O0
38   XLIB = -lgcov
39 endif
40
41 w32cat_SOURCES = w32cat.c
42
43 gnunet_helper_w32_console_SOURCES = \
44   gnunet-helper-w32-console.c \
45   gnunet-helper-w32-console.h
46 gnunet_helper_w32_console_LDADD = \
47   libgnunetutil.la
48
49 gnunet_config_diff_SOURCES = \
50  gnunet-config-diff.c
51 gnunet_config_diff_LDADD = \
52  libgnunetutil.la
53
54 test_common_logging_dummy_SOURCES = \
55  test_common_logging_dummy.c
56 test_common_logging_dummy_LDADD = \
57  libgnunetutil.la
58
59 libgnunetutil_la_SOURCES = \
60   bandwidth.c \
61   bio.c \
62   client.c \
63   common_allocation.c \
64   common_endian.c \
65   common_logging.c \
66   configuration.c \
67   configuration_loader.c \
68   connection.c \
69   container_bloomfilter.c \
70   container_heap.c \
71   container_meta_data.c \
72   container_multihashmap.c \
73   container_multipeermap.c \
74   container_multihashmap32.c \
75   crypto_symmetric.c \
76   crypto_crc.c \
77   crypto_ecc.c \
78   crypto_ecc_dlog.c \
79   crypto_ecc_setup.c \
80   crypto_hash.c \
81   crypto_hash_file.c \
82   crypto_hkdf.c \
83   crypto_kdf.c \
84   crypto_mpi.c \
85   crypto_paillier.c \
86   crypto_random.c \
87   crypto_rsa.c \
88   disk.c \
89   disk.h \
90   getopt.c \
91   getopt_helpers.c \
92   helper.c \
93   load.c \
94   mst.c \
95   mq.c \
96   nc.c \
97   network.c \
98   op.c \
99   os_installation.c \
100   os_network.c \
101   os_priority.c \
102   peer.c \
103   plugin.c \
104   program.c \
105   resolver_api.c resolver.h \
106   scheduler.c \
107   server.c \
108   server_mst.c \
109   server_nc.c \
110   server_tc.c \
111   service.c \
112   service_new.c \
113   signal.c \
114   strings.c \
115   time.c \
116   socks.c \
117   speedup.c speedup.h
118
119 libgnunetutil_la_LIBADD = \
120   $(GCLIBADD) $(WINLIB) \
121   $(LIBGCRYPT_LIBS) \
122   $(LTLIBICONV) \
123   $(LTLIBINTL) \
124   -lltdl $(Z_LIBS) -lunistring $(XLIB)
125
126 libgnunetutil_la_LDFLAGS = \
127   $(GN_LIB_LDFLAGS) \
128   -version-info 13:0:0
129
130
131 libgnunetutil_taler_wallet_la_SOURCES = \
132   common_allocation.c \
133   common_endian.c \
134   common_logging.c \
135   container_heap.c \
136   container_multihashmap.c \
137   container_multihashmap32.c \
138   crypto_symmetric.c \
139   crypto_crc.c \
140   crypto_ecc.c \
141   crypto_hash.c \
142   crypto_hkdf.c \
143   crypto_kdf.c \
144   crypto_mpi.c \
145   crypto_random.c \
146   crypto_rsa.c \
147   strings.c \
148   time.c
149
150 libgnunetutil_taler_wallet_la_LIBADD = \
151   $(LIBGCRYPT_LIBS) \
152   -lunistring
153
154 libgnunetutil_taler_wallet_la_LDFLAGS = \
155   $(GN_LIB_LDFLAGS) \
156   -version-info 0:0:0
157
158 if HAVE_TESTING
159   GNUNET_ECC = gnunet-ecc
160   GNUNET_SCRYPT = gnunet-scrypt
161 endif
162
163 if TALER_ONLY
164 lib_LTLIBRARIES = libgnunetutil_taler_wallet.la
165 else
166 lib_LTLIBRARIES = libgnunetutil.la
167
168 libexec_PROGRAMS = \
169  gnunet-service-resolver \
170  $(W32CONSOLEHELPER)
171
172 bin_SCRIPTS =\
173  gnunet-qr
174
175 bin_PROGRAMS = \
176  gnunet-resolver \
177  gnunet-config \
178  $(GNUNET_ECC) \
179  $(GNUNET_SCRYPT) \
180  gnunet-uri
181
182 noinst_PROGRAMS = \
183  gnunet-config-diff \
184  $(W32CAT) \
185  test_common_logging_dummy
186
187
188 if ENABLE_TEST_RUN
189 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
190 TESTS = $(check_PROGRAMS)
191 endif
192
193 endif
194
195
196 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
197
198 gnunet-qr: gnunet-qr.py.in Makefile
199         $(do_subst) < gnunet-qr.py.in > gnunet-qr
200         chmod +x gnunet-qr
201
202 gnunet_service_resolver_SOURCES = \
203  gnunet-service-resolver.c
204 gnunet_service_resolver_LDADD = \
205   libgnunetutil.la \
206   $(GN_LIBINTL)
207
208
209 gnunet_resolver_SOURCES = \
210  gnunet-resolver.c
211 gnunet_resolver_LDADD = \
212   libgnunetutil.la \
213   $(GN_LIBINTL)
214
215
216 gnunet_ecc_SOURCES = \
217  gnunet-ecc.c
218 gnunet_ecc_LDADD = \
219   libgnunetutil.la \
220   $(GN_LIBINTL) -lgcrypt
221
222 gnunet_scrypt_SOURCES = \
223  gnunet-scrypt.c
224 gnunet_scrypt_LDADD = \
225   libgnunetutil.la \
226   $(GN_LIBINTL) -lgcrypt
227
228
229 gnunet_config_SOURCES = \
230  gnunet-config.c
231 gnunet_config_LDADD = \
232   libgnunetutil.la \
233   $(GN_LIBINTL)
234
235
236 gnunet_uri_SOURCES = \
237  gnunet-uri.c
238 gnunet_uri_LDADD = \
239   libgnunetutil.la \
240   $(GN_LIBINTL)
241
242 plugin_LTLIBRARIES = \
243   libgnunet_plugin_test.la
244
245 libgnunet_plugin_test_la_SOURCES = \
246   test_plugin_plug.c
247 libgnunet_plugin_test_la_LDFLAGS = \
248  $(GN_PLUGIN_LDFLAGS)
249
250 if HAVE_BENCHMARKS
251  BENCHMARKS = \
252   perf_crypto_hash \
253   perf_crypto_ecc_dlog \
254   perf_crypto_rsa \
255   perf_crypto_paillier \
256   perf_crypto_symmetric \
257   perf_crypto_asymmetric \
258   perf_malloc
259 endif
260
261 if HAVE_SSH_KEY
262  SSH_USING_TESTS = test_socks.nc
263 endif
264
265 check_PROGRAMS = \
266  test_bio \
267  test_client.nc \
268  test_client_unix.nc \
269  $(SSH_USING_TESTS) \
270  test_common_allocation \
271  test_common_endian \
272  test_common_logging \
273  test_configuration \
274  test_container_bloomfilter \
275  test_container_meta_data \
276  test_container_multihashmap \
277  test_container_multihashmap32 \
278  test_container_multipeermap \
279  test_container_heap \
280  test_crypto_symmetric \
281  test_crypto_crc \
282  test_crypto_ecdsa \
283  test_crypto_eddsa \
284  test_crypto_ecdhe \
285  test_crypto_ecdh_eddsa \
286  test_crypto_ecc_dlog \
287  test_crypto_hash \
288  test_crypto_hash_context \
289  test_crypto_hkdf \
290  test_crypto_kdf \
291  test_crypto_paillier \
292  test_crypto_random \
293  test_crypto_rsa \
294  test_disk \
295  test_getopt \
296  test_connection.nc \
297  test_connection_addressing.nc \
298  test_connection_receive_cancel.nc \
299  test_connection_timeout.nc \
300  test_connection_timeout_no_connect.nc \
301  test_connection_transmit_cancel.nc \
302  test_mq \
303  test_os_network \
304  test_peer \
305  test_plugin \
306  test_program \
307  test_resolver_api.nc \
308  test_scheduler \
309  test_scheduler_delay \
310  test_server.nc \
311  test_server_disconnect.nc \
312  test_server_with_client.nc \
313  test_server_mst_interrupt.nc \
314  $(SERVER_CLIENT_UNIX) \
315  test_service \
316  test_strings \
317  test_strings_to_data \
318  test_time \
319  test_speedup \
320  $(BENCHMARKS) \
321  test_os_start_process \
322  test_common_logging_runtime_loglevels
323
324
325 # Declare .nc (NO-CONCURRENCY) as a test extension so that we can impart
326 # sequential execution order for them
327 TEST_EXTENSIONS = .nc
328 test_connection.log: test_client.log 
329 test_connection_addressing.log: test_connection.log
330 test_connection_timeout_no_connect.log: test_connection_addressing.log
331 test_connection_transmit_cancel.log: test_connection_timeout_no_connect.log
332 test_connection_receive_cancel.log: test_connection_transmit_cancel.log
333 test_connection_timeout.log: test_connection_receive_cancel.log
334 test_resolver_api.log: test_connection_timeout.log 
335 test_server.log: test_resolver_api.log
336 test_server_disconnect.log: test_server.log
337 test_server_with_client.log: test_server_disconnect.log
338 test_server_mst_interrupt.log: test_server_with_client.log
339 test_client_unix.log: test_server_mst_interrupt.log
340
341 test_bio_SOURCES = \
342  test_bio.c
343 test_bio_LDADD = \
344  libgnunetutil.la
345
346
347 test_os_start_process_SOURCES = \
348  test_os_start_process.c
349 test_os_start_process_LDADD = \
350  libgnunetutil.la
351 test_os_start_process_DEPENDENCIES = \
352  libgnunetutil.la \
353  $(WINCAT)
354
355 test_client_nc_SOURCES = \
356  test_client.c
357 test_client_nc_LDADD = \
358  libgnunetutil.la
359
360 test_client_unix_nc_SOURCES = \
361  test_client.c
362 test_client_unix_nc_LDADD = \
363  libgnunetutil.la
364
365 test_socks_nc_SOURCES = \
366  test_socks.c
367 test_socks_nc_LDADD = \
368  libgnunetutil.la
369
370 test_common_allocation_SOURCES = \
371  test_common_allocation.c
372 test_common_allocation_LDADD = \
373  libgnunetutil.la
374
375 test_common_endian_SOURCES = \
376  test_common_endian.c
377 test_common_endian_LDADD = \
378  libgnunetutil.la
379
380 test_common_logging_SOURCES = \
381  test_common_logging.c
382 test_common_logging_LDADD = \
383  libgnunetutil.la
384
385 test_common_logging_runtime_loglevels_SOURCES = \
386  test_common_logging_runtime_loglevels.c
387 test_common_logging_runtime_loglevels_LDADD = \
388  libgnunetutil.la
389
390 test_configuration_SOURCES = \
391  test_configuration.c
392 test_configuration_LDADD = \
393  libgnunetutil.la
394
395 test_container_bloomfilter_SOURCES = \
396  test_container_bloomfilter.c
397 test_container_bloomfilter_LDADD = \
398  libgnunetutil.la
399
400 test_container_meta_data_SOURCES = \
401  test_container_meta_data.c
402 test_container_meta_data_LDADD = \
403  libgnunetutil.la -lextractor
404
405 test_container_multihashmap_SOURCES = \
406  test_container_multihashmap.c
407 test_container_multihashmap_LDADD = \
408  libgnunetutil.la
409
410 test_container_multihashmap32_SOURCES = \
411  test_container_multihashmap32.c
412 test_container_multihashmap32_LDADD = \
413  libgnunetutil.la
414
415 test_container_multipeermap_SOURCES = \
416  test_container_multipeermap.c
417 test_container_multipeermap_LDADD = \
418  libgnunetutil.la
419
420 test_container_heap_SOURCES = \
421  test_container_heap.c
422 test_container_heap_LDADD = \
423  libgnunetutil.la
424
425 test_crypto_symmetric_SOURCES = \
426  test_crypto_symmetric.c
427 test_crypto_symmetric_LDADD = \
428  libgnunetutil.la
429
430 test_crypto_crc_SOURCES = \
431  test_crypto_crc.c
432 test_crypto_crc_LDADD = \
433  libgnunetutil.la
434
435 test_crypto_ecdsa_SOURCES = \
436  test_crypto_ecdsa.c
437 test_crypto_ecdsa_LDADD = \
438  libgnunetutil.la \
439  $(LIBGCRYPT_LIBS)
440
441 test_crypto_eddsa_SOURCES = \
442  test_crypto_eddsa.c
443 test_crypto_eddsa_LDADD = \
444  libgnunetutil.la \
445  $(LIBGCRYPT_LIBS)
446
447 test_crypto_ecc_dlog_SOURCES = \
448  test_crypto_ecc_dlog.c
449 test_crypto_ecc_dlog_LDADD = \
450  libgnunetutil.la \
451  $(LIBGCRYPT_LIBS)
452
453 test_crypto_ecdhe_SOURCES = \
454  test_crypto_ecdhe.c
455 test_crypto_ecdhe_LDADD = \
456  libgnunetutil.la \
457  $(LIBGCRYPT_LIBS)
458
459 test_crypto_ecdh_eddsa_SOURCES = \
460  test_crypto_ecdh_eddsa.c
461 test_crypto_ecdh_eddsa_LDADD = \
462  libgnunetutil.la \
463  $(LIBGCRYPT_LIBS)
464
465 test_crypto_hash_SOURCES = \
466  test_crypto_hash.c
467 test_crypto_hash_LDADD = \
468  libgnunetutil.la
469
470 test_crypto_hash_context_SOURCES = \
471  test_crypto_hash_context.c
472 test_crypto_hash_context_LDADD = \
473  libgnunetutil.la
474
475 test_crypto_hkdf_SOURCES = \
476  test_crypto_hkdf.c
477 test_crypto_hkdf_LDADD = \
478  libgnunetutil.la
479
480 test_crypto_kdf_SOURCES = \
481  test_crypto_kdf.c
482 test_crypto_kdf_LDADD = \
483  libgnunetutil.la -lgcrypt
484
485 test_crypto_paillier_SOURCES = \
486  test_crypto_paillier.c
487 test_crypto_paillier_LDADD = \
488  $(LIBGCRYPT_LIBS) \
489  libgnunetutil.la
490
491 test_crypto_random_SOURCES = \
492  test_crypto_random.c
493 test_crypto_random_LDADD = \
494  libgnunetutil.la
495
496 test_crypto_rsa_SOURCES = \
497  test_crypto_rsa.c
498 test_crypto_rsa_LDADD = \
499  libgnunetutil.la -lgcrypt
500
501 test_disk_SOURCES = \
502  test_disk.c
503 test_disk_LDADD = \
504  libgnunetutil.la
505
506 test_getopt_SOURCES = \
507  test_getopt.c
508 test_getopt_LDADD = \
509  libgnunetutil.la
510
511 test_connection_nc_SOURCES = \
512  test_connection.c
513 test_connection_nc_LDADD = \
514  libgnunetutil.la
515
516 test_connection_addressing_nc_SOURCES = \
517  test_connection_addressing.c
518 test_connection_addressing_nc_LDADD = \
519  libgnunetutil.la
520
521 test_connection_receive_cancel_nc_SOURCES = \
522  test_connection_receive_cancel.c
523 test_connection_receive_cancel_nc_LDADD = \
524  libgnunetutil.la
525
526 test_connection_timeout_nc_SOURCES = \
527  test_connection_timeout.c
528 test_connection_timeout_nc_LDADD = \
529  libgnunetutil.la
530
531 test_connection_timeout_no_connect_nc_SOURCES = \
532  test_connection_timeout_no_connect.c
533 test_connection_timeout_no_connect_nc_LDADD = \
534  libgnunetutil.la
535
536 test_connection_transmit_cancel_nc_SOURCES = \
537  test_connection_transmit_cancel.c
538 test_connection_transmit_cancel_nc_LDADD = \
539  libgnunetutil.la
540
541 test_mq_SOURCES = \
542  test_mq.c
543 test_mq_LDADD = \
544  libgnunetutil.la
545
546 test_os_network_SOURCES = \
547  test_os_network.c
548 test_os_network_LDADD = \
549  libgnunetutil.la
550
551 test_peer_SOURCES = \
552  test_peer.c
553 test_peer_LDADD = \
554  libgnunetutil.la -lgcrypt
555
556 test_plugin_SOURCES = \
557  test_plugin.c
558 test_plugin_LDADD = \
559  libgnunetutil.la
560
561 test_program_SOURCES = \
562  test_program.c
563 test_program_LDADD = \
564  libgnunetutil.la
565
566 test_resolver_api_nc_SOURCES = \
567  test_resolver_api.c
568 test_resolver_api_nc_LDADD = \
569  libgnunetutil.la
570
571 test_scheduler_SOURCES = \
572  test_scheduler.c
573 test_scheduler_LDADD = \
574  libgnunetutil.la
575
576 test_scheduler_delay_SOURCES = \
577  test_scheduler_delay.c
578 test_scheduler_delay_LDADD = \
579  libgnunetutil.la
580
581 test_server_mst_interrupt_nc_SOURCES = \
582  test_server_mst_interrupt.c
583 test_server_mst_interrupt_nc_LDADD = \
584  libgnunetutil.la
585
586 test_server_nc_SOURCES = \
587  test_server.c
588 test_server_nc_LDADD = \
589  libgnunetutil.la
590
591 test_server_disconnect_nc_SOURCES = \
592  test_server_disconnect.c
593 test_server_disconnect_nc_LDADD = \
594  libgnunetutil.la
595
596 test_server_with_client_nc_SOURCES = \
597  test_server_with_client.c
598 test_server_with_client_nc_LDADD = \
599  libgnunetutil.la
600
601 test_server_with_client_unix_SOURCES = \
602  test_server_with_client_unix.c
603 test_server_with_client_unix_LDADD = \
604  libgnunetutil.la
605
606
607 test_service_SOURCES = \
608  test_service.c
609 test_service_LDADD = \
610  libgnunetutil.la
611
612 test_strings_SOURCES = \
613  test_strings.c
614 test_strings_LDADD = \
615  libgnunetutil.la
616
617
618 test_strings_to_data_SOURCES = \
619  test_strings_to_data.c
620 test_strings_to_data_LDADD = \
621  libgnunetutil.la
622
623
624 test_time_SOURCES = \
625  test_time.c
626 test_time_LDADD = \
627  libgnunetutil.la
628
629 test_speedup_SOURCES = \
630  test_speedup.c
631 test_speedup_LDADD = \
632  libgnunetutil.la
633
634 perf_crypto_hash_SOURCES = \
635  perf_crypto_hash.c
636 perf_crypto_hash_LDADD = \
637  libgnunetutil.la
638
639 perf_crypto_ecc_dlog_SOURCES = \
640  perf_crypto_ecc_dlog.c
641 perf_crypto_ecc_dlog_LDADD = \
642  libgnunetutil.la \
643  -lgcrypt
644
645 perf_crypto_rsa_SOURCES = \
646  perf_crypto_rsa.c
647 perf_crypto_rsa_LDADD = \
648  libgnunetutil.la
649
650 perf_crypto_symmetric_SOURCES = \
651  perf_crypto_symmetric.c
652 perf_crypto_symmetric_LDADD = \
653  libgnunetutil.la
654
655 perf_crypto_asymmetric_SOURCES = \
656  perf_crypto_asymmetric.c
657 perf_crypto_asymmetric_LDADD = \
658  libgnunetutil.la
659
660 perf_crypto_paillier_SOURCES = \
661  perf_crypto_paillier.c
662 perf_crypto_paillier_LDADD = \
663  libgnunetutil.la \
664  -lgcrypt
665
666 perf_malloc_SOURCES = \
667  perf_malloc.c
668 perf_malloc_LDADD = \
669  libgnunetutil.la
670
671
672 EXTRA_DIST = \
673   test_client_data.conf \
674   test_client_unix.conf \
675   test_configuration_data.conf \
676   test_program_data.conf \
677   test_resolver_api_data.conf \
678   test_service_data.conf \
679   test_speedup_data.conf \
680   gnunet-qr.py.in