added logging
[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  TEST_CLIENT_UNIX_NC = test_client_unix.nc
34 else
35  TEST_CLIENT_UNIX_NC =
36 endif
37
38 if USE_COVERAGE
39   AM_CFLAGS = --coverage -O0
40   XLIB = -lgcov
41 endif
42
43 w32cat_SOURCES = w32cat.c
44
45 gnunet_helper_w32_console_SOURCES = \
46   gnunet-helper-w32-console.c \
47   gnunet-helper-w32-console.h
48 gnunet_helper_w32_console_LDADD = \
49   libgnunetutil.la
50
51 gnunet_config_diff_SOURCES = \
52  gnunet-config-diff.c
53 gnunet_config_diff_LDADD = \
54  libgnunetutil.la
55
56 test_common_logging_dummy_SOURCES = \
57  test_common_logging_dummy.c
58 test_common_logging_dummy_LDADD = \
59  libgnunetutil.la
60
61 libgnunetutil_la_SOURCES = \
62   bandwidth.c \
63   bio.c \
64   client.c \
65   common_allocation.c \
66   common_endian.c \
67   common_logging.c \
68   configuration.c \
69   configuration_loader.c \
70   container_bloomfilter.c \
71   container_heap.c \
72   container_meta_data.c \
73   container_multihashmap.c \
74   container_multishortmap.c \
75   container_multipeermap.c \
76   container_multihashmap32.c \
77   crypto_symmetric.c \
78   crypto_crc.c \
79   crypto_ecc.c \
80   crypto_ecc_dlog.c \
81   crypto_ecc_setup.c \
82   crypto_hash.c \
83   crypto_hash_file.c \
84   crypto_hkdf.c \
85   crypto_kdf.c \
86   crypto_mpi.c \
87   crypto_paillier.c \
88   crypto_random.c \
89   crypto_rsa.c \
90   disk.c \
91   disk.h \
92   getopt.c \
93   getopt_helpers.c \
94   helper.c \
95   load.c \
96   mst.c \
97   mq.c \
98   nc.c \
99   network.c \
100   op.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   service.c \
110   signal.c \
111   strings.c \
112   time.c \
113   speedup.c speedup.h
114
115 libgnunetutil_la_LIBADD = \
116   $(GCLIBADD) $(WINLIB) \
117   $(LIBGCRYPT_LIBS) \
118   $(LTLIBICONV) \
119   $(LTLIBINTL) \
120   -lltdl $(Z_LIBS) -lunistring $(XLIB)
121
122 libgnunetutil_la_LDFLAGS = \
123   $(GN_LIB_LDFLAGS) \
124   -version-info 13:0:0
125
126
127 libgnunetutil_taler_wallet_la_SOURCES = \
128   common_allocation.c \
129   common_endian.c \
130   common_logging.c \
131   container_heap.c \
132   container_multihashmap.c \
133   container_multihashmap32.c \
134   crypto_symmetric.c \
135   crypto_crc.c \
136   crypto_ecc.c \
137   crypto_hash.c \
138   crypto_hkdf.c \
139   crypto_kdf.c \
140   crypto_mpi.c \
141   crypto_random.c \
142   crypto_rsa.c \
143   strings.c \
144   time.c
145
146 libgnunetutil_taler_wallet_la_LIBADD = \
147   $(LIBGCRYPT_LIBS) \
148   -lunistring
149
150 libgnunetutil_taler_wallet_la_LDFLAGS = \
151   $(GN_LIB_LDFLAGS) \
152   -version-info 0:0:0
153
154 if HAVE_TESTING
155   GNUNET_ECC = gnunet-ecc
156   GNUNET_SCRYPT = gnunet-scrypt
157 endif
158
159 if TALER_ONLY
160 lib_LTLIBRARIES = libgnunetutil_taler_wallet.la
161 else
162 lib_LTLIBRARIES = libgnunetutil.la
163
164 libexec_PROGRAMS = \
165  gnunet-service-resolver \
166  $(W32CONSOLEHELPER)
167
168 bin_SCRIPTS =\
169  gnunet-qr
170
171 bin_PROGRAMS = \
172  gnunet-resolver \
173  gnunet-config \
174  $(GNUNET_ECC) \
175  $(GNUNET_SCRYPT) \
176  gnunet-uri
177
178 noinst_PROGRAMS = \
179  gnunet-config-diff \
180  $(W32CAT) \
181  test_common_logging_dummy
182
183
184 if ENABLE_TEST_RUN
185 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
186 TESTS = $(check_PROGRAMS)
187 endif
188
189 endif
190
191
192 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
193
194 gnunet-qr: gnunet-qr.py.in Makefile
195         $(do_subst) < $(top_srcdir)/src/util/gnunet-qr.py.in > gnunet-qr
196         chmod +x gnunet-qr
197
198 gnunet_service_resolver_SOURCES = \
199  gnunet-service-resolver.c
200 gnunet_service_resolver_LDADD = \
201   libgnunetutil.la \
202   $(GN_LIBINTL)
203
204
205 gnunet_resolver_SOURCES = \
206  gnunet-resolver.c
207 gnunet_resolver_LDADD = \
208   libgnunetutil.la \
209   $(GN_LIBINTL)
210
211
212 gnunet_ecc_SOURCES = \
213  gnunet-ecc.c
214 gnunet_ecc_LDADD = \
215   libgnunetutil.la \
216   $(GN_LIBINTL) -lgcrypt
217
218 gnunet_scrypt_SOURCES = \
219  gnunet-scrypt.c
220 gnunet_scrypt_LDADD = \
221   libgnunetutil.la \
222   $(GN_LIBINTL) -lgcrypt
223
224
225 gnunet_config_SOURCES = \
226  gnunet-config.c
227 gnunet_config_LDADD = \
228   libgnunetutil.la \
229   $(GN_LIBINTL)
230
231
232 gnunet_uri_SOURCES = \
233  gnunet-uri.c
234 gnunet_uri_LDADD = \
235   libgnunetutil.la \
236   $(GN_LIBINTL)
237
238 plugin_LTLIBRARIES = \
239   libgnunet_plugin_test.la
240
241 libgnunet_plugin_test_la_SOURCES = \
242   test_plugin_plug.c
243 libgnunet_plugin_test_la_LDFLAGS = \
244  $(GN_PLUGIN_LDFLAGS)
245
246 if HAVE_BENCHMARKS
247  BENCHMARKS = \
248   perf_crypto_hash \
249   perf_crypto_ecc_dlog \
250   perf_crypto_rsa \
251   perf_crypto_paillier \
252   perf_crypto_symmetric \
253   perf_crypto_asymmetric \
254   perf_malloc
255 endif
256
257 if HAVE_SSH_KEY
258 # SSH_USING_TESTS = test_socks.nc
259 endif
260
261 check_PROGRAMS = \
262  test_bio \
263  test_client.nc \
264  $(TEST_CLIENT_UNIX_NC) \
265  test_common_allocation \
266  test_common_endian \
267  test_common_logging \
268  test_configuration \
269  test_container_bloomfilter \
270  test_container_dll \
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_mq \
293  test_os_network \
294  test_peer \
295  test_plugin \
296  test_program \
297  test_resolver_api.nc \
298  test_scheduler \
299  test_scheduler_delay \
300  test_service \
301  test_strings \
302  test_strings_to_data \
303  test_time \
304  test_speedup \
305  $(BENCHMARKS) \
306  test_os_start_process \
307  test_common_logging_runtime_loglevels
308
309
310 # Declare .nc (NO-CONCURRENCY) as a test extension so that we can impart
311 # sequential execution order for them
312 TEST_EXTENSIONS = .nc
313 test_test_client_unix.log: test_client.log
314
315 test_bio_SOURCES = \
316  test_bio.c
317 test_bio_LDADD = \
318  libgnunetutil.la
319
320
321 test_os_start_process_SOURCES = \
322  test_os_start_process.c
323 test_os_start_process_LDADD = \
324  libgnunetutil.la
325 test_os_start_process_DEPENDENCIES = \
326  libgnunetutil.la \
327  $(WINCAT)
328
329 test_client_nc_SOURCES = \
330  test_client.c
331 test_client_nc_LDADD = \
332  libgnunetutil.la
333
334 test_client_unix_nc_SOURCES = \
335  test_client.c
336 test_client_unix_nc_LDADD = \
337  libgnunetutil.la
338
339 #test_socks_nc_SOURCES = \
340 # test_socks.c
341 #test_socks_nc_LDADD = \
342 # libgnunetutil.la
343
344 test_common_allocation_SOURCES = \
345  test_common_allocation.c
346 test_common_allocation_LDADD = \
347  libgnunetutil.la
348
349 test_common_endian_SOURCES = \
350  test_common_endian.c
351 test_common_endian_LDADD = \
352  libgnunetutil.la
353
354 test_common_logging_SOURCES = \
355  test_common_logging.c
356 test_common_logging_LDADD = \
357  libgnunetutil.la
358
359 test_common_logging_runtime_loglevels_SOURCES = \
360  test_common_logging_runtime_loglevels.c
361 test_common_logging_runtime_loglevels_LDADD = \
362  libgnunetutil.la
363
364 test_configuration_SOURCES = \
365  test_configuration.c
366 test_configuration_LDADD = \
367  libgnunetutil.la
368
369 test_container_bloomfilter_SOURCES = \
370  test_container_bloomfilter.c
371 test_container_bloomfilter_LDADD = \
372  libgnunetutil.la
373
374 test_container_dll_SOURCES = \
375  test_container_dll.c
376 test_container_dll_LDADD = \
377  libgnunetutil.la
378
379 test_container_meta_data_SOURCES = \
380  test_container_meta_data.c
381 test_container_meta_data_LDADD = \
382  libgnunetutil.la
383
384 test_container_multihashmap_SOURCES = \
385  test_container_multihashmap.c
386 test_container_multihashmap_LDADD = \
387  libgnunetutil.la
388
389 test_container_multihashmap32_SOURCES = \
390  test_container_multihashmap32.c
391 test_container_multihashmap32_LDADD = \
392  libgnunetutil.la
393
394 test_container_multipeermap_SOURCES = \
395  test_container_multipeermap.c
396 test_container_multipeermap_LDADD = \
397  libgnunetutil.la
398
399 test_container_heap_SOURCES = \
400  test_container_heap.c
401 test_container_heap_LDADD = \
402  libgnunetutil.la
403
404 test_crypto_symmetric_SOURCES = \
405  test_crypto_symmetric.c
406 test_crypto_symmetric_LDADD = \
407  libgnunetutil.la
408
409 test_crypto_crc_SOURCES = \
410  test_crypto_crc.c
411 test_crypto_crc_LDADD = \
412  libgnunetutil.la
413
414 test_crypto_ecdsa_SOURCES = \
415  test_crypto_ecdsa.c
416 test_crypto_ecdsa_LDADD = \
417  libgnunetutil.la \
418  $(LIBGCRYPT_LIBS)
419
420 test_crypto_eddsa_SOURCES = \
421  test_crypto_eddsa.c
422 test_crypto_eddsa_LDADD = \
423  libgnunetutil.la \
424  $(LIBGCRYPT_LIBS)
425
426 test_crypto_ecc_dlog_SOURCES = \
427  test_crypto_ecc_dlog.c
428 test_crypto_ecc_dlog_LDADD = \
429  libgnunetutil.la \
430  $(LIBGCRYPT_LIBS)
431
432 test_crypto_ecdhe_SOURCES = \
433  test_crypto_ecdhe.c
434 test_crypto_ecdhe_LDADD = \
435  libgnunetutil.la \
436  $(LIBGCRYPT_LIBS)
437
438 test_crypto_ecdh_eddsa_SOURCES = \
439  test_crypto_ecdh_eddsa.c
440 test_crypto_ecdh_eddsa_LDADD = \
441  libgnunetutil.la \
442  $(LIBGCRYPT_LIBS)
443
444 test_crypto_hash_SOURCES = \
445  test_crypto_hash.c
446 test_crypto_hash_LDADD = \
447  libgnunetutil.la
448
449 test_crypto_hash_context_SOURCES = \
450  test_crypto_hash_context.c
451 test_crypto_hash_context_LDADD = \
452  libgnunetutil.la
453
454 test_crypto_hkdf_SOURCES = \
455  test_crypto_hkdf.c
456 test_crypto_hkdf_LDADD = \
457  libgnunetutil.la
458
459 test_crypto_kdf_SOURCES = \
460  test_crypto_kdf.c
461 test_crypto_kdf_LDADD = \
462  libgnunetutil.la -lgcrypt
463
464 test_crypto_paillier_SOURCES = \
465  test_crypto_paillier.c
466 test_crypto_paillier_LDADD = \
467  $(LIBGCRYPT_LIBS) \
468  libgnunetutil.la
469
470 test_crypto_random_SOURCES = \
471  test_crypto_random.c
472 test_crypto_random_LDADD = \
473  libgnunetutil.la
474
475 test_crypto_rsa_SOURCES = \
476  test_crypto_rsa.c
477 test_crypto_rsa_LDADD = \
478  libgnunetutil.la -lgcrypt
479
480 test_disk_SOURCES = \
481  test_disk.c
482 test_disk_LDADD = \
483  libgnunetutil.la
484
485 test_getopt_SOURCES = \
486  test_getopt.c
487 test_getopt_LDADD = \
488  libgnunetutil.la
489
490 test_mq_SOURCES = \
491  test_mq.c
492 test_mq_LDADD = \
493  libgnunetutil.la
494
495 test_os_network_SOURCES = \
496  test_os_network.c
497 test_os_network_LDADD = \
498  libgnunetutil.la
499
500 test_peer_SOURCES = \
501  test_peer.c
502 test_peer_LDADD = \
503  libgnunetutil.la -lgcrypt
504
505 test_plugin_SOURCES = \
506  test_plugin.c
507 test_plugin_LDADD = \
508  libgnunetutil.la
509
510 test_program_SOURCES = \
511  test_program.c
512 test_program_LDADD = \
513  libgnunetutil.la
514
515 test_resolver_api_nc_SOURCES = \
516  test_resolver_api.c
517 test_resolver_api_nc_LDADD = \
518  libgnunetutil.la
519
520 test_scheduler_SOURCES = \
521  test_scheduler.c
522 test_scheduler_LDADD = \
523  libgnunetutil.la
524
525 test_scheduler_delay_SOURCES = \
526  test_scheduler_delay.c
527 test_scheduler_delay_LDADD = \
528  libgnunetutil.la
529
530 test_service_SOURCES = \
531  test_service.c
532 test_service_LDADD = \
533  libgnunetutil.la
534
535 test_strings_SOURCES = \
536  test_strings.c
537 test_strings_LDADD = \
538  libgnunetutil.la
539
540 test_strings_to_data_SOURCES = \
541  test_strings_to_data.c
542 test_strings_to_data_LDADD = \
543  libgnunetutil.la
544
545
546 test_time_SOURCES = \
547  test_time.c
548 test_time_LDADD = \
549  libgnunetutil.la
550
551 test_speedup_SOURCES = \
552  test_speedup.c
553 test_speedup_LDADD = \
554  libgnunetutil.la
555
556 perf_crypto_hash_SOURCES = \
557  perf_crypto_hash.c
558 perf_crypto_hash_LDADD = \
559  libgnunetutil.la
560
561 perf_crypto_ecc_dlog_SOURCES = \
562  perf_crypto_ecc_dlog.c
563 perf_crypto_ecc_dlog_LDADD = \
564  libgnunetutil.la \
565  -lgcrypt
566
567 perf_crypto_rsa_SOURCES = \
568  perf_crypto_rsa.c
569 perf_crypto_rsa_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_client_data.conf \
596   test_client_unix.conf \
597   test_configuration_data.conf \
598   test_program_data.conf \
599   test_resolver_api_data.conf \
600   test_service_data.conf \
601   test_speedup_data.conf \
602   gnunet-qr.py.in