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