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.am593
1 files changed, 593 insertions, 0 deletions
diff --git a/src/lib/util/Makefile.am b/src/lib/util/Makefile.am
new file mode 100644
index 000000000..5d92dfdd6
--- /dev/null
+++ b/src/lib/util/Makefile.am
@@ -0,0 +1,593 @@
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
13pkgcfg_DATA = \
14 resolver.conf
15
16TEST_CLIENT_UNIX_NC = test_client_unix.nc
17
18if USE_COVERAGE
19 AM_CFLAGS = --coverage -O0
20 XLIB = -lgcov
21endif
22
23if ENABLE_BENCHMARK
24 BENCHMARK = benchmark.c benchmark.h
25 PTHREAD = -lpthread
26endif
27
28DLOG = crypto_ecc_dlog.c
29DLOG_TEST = test_crypto_ecc_dlog
30
31test_common_logging_dummy_SOURCES = \
32 test_common_logging_dummy.c
33test_common_logging_dummy_LDADD = \
34 libgnunetutil.la
35
36libgnunetutil_la_SOURCES = \
37 bandwidth.c \
38 $(BENCHMARK) \
39 bio.c \
40 buffer.c \
41 child_management.c \
42 client.c \
43 common_allocation.c \
44 common_endian.c \
45 common_logging.c \
46 compress.c \
47 configuration.c \
48 configuration_helper.c \
49 consttime_memcmp.c \
50 container_bloomfilter.c \
51 container_heap.c \
52 container_multihashmap.c \
53 container_multishortmap.c \
54 container_multiuuidmap.c \
55 container_multipeermap.c \
56 container_multihashmap32.c \
57 crypto_symmetric.c \
58 crypto_crc.c \
59 crypto_cs.c \
60 crypto_ecc.c \
61 crypto_ecc_gnsrecord.c \
62 $(DLOG) \
63 crypto_ecc_setup.c \
64 crypto_edx25519.c \
65 crypto_hash.c \
66 crypto_hash_file.c \
67 crypto_hkdf.c \
68 crypto_kdf.c \
69 crypto_mpi.c \
70 crypto_paillier.c \
71 crypto_pkey.c \
72 crypto_pow.c \
73 crypto_random.c \
74 crypto_rsa.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 $(XLIB) \
145 $(PTHREAD)
146
147libgnunetutil_la_LDFLAGS = \
148 $(GN_LIB_LDFLAGS) \
149 -version-info 15:0:0
150
151lib_LTLIBRARIES = libgnunetutil.la
152
153noinst_PROGRAMS = \
154 test_common_logging_dummy
155
156if ENABLE_TEST_RUN
157AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
158TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
159endif
160
161plugin_LTLIBRARIES = \
162 libgnunet_plugin_utiltest.la
163
164libgnunet_plugin_utiltest_la_SOURCES = \
165 test_plugin_plug.c
166libgnunet_plugin_utiltest_la_LDFLAGS = \
167 $(GN_PLUGIN_LDFLAGS)
168
169if HAVE_BENCHMARKS
170 BENCHMARKS = \
171 perf_crypto_cs \
172 perf_crypto_hash \
173 perf_crypto_rsa \
174 perf_crypto_paillier \
175 perf_crypto_symmetric \
176 perf_crypto_asymmetric \
177 perf_malloc \
178 perf_mq \
179 perf_scheduler \
180 perf_crypto_ecc_dlog
181endif
182
183if HAVE_SSH_KEY
184# SSH_USING_TESTS = test_socks.nc
185endif
186
187check_PROGRAMS = \
188 test_bio \
189 test_child_management \
190 test_client.nc \
191 $(TEST_CLIENT_UNIX_NC) \
192 test_common_allocation \
193 test_common_endian \
194 test_common_logging \
195 test_configuration \
196 test_container_bloomfilter \
197 test_container_dll \
198 test_container_multihashmap \
199 test_container_multihashmap32 \
200 test_container_multipeermap \
201 test_container_heap \
202 test_crypto_symmetric \
203 test_crypto_crc \
204 test_crypto_cs \
205 test_crypto_ecdsa \
206 test_crypto_eddsa \
207 test_crypto_ecdhe \
208 test_crypto_ecdh_eddsa \
209 test_crypto_ecdh_ecdsa \
210 test_crypto_edx25519 \
211 $(DLOG_TEST) \
212 test_crypto_hash \
213 test_crypto_hash_context \
214 test_crypto_hkdf \
215 test_crypto_kdf \
216 test_crypto_paillier \
217 test_crypto_random \
218 test_crypto_rsa \
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_symmetric_SOURCES = \
352 test_crypto_symmetric.c
353test_crypto_symmetric_LDADD = \
354 libgnunetutil.la
355
356test_crypto_crc_SOURCES = \
357 test_crypto_crc.c
358test_crypto_crc_LDADD = \
359 libgnunetutil.la
360
361test_crypto_cs_SOURCES = \
362 test_crypto_cs.c
363test_crypto_cs_LDADD = \
364 libgnunetutil.la \
365 -lsodium
366
367test_crypto_ecdsa_SOURCES = \
368 test_crypto_ecdsa.c
369test_crypto_ecdsa_LDADD = \
370 libgnunetutil.la \
371 $(LIBGCRYPT_LIBS)
372
373test_crypto_eddsa_SOURCES = \
374 test_crypto_eddsa.c
375test_crypto_eddsa_LDADD = \
376 libgnunetutil.la \
377 $(LIBGCRYPT_LIBS)
378
379test_crypto_edx25519_SOURCES = \
380 test_crypto_edx25519.c
381test_crypto_edx25519_LDADD = \
382 libgnunetutil.la \
383 $(LIBGCRYPT_LIBS)
384
385test_crypto_ecc_dlog_SOURCES = \
386 test_crypto_ecc_dlog.c
387test_crypto_ecc_dlog_LDADD = \
388 -lsodium \
389 libgnunetutil.la \
390 $(LIBGCRYPT_LIBS)
391
392test_crypto_ecdhe_SOURCES = \
393 test_crypto_ecdhe.c
394test_crypto_ecdhe_LDADD = \
395 libgnunetutil.la \
396 $(LIBGCRYPT_LIBS)
397
398test_crypto_ecdh_eddsa_SOURCES = \
399 test_crypto_ecdh_eddsa.c
400test_crypto_ecdh_eddsa_LDADD = \
401 libgnunetutil.la \
402 $(LIBGCRYPT_LIBS)
403
404test_crypto_ecdh_ecdsa_SOURCES = \
405 test_crypto_ecdh_ecdsa.c
406test_crypto_ecdh_ecdsa_LDADD = \
407 libgnunetutil.la \
408 $(LIBGCRYPT_LIBS)
409
410
411test_crypto_hash_SOURCES = \
412 test_crypto_hash.c
413test_crypto_hash_LDADD = \
414 libgnunetutil.la
415
416test_crypto_hash_context_SOURCES = \
417 test_crypto_hash_context.c
418test_crypto_hash_context_LDADD = \
419 libgnunetutil.la
420
421test_crypto_hkdf_SOURCES = \
422 test_crypto_hkdf.c
423test_crypto_hkdf_LDADD = \
424 libgnunetutil.la
425
426test_crypto_kdf_SOURCES = \
427 test_crypto_kdf.c
428test_crypto_kdf_LDADD = \
429 libgnunetutil.la -lgcrypt
430
431test_crypto_paillier_SOURCES = \
432 test_crypto_paillier.c
433test_crypto_paillier_LDADD = \
434 $(LIBGCRYPT_LIBS) \
435 libgnunetutil.la
436
437test_crypto_random_SOURCES = \
438 test_crypto_random.c
439test_crypto_random_LDADD = \
440 libgnunetutil.la
441
442test_crypto_rsa_SOURCES = \
443 test_crypto_rsa.c
444test_crypto_rsa_LDADD = \
445 libgnunetutil.la -lgcrypt
446
447test_disk_SOURCES = \
448 test_disk.c
449test_disk_LDADD = \
450 libgnunetutil.la
451
452test_getopt_SOURCES = \
453 test_getopt.c
454test_getopt_LDADD = \
455 libgnunetutil.la
456
457test_mq_SOURCES = \
458 test_mq.c
459test_mq_LDADD = \
460 libgnunetutil.la
461
462test_os_network_SOURCES = \
463 test_os_network.c
464test_os_network_LDADD = \
465 libgnunetutil.la
466
467test_peer_SOURCES = \
468 test_peer.c
469test_peer_LDADD = \
470 libgnunetutil.la -lgcrypt
471
472test_plugin_SOURCES = \
473 test_plugin.c
474test_plugin_LDADD = \
475 libgnunetutil.la
476
477test_program_SOURCES = \
478 test_program.c
479test_program_LDADD = \
480 libgnunetutil.la
481
482test_scheduler_SOURCES = \
483 test_scheduler.c
484test_scheduler_LDADD = \
485 libgnunetutil.la
486
487test_scheduler_delay_SOURCES = \
488 test_scheduler_delay.c
489test_scheduler_delay_LDADD = \
490 libgnunetutil.la
491
492test_scheduler_hogging_cancel_SOURCES = \
493 test_scheduler_hogging_cancel.c
494test_scheduler_hogging_cancel_LDADD = \
495 libgnunetutil.la
496
497test_scheduler_hogging_priority_SOURCES = \
498 test_scheduler_hogging_priority.c
499test_scheduler_hogging_priority_LDADD = \
500 libgnunetutil.la
501
502test_service_SOURCES = \
503 test_service.c
504test_service_LDADD = \
505 libgnunetutil.la
506
507test_strings_SOURCES = \
508 test_strings.c
509test_strings_LDADD = \
510 libgnunetutil.la
511
512test_strings_to_data_SOURCES = \
513 test_strings_to_data.c
514test_strings_to_data_LDADD = \
515 libgnunetutil.la
516
517
518test_time_SOURCES = \
519 test_time.c
520test_time_LDADD = \
521 libgnunetutil.la
522
523test_speedup_SOURCES = \
524 test_speedup.c
525test_speedup_LDADD = \
526 libgnunetutil.la
527
528test_uri_SOURCES = \
529 test_uri.c
530test_uri_LDADD = \
531 libgnunetutil.la
532
533perf_crypto_cs_SOURCES = \
534 perf_crypto_cs.c
535perf_crypto_cs_LDADD = \
536 libgnunetutil.la
537
538perf_crypto_hash_SOURCES = \
539 perf_crypto_hash.c
540perf_crypto_hash_LDADD = \
541 libgnunetutil.la
542
543perf_crypto_ecc_dlog_SOURCES = \
544 perf_crypto_ecc_dlog.c
545perf_crypto_ecc_dlog_LDADD = \
546 libgnunetutil.la \
547 -lsodium
548
549perf_crypto_rsa_SOURCES = \
550 perf_crypto_rsa.c
551perf_crypto_rsa_LDADD = \
552 libgnunetutil.la
553
554perf_crypto_symmetric_SOURCES = \
555 perf_crypto_symmetric.c
556perf_crypto_symmetric_LDADD = \
557 libgnunetutil.la
558
559perf_crypto_asymmetric_SOURCES = \
560 perf_crypto_asymmetric.c
561perf_crypto_asymmetric_LDADD = \
562 libgnunetutil.la
563
564perf_crypto_paillier_SOURCES = \
565 perf_crypto_paillier.c
566perf_crypto_paillier_LDADD = \
567 libgnunetutil.la \
568 -lgcrypt
569
570perf_malloc_SOURCES = \
571 perf_malloc.c
572perf_malloc_LDADD = \
573 libgnunetutil.la
574
575perf_mq_SOURCES = \
576 perf_mq.c
577perf_mq_LDADD = \
578 libgnunetutil.la
579
580perf_scheduler_SOURCES = \
581 perf_scheduler.c
582perf_scheduler_LDADD = \
583 libgnunetutil.la
584
585
586EXTRA_DIST = \
587 test_client_data.conf \
588 test_client_unix.conf \
589 test_configuration_data.conf \
590 test_program_data.conf \
591 test_service_data.conf \
592 test_speedup_data.conf \
593 child_management_test.sh