aboutsummaryrefslogtreecommitdiff
path: root/src/lib/util/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/Makefile.am')
-rw-r--r--src/lib/util/Makefile.am598
1 files changed, 598 insertions, 0 deletions
diff --git a/src/lib/util/Makefile.am b/src/lib/util/Makefile.am
new file mode 100644
index 000000000..7ab6301f5
--- /dev/null
+++ b/src/lib/util/Makefile.am
@@ -0,0 +1,598 @@
1# This Makefile.am is in the public domain
2AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4plugindir = $(libdir)/gnunet
5
6libexecdir= $(pkglibdir)/libexec/
7
8pkgcfgdir= $(pkgdatadir)/config.d/
9
10dist_pkgcfg_DATA = \
11 util.conf
12
13
14TEST_CLIENT_UNIX_NC = test_client_unix.nc
15
16if USE_COVERAGE
17 AM_CFLAGS = --coverage -O0
18 XLIB = -lgcov
19endif
20
21if ENABLE_BENCHMARK
22 BENCHMARK = benchmark.c benchmark.h
23 PTHREAD = -lpthread
24endif
25
26DLOG = crypto_ecc_dlog.c
27DLOG_TEST = test_crypto_ecc_dlog
28
29test_common_logging_dummy_SOURCES = \
30 test_common_logging_dummy.c
31test_common_logging_dummy_LDADD = \
32 libgnunetutil.la
33
34libgnunetutil_la_SOURCES = \
35 bandwidth.c \
36 $(BENCHMARK) \
37 bio.c \
38 buffer.c \
39 child_management.c \
40 client.c \
41 common_allocation.c \
42 common_endian.c \
43 common_logging.c \
44 compress.c \
45 configuration.c \
46 configuration_helper.c \
47 consttime_memcmp.c \
48 container_bloomfilter.c \
49 container_heap.c \
50 container_multihashmap.c \
51 container_multishortmap.c \
52 container_multiuuidmap.c \
53 container_multipeermap.c \
54 container_multihashmap32.c \
55 crypto_blind_sign.c \
56 crypto_crc.c \
57 crypto_cs.c \
58 crypto_ecc.c \
59 crypto_ecc_gnsrecord.c \
60 $(DLOG) \
61 crypto_ecc_setup.c \
62 crypto_edx25519.c \
63 crypto_hash.c \
64 crypto_hash_file.c \
65 crypto_hkdf.c \
66 crypto_kdf.c \
67 crypto_mpi.c \
68 crypto_paillier.c \
69 crypto_pkey.c \
70 crypto_pow.c \
71 crypto_random.c \
72 crypto_rsa.c \
73 crypto_symmetric.c \
74 disk.c \
75 disk.h \
76 dnsparser.c \
77 dnsstub.c \
78 getopt.c \
79 getopt_helpers.c \
80 helper.c \
81 load.c \
82 mst.c \
83 mq.c \
84 nc.c \
85 network.c \
86 nt.c \
87 op.c \
88 os_installation.c \
89 os_network.c \
90 os_priority.c \
91 peer.c \
92 plugin.c \
93 program.c \
94 regex.c \
95 resolver_api.c resolver.h \
96 scheduler.c \
97 service.c \
98 signal.c \
99 strings.c \
100 time.c \
101 tun.c \
102 uri.c \
103 speedup.c speedup.h \
104 proc_compat.c \
105 gnunet_error_codes.c
106
107if HAVE_LIBATOMIC
108if DARWIN
109 LIBATOMIC=
110else
111 LIBATOMIC= -latomic
112endif
113else
114 LIBATOMIC=
115endif
116
117if HAVE_LIBIDN
118 LIBIDN= -lidn
119else
120 LIBIDN=
121endif
122
123if HAVE_LIBIDN2
124 LIBIDN2= -lidn2
125else
126 LIBIDN2=
127endif
128
129
130libgnunetutil_la_CFLAGS = \
131 ${MHD_CFLAGS}
132libgnunetutil_la_LIBADD = \
133 $(GCLIBADD) $(WINLIB) \
134 $(LIBATOMIC) \
135 $(LIBGCRYPT_LIBS) \
136 $(LTLIBICONV) \
137 $(LTLIBINTL) \
138 -lltdl \
139 $(LIBIDN) $(LIBIDN2) \
140 $(Z_LIBS) \
141 -lunistring \
142 -lsodium \
143 $(XLIB) \
144 $(PTHREAD)
145
146libgnunetutil_la_LDFLAGS = \
147 $(GN_LIB_LDFLAGS) \
148 -version-info 15:0:0
149
150lib_LTLIBRARIES = libgnunetutil.la
151
152noinst_PROGRAMS = \
153 test_common_logging_dummy
154
155if ENABLE_TEST_RUN
156AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
157TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
158endif
159
160plugin_LTLIBRARIES = \
161 libgnunet_plugin_utiltest.la
162
163libgnunet_plugin_utiltest_la_SOURCES = \
164 test_plugin_plug.c
165libgnunet_plugin_utiltest_la_LDFLAGS = \
166 $(GN_PLUGIN_LDFLAGS)
167
168if HAVE_BENCHMARKS
169 BENCHMARKS = \
170 perf_crypto_cs \
171 perf_crypto_hash \
172 perf_crypto_rsa \
173 perf_crypto_paillier \
174 perf_crypto_symmetric \
175 perf_crypto_asymmetric \
176 perf_malloc \
177 perf_mq \
178 perf_scheduler \
179 perf_crypto_ecc_dlog
180endif
181
182if HAVE_SSH_KEY
183# SSH_USING_TESTS = test_socks.nc
184endif
185
186check_PROGRAMS = \
187 test_bio \
188 test_child_management \
189 test_client.nc \
190 $(TEST_CLIENT_UNIX_NC) \
191 test_common_allocation \
192 test_common_endian \
193 test_common_logging \
194 test_configuration \
195 test_container_bloomfilter \
196 test_container_dll \
197 test_container_multihashmap \
198 test_container_multihashmap32 \
199 test_container_multipeermap \
200 test_container_heap \
201 test_crypto_blind \
202 test_crypto_crc \
203 test_crypto_cs \
204 test_crypto_ecdsa \
205 test_crypto_eddsa \
206 test_crypto_ecdhe \
207 test_crypto_ecdh_eddsa \
208 test_crypto_ecdh_ecdsa \
209 test_crypto_edx25519 \
210 $(DLOG_TEST) \
211 test_crypto_hash \
212 test_crypto_hash_context \
213 test_crypto_hkdf \
214 test_crypto_kdf \
215 test_crypto_paillier \
216 test_crypto_random \
217 test_crypto_rsa \
218 test_crypto_symmetric \
219 test_disk \
220 test_getopt \
221 test_hexcoder \
222 test_mq \
223 test_os_network \
224 test_peer \
225 test_plugin \
226 test_program \
227 test_regex \
228 test_scheduler \
229 test_scheduler_delay \
230 test_scheduler_hogging_cancel \
231 test_scheduler_hogging_priority \
232 test_service \
233 test_strings \
234 test_strings_to_data \
235 test_speedup \
236 test_time \
237 test_tun \
238 test_uri \
239 $(BENCHMARKS) \
240 test_os_start_process \
241 test_common_logging_runtime_loglevels
242
243test_child_management_SOURCES = \
244 test_child_management.c
245test_child_management_LDADD = \
246 libgnunetutil.la \
247 $(XLIB)
248
249
250
251# Declare .nc (NO-CONCURRENCY) as a test extension so that we can impart
252# sequential execution order for them
253TEST_EXTENSIONS = .nc
254test_test_client_unix.log: test_client.log
255
256test_bio_SOURCES = \
257 test_bio.c
258test_bio_LDADD = \
259 libgnunetutil.la
260
261test_hexcoder_SOURCES = \
262 test_hexcoder.c
263test_hexcoder_LDADD = \
264 libgnunetutil.la
265
266test_tun_SOURCES = \
267 test_tun.c
268test_tun_LDADD = \
269 libgnunetutil.la
270
271test_regex_SOURCES = \
272 test_regex.c
273test_regex_LDADD = \
274 libgnunetutil.la
275
276test_os_start_process_SOURCES = \
277 test_os_start_process.c
278test_os_start_process_LDADD = \
279 libgnunetutil.la
280
281test_client_nc_SOURCES = \
282 test_client.c
283test_client_nc_LDADD = \
284 libgnunetutil.la
285
286test_client_unix_nc_SOURCES = \
287 test_client.c
288test_client_unix_nc_LDADD = \
289 libgnunetutil.la
290
291#test_socks_nc_SOURCES = \
292# test_socks.c
293#test_socks_nc_LDADD = \
294# libgnunetutil.la
295
296test_common_allocation_SOURCES = \
297 test_common_allocation.c
298test_common_allocation_LDADD = \
299 libgnunetutil.la
300
301test_common_endian_SOURCES = \
302 test_common_endian.c
303test_common_endian_LDADD = \
304 libgnunetutil.la
305
306test_common_logging_SOURCES = \
307 test_common_logging.c
308test_common_logging_LDADD = \
309 libgnunetutil.la
310
311test_common_logging_runtime_loglevels_SOURCES = \
312 test_common_logging_runtime_loglevels.c
313test_common_logging_runtime_loglevels_LDADD = \
314 libgnunetutil.la
315
316test_configuration_SOURCES = \
317 test_configuration.c
318test_configuration_LDADD = \
319 libgnunetutil.la
320
321test_container_bloomfilter_SOURCES = \
322 test_container_bloomfilter.c
323test_container_bloomfilter_LDADD = \
324 libgnunetutil.la
325
326test_container_dll_SOURCES = \
327 test_container_dll.c
328test_container_dll_LDADD = \
329 libgnunetutil.la
330
331test_container_multihashmap_SOURCES = \
332 test_container_multihashmap.c
333test_container_multihashmap_LDADD = \
334 libgnunetutil.la
335
336test_container_multihashmap32_SOURCES = \
337 test_container_multihashmap32.c
338test_container_multihashmap32_LDADD = \
339 libgnunetutil.la
340
341test_container_multipeermap_SOURCES = \
342 test_container_multipeermap.c
343test_container_multipeermap_LDADD = \
344 libgnunetutil.la
345
346test_container_heap_SOURCES = \
347 test_container_heap.c
348test_container_heap_LDADD = \
349 libgnunetutil.la
350
351test_crypto_blind_SOURCES = \
352 test_crypto_blind.c
353test_crypto_blind_LDADD = \
354 libgnunetutil.la
355
356test_crypto_symmetric_SOURCES = \
357 test_crypto_symmetric.c
358test_crypto_symmetric_LDADD = \
359 libgnunetutil.la
360
361test_crypto_crc_SOURCES = \
362 test_crypto_crc.c
363test_crypto_crc_LDADD = \
364 libgnunetutil.la
365
366test_crypto_cs_SOURCES = \
367 test_crypto_cs.c
368test_crypto_cs_LDADD = \
369 libgnunetutil.la \
370 -lsodium
371
372test_crypto_ecdsa_SOURCES = \
373 test_crypto_ecdsa.c
374test_crypto_ecdsa_LDADD = \
375 libgnunetutil.la \
376 $(LIBGCRYPT_LIBS)
377
378test_crypto_eddsa_SOURCES = \
379 test_crypto_eddsa.c
380test_crypto_eddsa_LDADD = \
381 libgnunetutil.la \
382 $(LIBGCRYPT_LIBS)
383
384test_crypto_edx25519_SOURCES = \
385 test_crypto_edx25519.c
386test_crypto_edx25519_LDADD = \
387 libgnunetutil.la \
388 $(LIBGCRYPT_LIBS)
389
390test_crypto_ecc_dlog_SOURCES = \
391 test_crypto_ecc_dlog.c
392test_crypto_ecc_dlog_LDADD = \
393 -lsodium \
394 libgnunetutil.la \
395 $(LIBGCRYPT_LIBS)
396
397test_crypto_ecdhe_SOURCES = \
398 test_crypto_ecdhe.c
399test_crypto_ecdhe_LDADD = \
400 libgnunetutil.la \
401 $(LIBGCRYPT_LIBS)
402
403test_crypto_ecdh_eddsa_SOURCES = \
404 test_crypto_ecdh_eddsa.c
405test_crypto_ecdh_eddsa_LDADD = \
406 libgnunetutil.la \
407 $(LIBGCRYPT_LIBS)
408
409test_crypto_ecdh_ecdsa_SOURCES = \
410 test_crypto_ecdh_ecdsa.c
411test_crypto_ecdh_ecdsa_LDADD = \
412 libgnunetutil.la \
413 $(LIBGCRYPT_LIBS)
414
415
416test_crypto_hash_SOURCES = \
417 test_crypto_hash.c
418test_crypto_hash_LDADD = \
419 libgnunetutil.la
420
421test_crypto_hash_context_SOURCES = \
422 test_crypto_hash_context.c
423test_crypto_hash_context_LDADD = \
424 libgnunetutil.la
425
426test_crypto_hkdf_SOURCES = \
427 test_crypto_hkdf.c
428test_crypto_hkdf_LDADD = \
429 libgnunetutil.la
430
431test_crypto_kdf_SOURCES = \
432 test_crypto_kdf.c
433test_crypto_kdf_LDADD = \
434 libgnunetutil.la -lgcrypt
435
436test_crypto_paillier_SOURCES = \
437 test_crypto_paillier.c
438test_crypto_paillier_LDADD = \
439 $(LIBGCRYPT_LIBS) \
440 libgnunetutil.la
441
442test_crypto_random_SOURCES = \
443 test_crypto_random.c
444test_crypto_random_LDADD = \
445 libgnunetutil.la
446
447test_crypto_rsa_SOURCES = \
448 test_crypto_rsa.c
449test_crypto_rsa_LDADD = \
450 libgnunetutil.la -lgcrypt
451
452test_disk_SOURCES = \
453 test_disk.c
454test_disk_LDADD = \
455 libgnunetutil.la
456
457test_getopt_SOURCES = \
458 test_getopt.c
459test_getopt_LDADD = \
460 libgnunetutil.la
461
462test_mq_SOURCES = \
463 test_mq.c
464test_mq_LDADD = \
465 libgnunetutil.la
466
467test_os_network_SOURCES = \
468 test_os_network.c
469test_os_network_LDADD = \
470 libgnunetutil.la
471
472test_peer_SOURCES = \
473 test_peer.c
474test_peer_LDADD = \
475 libgnunetutil.la -lgcrypt
476
477test_plugin_SOURCES = \
478 test_plugin.c
479test_plugin_LDADD = \
480 libgnunetutil.la
481
482test_program_SOURCES = \
483 test_program.c
484test_program_LDADD = \
485 libgnunetutil.la
486
487test_scheduler_SOURCES = \
488 test_scheduler.c
489test_scheduler_LDADD = \
490 libgnunetutil.la
491
492test_scheduler_delay_SOURCES = \
493 test_scheduler_delay.c
494test_scheduler_delay_LDADD = \
495 libgnunetutil.la
496
497test_scheduler_hogging_cancel_SOURCES = \
498 test_scheduler_hogging_cancel.c
499test_scheduler_hogging_cancel_LDADD = \
500 libgnunetutil.la
501
502test_scheduler_hogging_priority_SOURCES = \
503 test_scheduler_hogging_priority.c
504test_scheduler_hogging_priority_LDADD = \
505 libgnunetutil.la
506
507test_service_SOURCES = \
508 test_service.c
509test_service_LDADD = \
510 libgnunetutil.la
511
512test_strings_SOURCES = \
513 test_strings.c
514test_strings_LDADD = \
515 libgnunetutil.la
516
517test_strings_to_data_SOURCES = \
518 test_strings_to_data.c
519test_strings_to_data_LDADD = \
520 libgnunetutil.la
521
522
523test_time_SOURCES = \
524 test_time.c
525test_time_LDADD = \
526 libgnunetutil.la
527
528test_speedup_SOURCES = \
529 test_speedup.c
530test_speedup_LDADD = \
531 libgnunetutil.la
532
533test_uri_SOURCES = \
534 test_uri.c
535test_uri_LDADD = \
536 libgnunetutil.la
537
538perf_crypto_cs_SOURCES = \
539 perf_crypto_cs.c
540perf_crypto_cs_LDADD = \
541 libgnunetutil.la
542
543perf_crypto_hash_SOURCES = \
544 perf_crypto_hash.c
545perf_crypto_hash_LDADD = \
546 libgnunetutil.la
547
548perf_crypto_ecc_dlog_SOURCES = \
549 perf_crypto_ecc_dlog.c
550perf_crypto_ecc_dlog_LDADD = \
551 libgnunetutil.la \
552 -lsodium
553
554perf_crypto_rsa_SOURCES = \
555 perf_crypto_rsa.c
556perf_crypto_rsa_LDADD = \
557 libgnunetutil.la
558
559perf_crypto_symmetric_SOURCES = \
560 perf_crypto_symmetric.c
561perf_crypto_symmetric_LDADD = \
562 libgnunetutil.la
563
564perf_crypto_asymmetric_SOURCES = \
565 perf_crypto_asymmetric.c
566perf_crypto_asymmetric_LDADD = \
567 libgnunetutil.la
568
569perf_crypto_paillier_SOURCES = \
570 perf_crypto_paillier.c
571perf_crypto_paillier_LDADD = \
572 libgnunetutil.la \
573 -lgcrypt
574
575perf_malloc_SOURCES = \
576 perf_malloc.c
577perf_malloc_LDADD = \
578 libgnunetutil.la
579
580perf_mq_SOURCES = \
581 perf_mq.c
582perf_mq_LDADD = \
583 libgnunetutil.la
584
585perf_scheduler_SOURCES = \
586 perf_scheduler.c
587perf_scheduler_LDADD = \
588 libgnunetutil.la
589
590
591EXTRA_DIST = \
592 test_client_data.conf \
593 test_client_unix.conf \
594 test_configuration_data.conf \
595 test_program_data.conf \
596 test_service_data.conf \
597 test_speedup_data.conf \
598 child_management_test.sh