Add NSE proof of work standalone tool and benchmark
[oweals/gnunet.git] / src / util / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 libexecdir= $(pkglibdir)/libexec/
6
7 pkgcfgdir= $(pkgdatadir)/config.d/
8
9 dist_pkgcfg_DATA = \
10   util.conf
11
12 pkgcfg_DATA = \
13   resolver.conf
14
15 if MINGW
16 noinst_LTLIBRARIES = \
17   libgnunetutilwin.la
18 libgnunetutilwin_la_SOURCES = \
19   win.c \
20   winproc.c
21 libgnunetutilwin_la_LDFLAGS = \
22   -no-undefined -Wl,--export-all-symbols
23 libgnunetutilwin_la_LIBADD = \
24   -lshell32 -liconv -lstdc++ \
25   -lcomdlg32 -lgdi32 -liphlpapi
26 WINLIB = libgnunetutilwin.la
27 W32CAT = w32cat
28 W32CONSOLEHELPER = gnunet-helper-w32-console
29 endif
30
31 if !MINGW
32  SERVER_CLIENT_UNIX = test_server_with_client_unix
33 endif
34
35 if USE_COVERAGE
36   AM_CFLAGS = --coverage -O0
37   XLIB = -lgcov
38 endif
39
40 w32cat_SOURCES = w32cat.c
41
42 gnunet_helper_w32_console_SOURCES = \
43   gnunet-helper-w32-console.c \
44   gnunet-helper-w32-console.h
45 gnunet_helper_w32_console_LDADD = \
46  $(top_builddir)/src/util/libgnunetutil.la
47 gnunet_helper_w32_console_DEPENDENCIES = \
48  libgnunetutil.la
49
50 noinst_PROGRAMS = \
51  gnunet-config-diff \
52  $(W32CAT) \
53  test_common_logging_dummy
54
55
56 gnunet_config_diff_SOURCES = \
57  gnunet-config-diff.c
58 gnunet_config_diff_LDADD = \
59  $(top_builddir)/src/util/libgnunetutil.la
60 gnunet_config_diff_DEPENDENCIES = \
61  libgnunetutil.la
62
63 test_common_logging_dummy_SOURCES = \
64  test_common_logging_dummy.c
65 test_common_logging_dummy_LDADD = \
66  $(top_builddir)/src/util/libgnunetutil.la
67 test_common_logging_dummy_DEPENDENCIES = \
68  libgnunetutil.la
69
70 lib_LTLIBRARIES = libgnunetutil.la
71
72 libgnunetutil_la_SOURCES = \
73   bandwidth.c \
74   bio.c \
75   client.c \
76   common_allocation.c \
77   common_endian.c \
78   common_logging.c \
79   configuration.c \
80   connection.c \
81   container_bloomfilter.c \
82   container_heap.c \
83   container_meta_data.c \
84   container_multihashmap.c \
85   container_multipeermap.c \
86   container_multihashmap32.c \
87   container_slist.c \
88   crypto_symmetric.c \
89   crypto_crc.c \
90   crypto_ecc.c \
91   crypto_hash.c \
92   crypto_hkdf.c \
93   crypto_kdf.c \
94   crypto_random.c \
95   disk.c \
96   disk.h \
97   getopt.c \
98   getopt_helpers.c \
99   helper.c \
100   load.c \
101   mq.c \
102   network.c \
103   os_installation.c \
104   os_network.c \
105   os_priority.c \
106   peer.c \
107   plugin.c \
108   program.c \
109   resolver_api.c resolver.h \
110   scheduler.c \
111   server.c \
112   server_mst.c \
113   server_nc.c \
114   server_tc.c \
115   service.c \
116   signal.c \
117   strings.c \
118   time.c \
119   speedup.c
120
121 libgnunetutil_la_LIBADD = \
122   $(GCLIBADD) $(WINLIB) \
123   $(LIBGCRYPT_LIBS) \
124   $(LTLIBICONV) \
125   $(LTLIBINTL) \
126   -lltdl $(Z_LIBS) -lunistring $(XLIB)
127
128 libgnunetutil_la_LDFLAGS = \
129   $(GN_LIB_LDFLAGS) \
130   -version-info 11:0:2
131
132 if HAVE_TESTING
133   GNUNET_ECC = gnunet-ecc
134   GNUNET_SCRYPT = gnunet-scrypt
135 endif
136
137
138 libexec_PROGRAMS = \
139  gnunet-service-resolver \
140  $(W32CONSOLEHELPER)
141
142 bin_SCRIPTS =\
143  gnunet-qr
144
145 bin_PROGRAMS = \
146  gnunet-resolver \
147  gnunet-config \
148  $(GNUNET_ECC) \
149  $(GNUNET_SCRYPT) \
150  gnunet-uri
151
152 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
153
154 gnunet-qr: gnunet-qr.py.in Makefile
155         $(do_subst) < gnunet-qr.py.in > gnunet-qr
156         chmod +x gnunet-qr
157
158 gnunet_service_resolver_SOURCES = \
159  gnunet-service-resolver.c
160 gnunet_service_resolver_LDADD = \
161   $(top_builddir)/src/util/libgnunetutil.la \
162   $(GN_LIBINTL)
163 gnunet_service_resolver_DEPENDENCIES = \
164   libgnunetutil.la
165
166
167 gnunet_resolver_SOURCES = \
168  gnunet-resolver.c
169 gnunet_resolver_LDADD = \
170   $(top_builddir)/src/util/libgnunetutil.la \
171   $(GN_LIBINTL)
172 gnunet_resolver_DEPENDENCIES = \
173   libgnunetutil.la
174
175
176 gnunet_ecc_SOURCES = \
177  gnunet-ecc.c
178 gnunet_ecc_LDADD = \
179   $(top_builddir)/src/util/libgnunetutil.la \
180   $(GN_LIBINTL) -lgcrypt
181 gnunet_ecc_DEPENDENCIES = \
182   libgnunetutil.la
183
184 gnunet_scrypt_SOURCES = \
185  gnunet-scrypt.c
186 gnunet_scrypt_LDADD = \
187   $(top_builddir)/src/util/libgnunetutil.la \
188   $(GN_LIBINTL) -lgcrypt
189 gnunet_scrypt_DEPENDENCIES = \
190   libgnunetutil.la
191
192
193 gnunet_config_SOURCES = \
194  gnunet-config.c
195 gnunet_config_LDADD = \
196   $(top_builddir)/src/util/libgnunetutil.la \
197   $(GN_LIBINTL)
198 gnunet_config_DEPENDENCIES = \
199   libgnunetutil.la
200
201
202 gnunet_uri_SOURCES = \
203  gnunet-uri.c
204 gnunet_uri_LDADD = \
205   $(top_builddir)/src/util/libgnunetutil.la \
206   $(GN_LIBINTL)
207 gnunet_uri_DEPENDENCIES = \
208   libgnunetutil.la
209
210 plugin_LTLIBRARIES = \
211   libgnunet_plugin_test.la
212
213 libgnunet_plugin_test_la_SOURCES = \
214   test_plugin_plug.c
215 libgnunet_plugin_test_la_LDFLAGS = \
216  $(GN_PLUGIN_LDFLAGS)
217
218 if HAVE_BENCHMARKS
219  BENCHMARKS = \
220   perf_crypto_hash \
221   perf_crypto_symmetric \
222   perf_malloc
223 endif
224
225 check_PROGRAMS = \
226  test_bio \
227  test_client \
228  test_common_allocation \
229  test_common_endian \
230  test_common_logging \
231  test_configuration \
232  test_container_bloomfilter \
233  test_container_meta_data \
234  test_container_multihashmap \
235  test_container_multihashmap32 \
236  test_container_multipeermap \
237  test_container_heap \
238  test_container_slist \
239  test_crypto_symmetric \
240  test_crypto_crc \
241  test_crypto_ecdsa \
242  test_crypto_eddsa \
243  test_crypto_ecdhe \
244  test_crypto_hash \
245  test_crypto_hkdf \
246  test_crypto_random \
247  test_disk \
248  test_getopt \
249  test_connection \
250  test_connection_addressing \
251  test_connection_receive_cancel \
252  test_connection_timeout \
253  test_connection_timeout_no_connect \
254  test_connection_transmit_cancel \
255  test_mq \
256  test_mq_client \
257  test_os_network \
258  test_peer \
259  test_plugin \
260  test_program \
261  test_resolver_api \
262  test_scheduler \
263  test_scheduler_delay \
264  test_server_mst_interrupt \
265  test_server \
266  test_server_disconnect \
267  test_server_with_client \
268  $(SERVER_CLIENT_UNIX) \
269  test_service \
270  test_strings \
271  test_strings_to_data \
272  test_time \
273  test_speedup \
274  $(BENCHMARKS) \
275  test_os_start_process \
276  test_common_logging_runtime_loglevels
277
278 if ENABLE_TEST_RUN
279 TESTS = $(check_PROGRAMS)
280 endif
281
282 test_bio_SOURCES = \
283  test_bio.c
284 test_bio_LDADD = \
285  $(top_builddir)/src/util/libgnunetutil.la
286
287
288 test_os_start_process_SOURCES = \
289  test_os_start_process.c
290 test_os_start_process_LDADD = \
291  $(top_builddir)/src/util/libgnunetutil.la
292 test_os_start_process_DEPENDENCIES = \
293  $(WINCAT)
294
295 test_client_SOURCES = \
296  test_client.c
297 test_client_LDADD = \
298  $(top_builddir)/src/util/libgnunetutil.la
299
300 test_common_allocation_SOURCES = \
301  test_common_allocation.c
302 test_common_allocation_LDADD = \
303  $(top_builddir)/src/util/libgnunetutil.la
304
305 test_common_endian_SOURCES = \
306  test_common_endian.c
307 test_common_endian_LDADD = \
308  $(top_builddir)/src/util/libgnunetutil.la
309
310 test_common_logging_SOURCES = \
311  test_common_logging.c
312 test_common_logging_LDADD = \
313  $(top_builddir)/src/util/libgnunetutil.la
314
315 test_common_logging_runtime_loglevels_SOURCES = \
316  test_common_logging_runtime_loglevels.c
317 test_common_logging_runtime_loglevels_LDADD = \
318  $(top_builddir)/src/util/libgnunetutil.la
319
320 test_configuration_SOURCES = \
321  test_configuration.c
322 test_configuration_LDADD = \
323  $(top_builddir)/src/util/libgnunetutil.la
324
325 test_container_bloomfilter_SOURCES = \
326  test_container_bloomfilter.c
327 test_container_bloomfilter_LDADD = \
328  $(top_builddir)/src/util/libgnunetutil.la
329
330 test_container_meta_data_SOURCES = \
331  test_container_meta_data.c
332 test_container_meta_data_LDADD = \
333  $(top_builddir)/src/util/libgnunetutil.la -lextractor
334
335 test_container_multihashmap_SOURCES = \
336  test_container_multihashmap.c
337 test_container_multihashmap_LDADD = \
338  $(top_builddir)/src/util/libgnunetutil.la
339
340 test_container_multihashmap32_SOURCES = \
341  test_container_multihashmap32.c
342 test_container_multihashmap32_LDADD = \
343  $(top_builddir)/src/util/libgnunetutil.la
344
345 test_container_multipeermap_SOURCES = \
346  test_container_multipeermap.c
347 test_container_multipeermap_LDADD = \
348  $(top_builddir)/src/util/libgnunetutil.la
349
350 test_container_heap_SOURCES = \
351  test_container_heap.c
352 test_container_heap_LDADD = \
353  $(top_builddir)/src/util/libgnunetutil.la
354
355 test_container_slist_SOURCES = \
356  test_container_slist.c
357 test_container_slist_LDADD = \
358  $(top_builddir)/src/util/libgnunetutil.la
359
360 test_crypto_symmetric_SOURCES = \
361  test_crypto_symmetric.c
362 test_crypto_symmetric_LDADD = \
363  $(top_builddir)/src/util/libgnunetutil.la
364
365 test_crypto_crc_SOURCES = \
366  test_crypto_crc.c
367 test_crypto_crc_LDADD = \
368  $(top_builddir)/src/util/libgnunetutil.la
369
370 test_crypto_ecdsa_SOURCES = \
371  test_crypto_ecdsa.c
372 test_crypto_ecdsa_LDADD = \
373  $(top_builddir)/src/util/libgnunetutil.la \
374  $(LIBGCRYPT_LIBS)
375
376 test_crypto_eddsa_SOURCES = \
377  test_crypto_eddsa.c
378 test_crypto_eddsa_LDADD = \
379  $(top_builddir)/src/util/libgnunetutil.la \
380  $(LIBGCRYPT_LIBS)
381
382 test_crypto_ecdhe_SOURCES = \
383  test_crypto_ecdhe.c
384 test_crypto_ecdhe_LDADD = \
385  $(top_builddir)/src/util/libgnunetutil.la \
386  $(LIBGCRYPT_LIBS)
387
388 test_crypto_hash_SOURCES = \
389  test_crypto_hash.c
390 test_crypto_hash_LDADD = \
391  $(top_builddir)/src/util/libgnunetutil.la
392
393 test_crypto_hkdf_SOURCES = \
394  test_crypto_hkdf.c
395 test_crypto_hkdf_LDADD = \
396  $(top_builddir)/src/util/libgnunetutil.la
397
398 test_crypto_random_SOURCES = \
399  test_crypto_random.c
400 test_crypto_random_LDADD = \
401  $(top_builddir)/src/util/libgnunetutil.la
402
403 test_disk_SOURCES = \
404  test_disk.c
405 test_disk_LDADD = \
406  $(top_builddir)/src/util/libgnunetutil.la
407
408 test_getopt_SOURCES = \
409  test_getopt.c
410 test_getopt_LDADD = \
411  $(top_builddir)/src/util/libgnunetutil.la
412
413 test_connection_SOURCES = \
414  test_connection.c
415 test_connection_LDADD = \
416  $(top_builddir)/src/util/libgnunetutil.la
417
418 test_connection_addressing_SOURCES = \
419  test_connection_addressing.c
420 test_connection_addressing_LDADD = \
421  $(top_builddir)/src/util/libgnunetutil.la
422
423 test_connection_receive_cancel_SOURCES = \
424  test_connection_receive_cancel.c
425 test_connection_receive_cancel_LDADD = \
426  $(top_builddir)/src/util/libgnunetutil.la
427
428 test_connection_timeout_SOURCES = \
429  test_connection_timeout.c
430 test_connection_timeout_LDADD = \
431  $(top_builddir)/src/util/libgnunetutil.la
432
433 test_connection_timeout_no_connect_SOURCES = \
434  test_connection_timeout_no_connect.c
435 test_connection_timeout_no_connect_LDADD = \
436  $(top_builddir)/src/util/libgnunetutil.la
437
438 test_connection_transmit_cancel_SOURCES = \
439  test_connection_transmit_cancel.c
440 test_connection_transmit_cancel_LDADD = \
441  $(top_builddir)/src/util/libgnunetutil.la
442
443 test_mq_SOURCES = \
444  test_mq.c
445 test_mq_LDADD = \
446  $(top_builddir)/src/util/libgnunetutil.la
447
448 test_mq_client_SOURCES = \
449  test_mq_client.c
450 test_mq_client_LDADD = \
451  $(top_builddir)/src/util/libgnunetutil.la
452
453 test_os_network_SOURCES = \
454  test_os_network.c
455 test_os_network_LDADD = \
456  $(top_builddir)/src/util/libgnunetutil.la
457
458 test_peer_SOURCES = \
459  test_peer.c
460 test_peer_LDADD = \
461 $(top_builddir)/src/util/libgnunetutil.la -lgcrypt
462
463 test_plugin_SOURCES = \
464  test_plugin.c
465 test_plugin_LDADD = \
466  $(top_builddir)/src/util/libgnunetutil.la
467
468 test_program_SOURCES = \
469  test_program.c
470 test_program_LDADD = \
471  $(top_builddir)/src/util/libgnunetutil.la
472
473 test_resolver_api_SOURCES = \
474  test_resolver_api.c
475 test_resolver_api_LDADD = \
476   $(top_builddir)/src/util/libgnunetutil.la
477
478 test_scheduler_SOURCES = \
479  test_scheduler.c
480 test_scheduler_LDADD = \
481  $(top_builddir)/src/util/libgnunetutil.la
482
483 test_scheduler_delay_SOURCES = \
484  test_scheduler_delay.c
485 test_scheduler_delay_LDADD = \
486  $(top_builddir)/src/util/libgnunetutil.la
487
488 test_server_mst_interrupt_SOURCES = \
489  test_server_mst_interrupt.c
490 test_server_mst_interrupt_LDADD = \
491  $(top_builddir)/src/util/libgnunetutil.la
492
493 test_server_SOURCES = \
494  test_server.c
495 test_server_LDADD = \
496  $(top_builddir)/src/util/libgnunetutil.la
497
498 test_server_disconnect_SOURCES = \
499  test_server_disconnect.c
500 test_server_disconnect_LDADD = \
501  $(top_builddir)/src/util/libgnunetutil.la
502
503 test_server_with_client_SOURCES = \
504  test_server_with_client.c
505 test_server_with_client_LDADD = \
506  $(top_builddir)/src/util/libgnunetutil.la
507
508 test_server_with_client_unix_SOURCES = \
509  test_server_with_client_unix.c
510 test_server_with_client_unix_LDADD = \
511  $(top_builddir)/src/util/libgnunetutil.la
512
513
514 test_service_SOURCES = \
515  test_service.c
516 test_service_LDADD = \
517  $(top_builddir)/src/util/libgnunetutil.la
518
519 test_strings_SOURCES = \
520  test_strings.c
521 test_strings_LDADD = \
522  $(top_builddir)/src/util/libgnunetutil.la
523
524
525 test_strings_to_data_SOURCES = \
526  test_strings_to_data.c
527 test_strings_to_data_LDADD = \
528  $(top_builddir)/src/util/libgnunetutil.la
529
530
531 test_time_SOURCES = \
532  test_time.c
533 test_time_LDADD = \
534  $(top_builddir)/src/util/libgnunetutil.la
535
536 test_speedup_SOURCES = \
537  test_speedup.c
538 test_speedup_LDADD = \
539  $(top_builddir)/src/util/libgnunetutil.la
540
541 perf_crypto_hash_SOURCES = \
542  perf_crypto_hash.c
543 perf_crypto_hash_LDADD = \
544  $(top_builddir)/src/util/libgnunetutil.la
545
546 perf_crypto_symmetric_SOURCES = \
547  perf_crypto_symmetric.c
548 perf_crypto_symmetric_LDADD = \
549  $(top_builddir)/src/util/libgnunetutil.la
550
551 perf_malloc_SOURCES = \
552  perf_malloc.c
553 perf_malloc_LDADD = \
554  $(top_builddir)/src/util/libgnunetutil.la
555
556
557 EXTRA_DIST = \
558   test_configuration_data.conf \
559   test_program_data.conf \
560   test_resolver_api_data.conf \
561   test_service_data.conf \
562   test_speedup_data.conf \
563   gnunet-qr.py.in