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