- refactor kx sending, unify under send_kx
[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 noinst_PROGRAMS = \
50  gnunet-config-diff \
51  $(W32CAT) \
52  test_common_logging_dummy
53
54
55 gnunet_config_diff_SOURCES = \
56  gnunet-config-diff.c
57 gnunet_config_diff_LDADD = \
58  libgnunetutil.la
59
60 test_common_logging_dummy_SOURCES = \
61  test_common_logging_dummy.c
62 test_common_logging_dummy_LDADD = \
63  libgnunetutil.la
64
65 lib_LTLIBRARIES = libgnunetutil.la
66
67 libgnunetutil_la_SOURCES = \
68   bandwidth.c \
69   bio.c \
70   client.c \
71   client_manager.c \
72   common_allocation.c \
73   common_endian.c \
74   common_logging.c \
75   configuration.c \
76   connection.c \
77   container_bloomfilter.c \
78   container_heap.c \
79   container_meta_data.c \
80   container_multihashmap.c \
81   container_multipeermap.c \
82   container_multihashmap32.c \
83   crypto_symmetric.c \
84   crypto_crc.c \
85   crypto_ecc.c \
86   crypto_hash.c \
87   crypto_hkdf.c \
88   crypto_kdf.c \
89   crypto_mpi.c \
90   crypto_paillier.c \
91   crypto_random.c \
92   crypto_rsa.c \
93   disk.c \
94   disk.h \
95   getopt.c \
96   getopt_helpers.c \
97   helper.c \
98   load.c \
99   mq.c \
100   network.c \
101   os_installation.c \
102   os_network.c \
103   os_priority.c \
104   peer.c \
105   plugin.c \
106   program.c \
107   resolver_api.c resolver.h \
108   scheduler.c \
109   server.c \
110   server_mst.c \
111   server_nc.c \
112   server_tc.c \
113   service.c \
114   signal.c \
115   strings.c \
116   time.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 if HAVE_TESTING
131   GNUNET_ECC = gnunet-ecc
132   GNUNET_SCRYPT = gnunet-scrypt
133 endif
134
135
136 libexec_PROGRAMS = \
137  gnunet-service-resolver \
138  $(W32CONSOLEHELPER)
139
140 bin_SCRIPTS =\
141  gnunet-qr
142
143 bin_PROGRAMS = \
144  gnunet-resolver \
145  gnunet-config \
146  $(GNUNET_ECC) \
147  $(GNUNET_SCRYPT) \
148  gnunet-uri
149
150 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
151
152 gnunet-qr: gnunet-qr.py.in Makefile
153         $(do_subst) < gnunet-qr.py.in > gnunet-qr
154         chmod +x gnunet-qr
155
156 gnunet_service_resolver_SOURCES = \
157  gnunet-service-resolver.c
158 gnunet_service_resolver_LDADD = \
159   libgnunetutil.la \
160   $(GN_LIBINTL)
161
162
163 gnunet_resolver_SOURCES = \
164  gnunet-resolver.c
165 gnunet_resolver_LDADD = \
166   libgnunetutil.la \
167   $(GN_LIBINTL)
168
169
170 gnunet_ecc_SOURCES = \
171  gnunet-ecc.c
172 gnunet_ecc_LDADD = \
173   libgnunetutil.la \
174   $(GN_LIBINTL) -lgcrypt
175
176 gnunet_scrypt_SOURCES = \
177  gnunet-scrypt.c
178 gnunet_scrypt_LDADD = \
179   libgnunetutil.la \
180   $(GN_LIBINTL) -lgcrypt
181
182
183 gnunet_config_SOURCES = \
184  gnunet-config.c
185 gnunet_config_LDADD = \
186   libgnunetutil.la \
187   $(GN_LIBINTL)
188
189
190 gnunet_uri_SOURCES = \
191  gnunet-uri.c
192 gnunet_uri_LDADD = \
193   libgnunetutil.la \
194   $(GN_LIBINTL)
195
196 plugin_LTLIBRARIES = \
197   libgnunet_plugin_test.la
198
199 libgnunet_plugin_test_la_SOURCES = \
200   test_plugin_plug.c
201 libgnunet_plugin_test_la_LDFLAGS = \
202  $(GN_PLUGIN_LDFLAGS)
203
204 if HAVE_BENCHMARKS
205  BENCHMARKS = \
206   perf_crypto_hash \
207   perf_crypto_paillier \
208   perf_crypto_symmetric \
209   perf_crypto_asymmetric \
210   perf_malloc
211 endif
212
213 check_PROGRAMS = \
214  test_bio \
215  test_client.nc \
216  test_common_allocation \
217  test_common_endian \
218  test_common_logging \
219  test_configuration \
220  test_container_bloomfilter \
221  test_container_meta_data \
222  test_container_multihashmap \
223  test_container_multihashmap32 \
224  test_container_multipeermap \
225  test_container_heap \
226  test_crypto_symmetric \
227  test_crypto_crc \
228  test_crypto_ecdsa \
229  test_crypto_eddsa \
230  test_crypto_ecdhe \
231  test_crypto_ecdh_ecdsa \
232  test_crypto_hash \
233  test_crypto_hash_context \
234  test_crypto_hkdf \
235  test_crypto_paillier \
236  test_crypto_random \
237  test_crypto_rsa \
238  test_disk \
239  test_getopt \
240  test_connection.nc \
241  test_connection_addressing.nc \
242  test_connection_receive_cancel.nc \
243  test_connection_timeout.nc \
244  test_connection_timeout_no_connect.nc \
245  test_connection_transmit_cancel.nc \
246  test_mq \
247  test_mq_client.nc \
248  test_os_network \
249  test_peer \
250  test_plugin \
251  test_program \
252  test_resolver_api.nc \
253  test_scheduler \
254  test_scheduler_delay \
255  test_server.nc \
256  test_server_disconnect.nc \
257  test_server_with_client.nc \
258  test_server_mst_interrupt.nc \
259  $(SERVER_CLIENT_UNIX) \
260  test_service \
261  test_strings \
262  test_strings_to_data \
263  test_time \
264  test_speedup \
265  $(BENCHMARKS) \
266  test_os_start_process \
267  test_common_logging_runtime_loglevels
268
269 if ENABLE_TEST_RUN
270 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
271 TESTS = $(check_PROGRAMS)
272 endif
273
274 # Declare .nc (NO-CONCURRENCY) as a test extension so that we can impart
275 # sequential execution order for them
276 TEST_EXTENSIONS = .nc
277 test_connection.log: test_client.log
278 test_connection_addressing.log: test_connection.log
279 test_connection_timeout_no_connect.log: test_connection_addressing.log
280 test_connection_transmit_cancel.log: test_connection_timeout_no_connect.log
281 test_connection_receive_cancel.log: test_connection_transmit_cancel.log
282 test_connection_timeout.log: test_connection_receive_cancel.log
283 test_mq_client.log: test_connection_timeout.log
284 test_resolver_api.log: test_mq_client.log
285 test_server.log: test_resolver_api.log
286 test_server_disconnect.log: test_server.log
287 test_server_with_client.log: test_server_disconnect.log
288 test_server_mst_interrupt.log: test_server_with_client.log
289
290 test_bio_SOURCES = \
291  test_bio.c
292 test_bio_LDADD = \
293  libgnunetutil.la
294
295
296 test_os_start_process_SOURCES = \
297  test_os_start_process.c
298 test_os_start_process_LDADD = \
299  libgnunetutil.la
300 test_os_start_process_DEPENDENCIES = \
301  libgnunetutil.la \
302  $(WINCAT)
303
304 test_client_nc_SOURCES = \
305  test_client.c
306 test_client_nc_LDADD = \
307  libgnunetutil.la
308
309 test_common_allocation_SOURCES = \
310  test_common_allocation.c
311 test_common_allocation_LDADD = \
312  libgnunetutil.la
313
314 test_common_endian_SOURCES = \
315  test_common_endian.c
316 test_common_endian_LDADD = \
317  libgnunetutil.la
318
319 test_common_logging_SOURCES = \
320  test_common_logging.c
321 test_common_logging_LDADD = \
322  libgnunetutil.la
323
324 test_common_logging_runtime_loglevels_SOURCES = \
325  test_common_logging_runtime_loglevels.c
326 test_common_logging_runtime_loglevels_LDADD = \
327  libgnunetutil.la
328
329 test_configuration_SOURCES = \
330  test_configuration.c
331 test_configuration_LDADD = \
332  libgnunetutil.la
333
334 test_container_bloomfilter_SOURCES = \
335  test_container_bloomfilter.c
336 test_container_bloomfilter_LDADD = \
337  libgnunetutil.la
338
339 test_container_meta_data_SOURCES = \
340  test_container_meta_data.c
341 test_container_meta_data_LDADD = \
342  libgnunetutil.la -lextractor
343
344 test_container_multihashmap_SOURCES = \
345  test_container_multihashmap.c
346 test_container_multihashmap_LDADD = \
347  libgnunetutil.la
348
349 test_container_multihashmap32_SOURCES = \
350  test_container_multihashmap32.c
351 test_container_multihashmap32_LDADD = \
352  libgnunetutil.la
353
354 test_container_multipeermap_SOURCES = \
355  test_container_multipeermap.c
356 test_container_multipeermap_LDADD = \
357  libgnunetutil.la
358
359 test_container_heap_SOURCES = \
360  test_container_heap.c
361 test_container_heap_LDADD = \
362  libgnunetutil.la
363
364 test_crypto_symmetric_SOURCES = \
365  test_crypto_symmetric.c
366 test_crypto_symmetric_LDADD = \
367  libgnunetutil.la
368
369 test_crypto_crc_SOURCES = \
370  test_crypto_crc.c
371 test_crypto_crc_LDADD = \
372  libgnunetutil.la
373
374 test_crypto_ecdsa_SOURCES = \
375  test_crypto_ecdsa.c
376 test_crypto_ecdsa_LDADD = \
377  libgnunetutil.la \
378  $(LIBGCRYPT_LIBS)
379
380 test_crypto_eddsa_SOURCES = \
381  test_crypto_eddsa.c
382 test_crypto_eddsa_LDADD = \
383  libgnunetutil.la \
384  $(LIBGCRYPT_LIBS)
385
386 test_crypto_ecdhe_SOURCES = \
387  test_crypto_ecdhe.c
388 test_crypto_ecdhe_LDADD = \
389  libgnunetutil.la \
390  $(LIBGCRYPT_LIBS)
391
392 test_crypto_ecdh_ecdsa_SOURCES = \
393  test_crypto_ecdh_ecdsa.c
394 test_crypto_ecdh_ecdsa_LDADD = \
395  libgnunetutil.la \
396  $(LIBGCRYPT_LIBS)
397
398 test_crypto_hash_SOURCES = \
399  test_crypto_hash.c
400 test_crypto_hash_LDADD = \
401  libgnunetutil.la
402
403 test_crypto_hash_context_SOURCES = \
404  test_crypto_hash_context.c
405 test_crypto_hash_context_LDADD = \
406  libgnunetutil.la
407
408 test_crypto_hkdf_SOURCES = \
409  test_crypto_hkdf.c
410 test_crypto_hkdf_LDADD = \
411  libgnunetutil.la
412
413 test_crypto_paillier_SOURCES = \
414  test_crypto_paillier.c
415 test_crypto_paillier_LDADD = \
416  $(LIBGCRYPT_LIBS) \
417  libgnunetutil.la
418
419 test_crypto_random_SOURCES = \
420  test_crypto_random.c
421 test_crypto_random_LDADD = \
422  libgnunetutil.la
423
424 test_crypto_rsa_SOURCES = \
425  test_crypto_rsa.c
426 test_crypto_rsa_LDADD = \
427  libgnunetutil.la
428
429 test_disk_SOURCES = \
430  test_disk.c
431 test_disk_LDADD = \
432  libgnunetutil.la
433
434 test_getopt_SOURCES = \
435  test_getopt.c
436 test_getopt_LDADD = \
437  libgnunetutil.la
438
439 test_connection_nc_SOURCES = \
440  test_connection.c
441 test_connection_nc_LDADD = \
442  libgnunetutil.la
443
444 test_connection_addressing_nc_SOURCES = \
445  test_connection_addressing.c
446 test_connection_addressing_nc_LDADD = \
447  libgnunetutil.la
448
449 test_connection_receive_cancel_nc_SOURCES = \
450  test_connection_receive_cancel.c
451 test_connection_receive_cancel_nc_LDADD = \
452  libgnunetutil.la
453
454 test_connection_timeout_nc_SOURCES = \
455  test_connection_timeout.c
456 test_connection_timeout_nc_LDADD = \
457  libgnunetutil.la
458
459 test_connection_timeout_no_connect_nc_SOURCES = \
460  test_connection_timeout_no_connect.c
461 test_connection_timeout_no_connect_nc_LDADD = \
462  libgnunetutil.la
463
464 test_connection_transmit_cancel_nc_SOURCES = \
465  test_connection_transmit_cancel.c
466 test_connection_transmit_cancel_nc_LDADD = \
467  libgnunetutil.la
468
469 test_mq_SOURCES = \
470  test_mq.c
471 test_mq_LDADD = \
472  libgnunetutil.la
473
474 test_mq_client_nc_SOURCES = \
475  test_mq_client.c
476 test_mq_client_nc_LDADD = \
477  libgnunetutil.la
478
479 test_os_network_SOURCES = \
480  test_os_network.c
481 test_os_network_LDADD = \
482  libgnunetutil.la
483
484 test_peer_SOURCES = \
485  test_peer.c
486 test_peer_LDADD = \
487  libgnunetutil.la -lgcrypt
488
489 test_plugin_SOURCES = \
490  test_plugin.c
491 test_plugin_LDADD = \
492  libgnunetutil.la
493
494 test_program_SOURCES = \
495  test_program.c
496 test_program_LDADD = \
497  libgnunetutil.la
498
499 test_resolver_api_nc_SOURCES = \
500  test_resolver_api.c
501 test_resolver_api_nc_LDADD = \
502  libgnunetutil.la
503
504 test_scheduler_SOURCES = \
505  test_scheduler.c
506 test_scheduler_LDADD = \
507  libgnunetutil.la
508
509 test_scheduler_delay_SOURCES = \
510  test_scheduler_delay.c
511 test_scheduler_delay_LDADD = \
512  libgnunetutil.la
513
514 test_server_mst_interrupt_nc_SOURCES = \
515  test_server_mst_interrupt.c
516 test_server_mst_interrupt_nc_LDADD = \
517  libgnunetutil.la
518
519 test_server_nc_SOURCES = \
520  test_server.c
521 test_server_nc_LDADD = \
522  libgnunetutil.la
523
524 test_server_disconnect_nc_SOURCES = \
525  test_server_disconnect.c
526 test_server_disconnect_nc_LDADD = \
527  libgnunetutil.la
528
529 test_server_with_client_nc_SOURCES = \
530  test_server_with_client.c
531 test_server_with_client_nc_LDADD = \
532  libgnunetutil.la
533
534 test_server_with_client_unix_SOURCES = \
535  test_server_with_client_unix.c
536 test_server_with_client_unix_LDADD = \
537  libgnunetutil.la
538
539
540 test_service_SOURCES = \
541  test_service.c
542 test_service_LDADD = \
543  libgnunetutil.la
544
545 test_strings_SOURCES = \
546  test_strings.c
547 test_strings_LDADD = \
548  libgnunetutil.la
549
550
551 test_strings_to_data_SOURCES = \
552  test_strings_to_data.c
553 test_strings_to_data_LDADD = \
554  libgnunetutil.la
555
556
557 test_time_SOURCES = \
558  test_time.c
559 test_time_LDADD = \
560  libgnunetutil.la
561
562 test_speedup_SOURCES = \
563  test_speedup.c
564 test_speedup_LDADD = \
565  libgnunetutil.la
566
567 perf_crypto_hash_SOURCES = \
568  perf_crypto_hash.c
569 perf_crypto_hash_LDADD = \
570  libgnunetutil.la
571
572 perf_crypto_symmetric_SOURCES = \
573  perf_crypto_symmetric.c
574 perf_crypto_symmetric_LDADD = \
575  libgnunetutil.la
576
577 perf_crypto_asymmetric_SOURCES = \
578  perf_crypto_asymmetric.c
579 perf_crypto_asymmetric_LDADD = \
580  libgnunetutil.la
581
582 perf_crypto_paillier_SOURCES = \
583  perf_crypto_paillier.c
584 perf_crypto_paillier_LDADD = \
585  libgnunetutil.la \
586  -lgcrypt
587
588 perf_malloc_SOURCES = \
589  perf_malloc.c
590 perf_malloc_LDADD = \
591  libgnunetutil.la
592
593
594 EXTRA_DIST = \
595   test_configuration_data.conf \
596   test_program_data.conf \
597   test_resolver_api_data.conf \
598   test_service_data.conf \
599   test_speedup_data.conf \
600   gnunet-qr.py.in