Added documenting comments
[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   libgnunetutil.la
47
48 noinst_PROGRAMS = \
49  gnunet-config-diff \
50  $(W32CAT) \
51  test_common_logging_dummy
52
53
54 gnunet_config_diff_SOURCES = \
55  gnunet-config-diff.c
56 gnunet_config_diff_LDADD = \
57  libgnunetutil.la
58
59 test_common_logging_dummy_SOURCES = \
60  test_common_logging_dummy.c
61 test_common_logging_dummy_LDADD = \
62  libgnunetutil.la
63
64 lib_LTLIBRARIES = libgnunetutil.la
65
66 libgnunetutil_la_SOURCES = \
67   bandwidth.c \
68   bio.c \
69   client.c \
70   client_manager.c \
71   common_allocation.c \
72   common_endian.c \
73   common_logging.c \
74   configuration.c \
75   connection.c \
76   container_bloomfilter.c \
77   container_heap.c \
78   container_meta_data.c \
79   container_multihashmap.c \
80   container_multipeermap.c \
81   container_multihashmap32.c \
82   crypto_symmetric.c \
83   crypto_crc.c \
84   crypto_ecc.c \
85   crypto_hash.c \
86   crypto_hkdf.c \
87   crypto_kdf.c \
88   crypto_mpi.c \
89   crypto_paillier.c \
90   crypto_random.c \
91   disk.c \
92   disk.h \
93   getopt.c \
94   getopt_helpers.c \
95   helper.c \
96   load.c \
97   mq.c \
98   network.c \
99   os_installation.c \
100   os_network.c \
101   os_priority.c \
102   peer.c \
103   plugin.c \
104   program.c \
105   resolver_api.c resolver.h \
106   scheduler.c \
107   server.c \
108   server_mst.c \
109   server_nc.c \
110   server_tc.c \
111   service.c \
112   signal.c \
113   strings.c \
114   time.c \
115   speedup.c speedup.h
116
117 libgnunetutil_la_LIBADD = \
118   $(GCLIBADD) $(WINLIB) \
119   $(LIBGCRYPT_LIBS) \
120   $(LTLIBICONV) \
121   $(LTLIBINTL) \
122   -lltdl $(Z_LIBS) -lunistring $(XLIB)
123
124 libgnunetutil_la_LDFLAGS = \
125   $(GN_LIB_LDFLAGS) \
126   -version-info 13:0:0
127
128 if HAVE_TESTING
129   GNUNET_ECC = gnunet-ecc
130   GNUNET_SCRYPT = gnunet-scrypt
131 endif
132
133
134 libexec_PROGRAMS = \
135  gnunet-service-resolver \
136  $(W32CONSOLEHELPER)
137
138 bin_SCRIPTS =\
139  gnunet-qr
140
141 bin_PROGRAMS = \
142  gnunet-resolver \
143  gnunet-config \
144  $(GNUNET_ECC) \
145  $(GNUNET_SCRYPT) \
146  gnunet-uri
147
148 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
149
150 gnunet-qr: gnunet-qr.py.in Makefile
151         $(do_subst) < gnunet-qr.py.in > gnunet-qr
152         chmod +x gnunet-qr
153
154 gnunet_service_resolver_SOURCES = \
155  gnunet-service-resolver.c
156 gnunet_service_resolver_LDADD = \
157   libgnunetutil.la \
158   $(GN_LIBINTL)
159
160
161 gnunet_resolver_SOURCES = \
162  gnunet-resolver.c
163 gnunet_resolver_LDADD = \
164   libgnunetutil.la \
165   $(GN_LIBINTL)
166
167
168 gnunet_ecc_SOURCES = \
169  gnunet-ecc.c
170 gnunet_ecc_LDADD = \
171   libgnunetutil.la \
172   $(GN_LIBINTL) -lgcrypt
173
174 gnunet_scrypt_SOURCES = \
175  gnunet-scrypt.c
176 gnunet_scrypt_LDADD = \
177   libgnunetutil.la \
178   $(GN_LIBINTL) -lgcrypt
179
180
181 gnunet_config_SOURCES = \
182  gnunet-config.c
183 gnunet_config_LDADD = \
184   libgnunetutil.la \
185   $(GN_LIBINTL)
186
187
188 gnunet_uri_SOURCES = \
189  gnunet-uri.c
190 gnunet_uri_LDADD = \
191   libgnunetutil.la \
192   $(GN_LIBINTL)
193
194 plugin_LTLIBRARIES = \
195   libgnunet_plugin_test.la
196
197 libgnunet_plugin_test_la_SOURCES = \
198   test_plugin_plug.c
199 libgnunet_plugin_test_la_LDFLAGS = \
200  $(GN_PLUGIN_LDFLAGS)
201
202 if HAVE_BENCHMARKS
203  BENCHMARKS = \
204   perf_crypto_hash \
205   perf_crypto_paillier \
206   perf_crypto_symmetric \
207   perf_malloc
208 endif
209
210 check_PROGRAMS = \
211  test_bio \
212  test_client.nc \
213  test_common_allocation \
214  test_common_endian \
215  test_common_logging \
216  test_configuration \
217  test_container_bloomfilter \
218  test_container_meta_data \
219  test_container_multihashmap \
220  test_container_multihashmap32 \
221  test_container_multipeermap \
222  test_container_heap \
223  test_crypto_symmetric \
224  test_crypto_crc \
225  test_crypto_ecdsa \
226  test_crypto_eddsa \
227  test_crypto_ecdhe \
228  test_crypto_hash \
229  test_crypto_hkdf \
230  test_crypto_paillier \
231  test_crypto_random \
232  test_disk \
233  test_getopt \
234  test_connection.nc \
235  test_connection_addressing.nc \
236  test_connection_receive_cancel.nc \
237  test_connection_timeout.nc \
238  test_connection_timeout_no_connect.nc \
239  test_connection_transmit_cancel.nc \
240  test_mq \
241  test_mq_client.nc \
242  test_os_network \
243  test_peer \
244  test_plugin \
245  test_program \
246  test_resolver_api.nc \
247  test_scheduler \
248  test_scheduler_delay \
249  test_server.nc \
250  test_server_disconnect.nc \
251  test_server_with_client.nc \
252  test_server_mst_interrupt.nc \
253  $(SERVER_CLIENT_UNIX) \
254  test_service \
255  test_strings \
256  test_strings_to_data \
257  test_time \
258  test_speedup \
259  $(BENCHMARKS) \
260  test_os_start_process \
261  test_common_logging_runtime_loglevels
262
263 if ENABLE_TEST_RUN
264 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
265 TESTS = $(check_PROGRAMS)
266 endif
267
268 # Declare .nc (NO-CONCURRENCY) as a test extension so that we can impart
269 # sequential execution order for them
270 TEST_EXTENSIONS = .nc
271 test_connection.log: test_client.log
272 test_connection_addressing.log: test_connection.log
273 test_connection_timeout_no_connect.log: test_connection_addressing.log
274 test_connection_transmit_cancel.log: test_connection_timeout_no_connect.log
275 test_connection_receive_cancel.log: test_connection_transmit_cancel.log
276 test_connection_timeout.log: test_connection_receive_cancel.log
277 test_mq_client.log: test_connection_timeout.log
278 test_resolver_api.log: test_mq_client.log
279 test_server.log: test_resolver_api.log
280 test_server_disconnect.log: test_server.log
281 test_server_with_client.log: test_server_disconnect.log
282 test_server_mst_interrupt.log: test_server_with_client.log
283
284 test_bio_SOURCES = \
285  test_bio.c
286 test_bio_LDADD = \
287  libgnunetutil.la
288
289
290 test_os_start_process_SOURCES = \
291  test_os_start_process.c
292 test_os_start_process_LDADD = \
293  libgnunetutil.la
294 test_os_start_process_DEPENDENCIES = \
295  libgnunetutil.la \
296  $(WINCAT)
297
298 test_client_nc_SOURCES = \
299  test_client.c
300 test_client_nc_LDADD = \
301  libgnunetutil.la
302
303 test_common_allocation_SOURCES = \
304  test_common_allocation.c
305 test_common_allocation_LDADD = \
306  libgnunetutil.la
307
308 test_common_endian_SOURCES = \
309  test_common_endian.c
310 test_common_endian_LDADD = \
311  libgnunetutil.la
312
313 test_common_logging_SOURCES = \
314  test_common_logging.c
315 test_common_logging_LDADD = \
316  libgnunetutil.la
317
318 test_common_logging_runtime_loglevels_SOURCES = \
319  test_common_logging_runtime_loglevels.c
320 test_common_logging_runtime_loglevels_LDADD = \
321  libgnunetutil.la
322
323 test_configuration_SOURCES = \
324  test_configuration.c
325 test_configuration_LDADD = \
326  libgnunetutil.la
327
328 test_container_bloomfilter_SOURCES = \
329  test_container_bloomfilter.c
330 test_container_bloomfilter_LDADD = \
331  libgnunetutil.la
332
333 test_container_meta_data_SOURCES = \
334  test_container_meta_data.c
335 test_container_meta_data_LDADD = \
336  libgnunetutil.la -lextractor
337
338 test_container_multihashmap_SOURCES = \
339  test_container_multihashmap.c
340 test_container_multihashmap_LDADD = \
341  libgnunetutil.la
342
343 test_container_multihashmap32_SOURCES = \
344  test_container_multihashmap32.c
345 test_container_multihashmap32_LDADD = \
346  libgnunetutil.la
347
348 test_container_multipeermap_SOURCES = \
349  test_container_multipeermap.c
350 test_container_multipeermap_LDADD = \
351  libgnunetutil.la
352
353 test_container_heap_SOURCES = \
354  test_container_heap.c
355 test_container_heap_LDADD = \
356  libgnunetutil.la
357
358 test_crypto_symmetric_SOURCES = \
359  test_crypto_symmetric.c
360 test_crypto_symmetric_LDADD = \
361  libgnunetutil.la
362
363 test_crypto_crc_SOURCES = \
364  test_crypto_crc.c
365 test_crypto_crc_LDADD = \
366  libgnunetutil.la
367
368 test_crypto_ecdsa_SOURCES = \
369  test_crypto_ecdsa.c
370 test_crypto_ecdsa_LDADD = \
371  libgnunetutil.la \
372  $(LIBGCRYPT_LIBS)
373
374 test_crypto_eddsa_SOURCES = \
375  test_crypto_eddsa.c
376 test_crypto_eddsa_LDADD = \
377  libgnunetutil.la \
378  $(LIBGCRYPT_LIBS)
379
380 test_crypto_ecdhe_SOURCES = \
381  test_crypto_ecdhe.c
382 test_crypto_ecdhe_LDADD = \
383  libgnunetutil.la \
384  $(LIBGCRYPT_LIBS)
385
386 test_crypto_hash_SOURCES = \
387  test_crypto_hash.c
388 test_crypto_hash_LDADD = \
389  libgnunetutil.la
390
391 test_crypto_hkdf_SOURCES = \
392  test_crypto_hkdf.c
393 test_crypto_hkdf_LDADD = \
394  libgnunetutil.la
395
396 test_crypto_paillier_SOURCES = \
397  test_crypto_paillier.c
398 test_crypto_paillier_LDADD = \
399  $(LIBGCRYPT_LIBS) \
400  libgnunetutil.la
401
402 test_crypto_random_SOURCES = \
403  test_crypto_random.c
404 test_crypto_random_LDADD = \
405  libgnunetutil.la
406
407 test_disk_SOURCES = \
408  test_disk.c
409 test_disk_LDADD = \
410  libgnunetutil.la
411
412 test_getopt_SOURCES = \
413  test_getopt.c
414 test_getopt_LDADD = \
415  libgnunetutil.la
416
417 test_connection_nc_SOURCES = \
418  test_connection.c
419 test_connection_nc_LDADD = \
420  libgnunetutil.la
421
422 test_connection_addressing_nc_SOURCES = \
423  test_connection_addressing.c
424 test_connection_addressing_nc_LDADD = \
425  libgnunetutil.la
426
427 test_connection_receive_cancel_nc_SOURCES = \
428  test_connection_receive_cancel.c
429 test_connection_receive_cancel_nc_LDADD = \
430  libgnunetutil.la
431
432 test_connection_timeout_nc_SOURCES = \
433  test_connection_timeout.c
434 test_connection_timeout_nc_LDADD = \
435  libgnunetutil.la
436
437 test_connection_timeout_no_connect_nc_SOURCES = \
438  test_connection_timeout_no_connect.c
439 test_connection_timeout_no_connect_nc_LDADD = \
440  libgnunetutil.la
441
442 test_connection_transmit_cancel_nc_SOURCES = \
443  test_connection_transmit_cancel.c
444 test_connection_transmit_cancel_nc_LDADD = \
445  libgnunetutil.la
446
447 test_mq_SOURCES = \
448  test_mq.c
449 test_mq_LDADD = \
450  libgnunetutil.la
451
452 test_mq_client_nc_SOURCES = \
453  test_mq_client.c
454 test_mq_client_nc_LDADD = \
455  libgnunetutil.la
456
457 test_os_network_SOURCES = \
458  test_os_network.c
459 test_os_network_LDADD = \
460  libgnunetutil.la
461
462 test_peer_SOURCES = \
463  test_peer.c
464 test_peer_LDADD = \
465  libgnunetutil.la -lgcrypt
466
467 test_plugin_SOURCES = \
468  test_plugin.c
469 test_plugin_LDADD = \
470  libgnunetutil.la
471
472 test_program_SOURCES = \
473  test_program.c
474 test_program_LDADD = \
475  libgnunetutil.la
476
477 test_resolver_api_nc_SOURCES = \
478  test_resolver_api.c
479 test_resolver_api_nc_LDADD = \
480  libgnunetutil.la
481
482 test_scheduler_SOURCES = \
483  test_scheduler.c
484 test_scheduler_LDADD = \
485  libgnunetutil.la
486
487 test_scheduler_delay_SOURCES = \
488  test_scheduler_delay.c
489 test_scheduler_delay_LDADD = \
490  libgnunetutil.la
491
492 test_server_mst_interrupt_nc_SOURCES = \
493  test_server_mst_interrupt.c
494 test_server_mst_interrupt_nc_LDADD = \
495  libgnunetutil.la
496
497 test_server_nc_SOURCES = \
498  test_server.c
499 test_server_nc_LDADD = \
500  libgnunetutil.la
501
502 test_server_disconnect_nc_SOURCES = \
503  test_server_disconnect.c
504 test_server_disconnect_nc_LDADD = \
505  libgnunetutil.la
506
507 test_server_with_client_nc_SOURCES = \
508  test_server_with_client.c
509 test_server_with_client_nc_LDADD = \
510  libgnunetutil.la
511
512 test_server_with_client_unix_SOURCES = \
513  test_server_with_client_unix.c
514 test_server_with_client_unix_LDADD = \
515  libgnunetutil.la
516
517
518 test_service_SOURCES = \
519  test_service.c
520 test_service_LDADD = \
521  libgnunetutil.la
522
523 test_strings_SOURCES = \
524  test_strings.c
525 test_strings_LDADD = \
526  libgnunetutil.la
527
528
529 test_strings_to_data_SOURCES = \
530  test_strings_to_data.c
531 test_strings_to_data_LDADD = \
532  libgnunetutil.la
533
534
535 test_time_SOURCES = \
536  test_time.c
537 test_time_LDADD = \
538  libgnunetutil.la
539
540 test_speedup_SOURCES = \
541  test_speedup.c
542 test_speedup_LDADD = \
543  libgnunetutil.la
544
545 perf_crypto_hash_SOURCES = \
546  perf_crypto_hash.c
547 perf_crypto_hash_LDADD = \
548  libgnunetutil.la
549
550 perf_crypto_symmetric_SOURCES = \
551  perf_crypto_symmetric.c
552 perf_crypto_symmetric_LDADD = \
553  libgnunetutil.la
554
555 perf_crypto_paillier_SOURCES = \
556  perf_crypto_paillier.c
557 perf_crypto_paillier_LDADD = \
558  libgnunetutil.la \
559  -lgcrypt
560
561 perf_malloc_SOURCES = \
562  perf_malloc.c
563 perf_malloc_LDADD = \
564  libgnunetutil.la
565
566
567 EXTRA_DIST = \
568   test_configuration_data.conf \
569   test_program_data.conf \
570   test_resolver_api_data.conf \
571   test_service_data.conf \
572   test_speedup_data.conf \
573   gnunet-qr.py.in