remove argon2 dependency. Use limited libsodium argon2id function for GNS and NSE
[oweals/gnunet.git] / src / util / Makefile.am
index 4296199db419ece8e543d5a098055d96633cb1c4..83b3b9c3d28d946c6a5462b0241a03230c532181 100644 (file)
@@ -13,40 +13,17 @@ dist_pkgcfg_DATA = \
 pkgcfg_DATA = \
   resolver.conf
 
-if MINGW
-noinst_LTLIBRARIES = \
-  libgnunetutilwin.la
-libgnunetutilwin_la_SOURCES = \
-  win.c \
-  winproc.c
-libgnunetutilwin_la_LDFLAGS = \
-  -no-undefined -Wl,--export-all-symbols
-libgnunetutilwin_la_LIBADD = \
-  -lshell32 -liconv -lstdc++ \
-  -lcomdlg32 -lgdi32 -liphlpapi
-WINLIB = libgnunetutilwin.la
-W32CAT = w32cat
-W32CONSOLEHELPER = gnunet-helper-w32-console
-endif
-
-if !MINGW
- TEST_CLIENT_UNIX_NC = test_client_unix.nc
-else
- TEST_CLIENT_UNIX_NC =
-endif
+TEST_CLIENT_UNIX_NC = test_client_unix.nc
 
 if USE_COVERAGE
   AM_CFLAGS = --coverage -O0
   XLIB = -lgcov
 endif
 
-w32cat_SOURCES = w32cat.c
-
-gnunet_helper_w32_console_SOURCES = \
-  gnunet-helper-w32-console.c \
-  gnunet-helper-w32-console.h
-gnunet_helper_w32_console_LDADD = \
-  libgnunetutil.la
+if ENABLE_BENCHMARK
+  BENCHMARK = benchmark.c benchmark.h
+  PTHREAD = -lpthread
+endif
 
 gnunet_config_diff_SOURCES = \
  gnunet-config-diff.c
@@ -60,18 +37,22 @@ test_common_logging_dummy_LDADD = \
 
 libgnunetutil_la_SOURCES = \
   bandwidth.c \
+  $(BENCHMARK) \
   bio.c \
+  buffer.c \
   client.c \
   common_allocation.c \
   common_endian.c \
   common_logging.c \
   configuration.c \
   configuration_loader.c \
+  consttime_memcmp.c \
   container_bloomfilter.c \
   container_heap.c \
   container_meta_data.c \
   container_multihashmap.c \
   container_multishortmap.c \
+  container_multiuuidmap.c \
   container_multipeermap.c \
   container_multihashmap32.c \
   crypto_symmetric.c \
@@ -85,10 +66,13 @@ libgnunetutil_la_SOURCES = \
   crypto_kdf.c \
   crypto_mpi.c \
   crypto_paillier.c \
+  crypto_pow.c \
   crypto_random.c \
   crypto_rsa.c \
   disk.c \
   disk.h \
+  dnsparser.c \
+  dnsstub.c \
   getopt.c \
   getopt_helpers.c \
   helper.c \
@@ -104,79 +88,81 @@ libgnunetutil_la_SOURCES = \
   peer.c \
   plugin.c \
   program.c \
+  regex.c \
   resolver_api.c resolver.h \
   scheduler.c \
   service.c \
   signal.c \
   strings.c \
   time.c \
-  speedup.c speedup.h
+  tun.c \
+  speedup.c speedup.h \
+  proc_compat.c
+
+if HAVE_LIBATOMIC
+if DARWIN
+       LIBATOMIC=
+else
+  LIBATOMIC= -latomic
+endif
+else
+  LIBATOMIC=
+endif
+
+if HAVE_LIBIDN
+  LIBIDN= -lidn
+else
+  LIBIDN=
+endif
+
+if HAVE_LIBIDN2
+  LIBIDN2= -lidn2
+else
+  LIBIDN2=
+endif
 
 libgnunetutil_la_LIBADD = \
   $(GCLIBADD) $(WINLIB) \
+  $(LIBATOMIC) \
   $(LIBGCRYPT_LIBS) \
   $(LTLIBICONV) \
   $(LTLIBINTL) \
-  -lltdl $(Z_LIBS) -lunistring $(XLIB)
+  -lltdl \
+  $(LIBIDN) $(LIBIDN2) \
+  $(Z_LIBS) \
+  -lunistring \
+  -lsodium \
+  $(XLIB) \
+  $(PTHREAD)
 
 libgnunetutil_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS) \
-  -version-info 13:0:0
-
-libgnunetutil_taler_wallet_la_SOURCES = \
-  common_allocation.c \
-  common_endian.c \
-  common_logging.c \
-  container_heap.c \
-  container_multihashmap.c \
-  container_multihashmap32.c \
-  crypto_symmetric.c \
-  crypto_crc.c \
-  crypto_ecc.c \
-  crypto_hash.c \
-  crypto_hkdf.c \
-  crypto_kdf.c \
-  crypto_mpi.c \
-  crypto_random.c \
-  crypto_rsa.c \
-  strings.c \
-  time.c
-
-libgnunetutil_taler_wallet_la_LIBADD = \
-  $(LIBGCRYPT_LIBS) \
-  -lunistring
-
-libgnunetutil_taler_wallet_la_LDFLAGS = \
-  $(GN_LIB_LDFLAGS) \
-  -version-info 0:0:0
+  -version-info 13:2:0
 
 if HAVE_TESTING
   GNUNET_ECC = gnunet-ecc
   GNUNET_SCRYPT = gnunet-scrypt
 endif
 
-if TALER_ONLY
-lib_LTLIBRARIES = libgnunetutil_taler_wallet.la
-else
 lib_LTLIBRARIES = libgnunetutil.la
 
 libexec_PROGRAMS = \
  gnunet-service-resolver \
- $(W32CONSOLEHELPER)
-
-bin_SCRIPTS =\
- gnunet-qr
+ gnunet-timeout
 
 bin_PROGRAMS = \
  gnunet-resolver \
  gnunet-config \
+ gnunet-crypto-tvg \
  $(GNUNET_ECC) \
  $(GNUNET_SCRYPT) \
  gnunet-uri
+if HAVE_ZBAR
+bin_PROGRAMS += gnunet-qr
+endif
 
 noinst_PROGRAMS = \
  gnunet-config-diff \
- $(W32CAT) \
  test_common_logging_dummy
 
 
@@ -185,14 +171,8 @@ AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PAT
 TESTS = $(check_PROGRAMS)
 endif
 
-endif
-
-
-do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
-
-gnunet-qr: gnunet-qr.py.in Makefile
-       $(do_subst) < $(top_srcdir)/src/util/gnunet-qr.py.in > gnunet-qr
-       chmod +x gnunet-qr
+gnunet_timeout_SOURCES = \
+ gnunet-timeout.c
 
 gnunet_service_resolver_SOURCES = \
  gnunet-service-resolver.c
@@ -210,6 +190,11 @@ gnunet_resolver_LDADD = \
   libgnunetutil.la \
   $(GN_LIBINTL)
 
+gnunet_crypto_tvg_SOURCES = \
+ gnunet-crypto-tvg.c
+gnunet_crypto_tvg_LDADD = \
+  libgnunetutil.la \
+  $(GN_LIBINTL) -lgcrypt
 
 gnunet_ecc_SOURCES = \
  gnunet-ecc.c
@@ -230,13 +215,20 @@ gnunet_config_LDADD = \
   libgnunetutil.la \
   $(GN_LIBINTL)
 
-
 gnunet_uri_SOURCES = \
  gnunet-uri.c
 gnunet_uri_LDADD = \
   libgnunetutil.la \
   $(GN_LIBINTL)
 
+
+gnunet_qr_SOURCES = \
+  gnunet-qr.c
+gnunet_qr_LDADD = \
+  libgnunetutil.la \
+  $(GN_LIBINTL)
+gnunet_qr_LDFLAGS= -lzbar
+
 plugin_LTLIBRARIES = \
   libgnunet_plugin_test.la
 
@@ -253,7 +245,9 @@ if HAVE_BENCHMARKS
   perf_crypto_paillier \
   perf_crypto_symmetric \
   perf_crypto_asymmetric \
-  perf_malloc
+  perf_malloc \
+  perf_mq \
+  perf_scheduler
 endif
 
 if HAVE_SSH_KEY
@@ -281,6 +275,7 @@ check_PROGRAMS = \
  test_crypto_eddsa \
  test_crypto_ecdhe \
  test_crypto_ecdh_eddsa \
+ test_crypto_ecdh_ecdsa \
  test_crypto_ecc_dlog \
  test_crypto_hash \
  test_crypto_hash_context \
@@ -291,19 +286,22 @@ check_PROGRAMS = \
  test_crypto_rsa \
  test_disk \
  test_getopt \
+ test_hexcoder \
  test_mq \
  test_os_network \
  test_peer \
  test_plugin \
  test_program \
+ test_regex \
  test_resolver_api.nc \
  test_scheduler \
  test_scheduler_delay \
  test_service \
  test_strings \
  test_strings_to_data \
- test_time \
  test_speedup \
+ test_time \
+ test_tun \
  $(BENCHMARKS) \
  test_os_start_process \
  test_common_logging_runtime_loglevels
@@ -319,14 +317,27 @@ test_bio_SOURCES = \
 test_bio_LDADD = \
  libgnunetutil.la
 
+test_hexcoder_SOURCES = \
+ test_hexcoder.c
+test_hexcoder_LDADD = \
+ libgnunetutil.la
+
+test_tun_SOURCES = \
+ test_tun.c
+test_tun_LDADD = \
+ libgnunetutil.la
+
+test_regex_SOURCES = \
+ test_regex.c
+test_regex_LDADD = \
+ libgnunetutil.la
 
 test_os_start_process_SOURCES = \
  test_os_start_process.c
 test_os_start_process_LDADD = \
  libgnunetutil.la
 test_os_start_process_DEPENDENCIES = \
- libgnunetutil.la \
- $(WINCAT)
+ libgnunetutil.la
 
 test_client_nc_SOURCES = \
  test_client.c
@@ -443,6 +454,13 @@ test_crypto_ecdh_eddsa_LDADD = \
  libgnunetutil.la \
  $(LIBGCRYPT_LIBS)
 
+test_crypto_ecdh_ecdsa_SOURCES = \
+ test_crypto_ecdh_ecdsa.c
+test_crypto_ecdh_ecdsa_LDADD = \
+ libgnunetutil.la \
+ $(LIBGCRYPT_LIBS)
+
+
 test_crypto_hash_SOURCES = \
  test_crypto_hash.c
 test_crypto_hash_LDADD = \
@@ -592,6 +610,16 @@ perf_malloc_SOURCES = \
 perf_malloc_LDADD = \
  libgnunetutil.la
 
+perf_mq_SOURCES = \
+ perf_mq.c
+perf_mq_LDADD = \
+ libgnunetutil.la
+
+perf_scheduler_SOURCES = \
+ perf_scheduler.c
+perf_scheduler_LDADD = \
+ libgnunetutil.la
+
 
 EXTRA_DIST = \
   test_client_data.conf \
@@ -600,5 +628,4 @@ EXTRA_DIST = \
   test_program_data.conf \
   test_resolver_api_data.conf \
   test_service_data.conf \
-  test_speedup_data.conf \
-  gnunet-qr.py.in 
+  test_speedup_data.conf