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