test + documentation
[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 endif
135
136
137 libexec_PROGRAMS = \
138  gnunet-service-resolver \
139  $(W32CONSOLEHELPER)
140
141 bin_SCRIPTS =\
142  gnunet-qr
143
144 bin_PROGRAMS = \
145  gnunet-resolver \
146  gnunet-config \
147  $(GNUNET_ECC) \
148  gnunet-uri
149
150 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
151
152 gnunet-qr: gnunet-qr.py.in Makefile
153         $(do_subst) < gnunet-qr.py.in > gnunet-qr
154         chmod +x gnunet-qr
155
156 gnunet_service_resolver_SOURCES = \
157  gnunet-service-resolver.c
158 gnunet_service_resolver_LDADD = \
159   $(top_builddir)/src/util/libgnunetutil.la \
160   $(GN_LIBINTL)
161 gnunet_service_resolver_DEPENDENCIES = \
162   libgnunetutil.la
163
164
165 gnunet_resolver_SOURCES = \
166  gnunet-resolver.c
167 gnunet_resolver_LDADD = \
168   $(top_builddir)/src/util/libgnunetutil.la \
169   $(GN_LIBINTL)
170 gnunet_resolver_DEPENDENCIES = \
171   libgnunetutil.la
172
173
174 gnunet_ecc_SOURCES = \
175  gnunet-ecc.c
176 gnunet_ecc_LDADD = \
177   $(top_builddir)/src/util/libgnunetutil.la \
178   $(GN_LIBINTL) -lgcrypt
179 gnunet_ecc_DEPENDENCIES = \
180   libgnunetutil.la
181
182
183 gnunet_config_SOURCES = \
184  gnunet-config.c
185 gnunet_config_LDADD = \
186   $(top_builddir)/src/util/libgnunetutil.la \
187   $(GN_LIBINTL)
188 gnunet_config_DEPENDENCIES = \
189   libgnunetutil.la
190
191
192 gnunet_uri_SOURCES = \
193  gnunet-uri.c
194 gnunet_uri_LDADD = \
195   $(top_builddir)/src/util/libgnunetutil.la \
196   $(GN_LIBINTL)
197 gnunet_uri_DEPENDENCIES = \
198   libgnunetutil.la
199
200 plugin_LTLIBRARIES = \
201   libgnunet_plugin_test.la
202
203 libgnunet_plugin_test_la_SOURCES = \
204   test_plugin_plug.c
205 libgnunet_plugin_test_la_LDFLAGS = \
206  $(GN_PLUGIN_LDFLAGS)
207
208 if HAVE_BENCHMARKS
209  BENCHMARKS = \
210   perf_crypto_hash \
211   perf_crypto_symmetric \
212   perf_malloc
213 endif
214
215 check_PROGRAMS = \
216  test_bio \
217  test_client \
218  test_common_allocation \
219  test_common_endian \
220  test_common_logging \
221  test_configuration \
222  test_container_bloomfilter \
223  test_container_meta_data \
224  test_container_multihashmap \
225  test_container_multihashmap32 \
226  test_container_multipeermap \
227  test_container_heap \
228  test_container_slist \
229  test_crypto_symmetric \
230  test_crypto_crc \
231  test_crypto_ecdsa \
232  test_crypto_eddsa \
233  test_crypto_ecdhe \
234  test_crypto_hash \
235  test_crypto_hkdf \
236  test_crypto_random \
237  test_disk \
238  test_getopt \
239  test_connection \
240  test_connection_addressing \
241  test_connection_receive_cancel \
242  test_connection_timeout \
243  test_connection_timeout_no_connect \
244  test_connection_transmit_cancel \
245  test_mq \
246  test_mq_client \
247  test_os_network \
248  test_peer \
249  test_plugin \
250  test_program \
251  test_resolver_api \
252  test_scheduler \
253  test_scheduler_delay \
254  test_server_mst_interrupt \
255  test_server \
256  test_server_disconnect \
257  test_server_with_client \
258  $(SERVER_CLIENT_UNIX) \
259  test_service \
260  test_strings \
261  test_strings_to_data \
262  test_time \
263  test_speedup \
264  $(BENCHMARKS) \
265  test_os_start_process \
266  test_common_logging_runtime_loglevels
267
268 if ENABLE_TEST_RUN
269 TESTS = $(check_PROGRAMS)
270 endif
271
272 test_bio_SOURCES = \
273  test_bio.c
274 test_bio_LDADD = \
275  $(top_builddir)/src/util/libgnunetutil.la
276
277
278 test_os_start_process_SOURCES = \
279  test_os_start_process.c
280 test_os_start_process_LDADD = \
281  $(top_builddir)/src/util/libgnunetutil.la
282 test_os_start_process_DEPENDENCIES = \
283  $(WINCAT)
284
285 test_client_SOURCES = \
286  test_client.c
287 test_client_LDADD = \
288  $(top_builddir)/src/util/libgnunetutil.la
289
290 test_common_allocation_SOURCES = \
291  test_common_allocation.c
292 test_common_allocation_LDADD = \
293  $(top_builddir)/src/util/libgnunetutil.la
294
295 test_common_endian_SOURCES = \
296  test_common_endian.c
297 test_common_endian_LDADD = \
298  $(top_builddir)/src/util/libgnunetutil.la
299
300 test_common_logging_SOURCES = \
301  test_common_logging.c
302 test_common_logging_LDADD = \
303  $(top_builddir)/src/util/libgnunetutil.la
304
305 test_common_logging_runtime_loglevels_SOURCES = \
306  test_common_logging_runtime_loglevels.c
307 test_common_logging_runtime_loglevels_LDADD = \
308  $(top_builddir)/src/util/libgnunetutil.la
309
310 test_configuration_SOURCES = \
311  test_configuration.c
312 test_configuration_LDADD = \
313  $(top_builddir)/src/util/libgnunetutil.la
314
315 test_container_bloomfilter_SOURCES = \
316  test_container_bloomfilter.c
317 test_container_bloomfilter_LDADD = \
318  $(top_builddir)/src/util/libgnunetutil.la
319
320 test_container_meta_data_SOURCES = \
321  test_container_meta_data.c
322 test_container_meta_data_LDADD = \
323  $(top_builddir)/src/util/libgnunetutil.la -lextractor
324
325 test_container_multihashmap_SOURCES = \
326  test_container_multihashmap.c
327 test_container_multihashmap_LDADD = \
328  $(top_builddir)/src/util/libgnunetutil.la
329
330 test_container_multihashmap32_SOURCES = \
331  test_container_multihashmap32.c
332 test_container_multihashmap32_LDADD = \
333  $(top_builddir)/src/util/libgnunetutil.la
334
335 test_container_multipeermap_SOURCES = \
336  test_container_multipeermap.c
337 test_container_multipeermap_LDADD = \
338  $(top_builddir)/src/util/libgnunetutil.la
339
340 test_container_heap_SOURCES = \
341  test_container_heap.c
342 test_container_heap_LDADD = \
343  $(top_builddir)/src/util/libgnunetutil.la
344
345 test_container_slist_SOURCES = \
346  test_container_slist.c
347 test_container_slist_LDADD = \
348  $(top_builddir)/src/util/libgnunetutil.la
349
350 test_crypto_symmetric_SOURCES = \
351  test_crypto_symmetric.c
352 test_crypto_symmetric_LDADD = \
353  $(top_builddir)/src/util/libgnunetutil.la
354
355 test_crypto_crc_SOURCES = \
356  test_crypto_crc.c
357 test_crypto_crc_LDADD = \
358  $(top_builddir)/src/util/libgnunetutil.la
359
360 test_crypto_ecdsa_SOURCES = \
361  test_crypto_ecdsa.c
362 test_crypto_ecdsa_LDADD = \
363  $(top_builddir)/src/util/libgnunetutil.la \
364  $(LIBGCRYPT_LIBS)
365
366 test_crypto_eddsa_SOURCES = \
367  test_crypto_eddsa.c
368 test_crypto_eddsa_LDADD = \
369  $(top_builddir)/src/util/libgnunetutil.la \
370  $(LIBGCRYPT_LIBS)
371
372 test_crypto_ecdhe_SOURCES = \
373  test_crypto_ecdhe.c
374 test_crypto_ecdhe_LDADD = \
375  $(top_builddir)/src/util/libgnunetutil.la \
376  $(LIBGCRYPT_LIBS)
377
378 test_crypto_hash_SOURCES = \
379  test_crypto_hash.c
380 test_crypto_hash_LDADD = \
381  $(top_builddir)/src/util/libgnunetutil.la
382
383 test_crypto_hkdf_SOURCES = \
384  test_crypto_hkdf.c
385 test_crypto_hkdf_LDADD = \
386  $(top_builddir)/src/util/libgnunetutil.la
387
388 test_crypto_random_SOURCES = \
389  test_crypto_random.c
390 test_crypto_random_LDADD = \
391  $(top_builddir)/src/util/libgnunetutil.la
392
393 test_disk_SOURCES = \
394  test_disk.c
395 test_disk_LDADD = \
396  $(top_builddir)/src/util/libgnunetutil.la
397
398 test_getopt_SOURCES = \
399  test_getopt.c
400 test_getopt_LDADD = \
401  $(top_builddir)/src/util/libgnunetutil.la
402
403 test_connection_SOURCES = \
404  test_connection.c
405 test_connection_LDADD = \
406  $(top_builddir)/src/util/libgnunetutil.la
407
408 test_connection_addressing_SOURCES = \
409  test_connection_addressing.c
410 test_connection_addressing_LDADD = \
411  $(top_builddir)/src/util/libgnunetutil.la
412
413 test_connection_receive_cancel_SOURCES = \
414  test_connection_receive_cancel.c
415 test_connection_receive_cancel_LDADD = \
416  $(top_builddir)/src/util/libgnunetutil.la
417
418 test_connection_timeout_SOURCES = \
419  test_connection_timeout.c
420 test_connection_timeout_LDADD = \
421  $(top_builddir)/src/util/libgnunetutil.la
422
423 test_connection_timeout_no_connect_SOURCES = \
424  test_connection_timeout_no_connect.c
425 test_connection_timeout_no_connect_LDADD = \
426  $(top_builddir)/src/util/libgnunetutil.la
427
428 test_connection_transmit_cancel_SOURCES = \
429  test_connection_transmit_cancel.c
430 test_connection_transmit_cancel_LDADD = \
431  $(top_builddir)/src/util/libgnunetutil.la
432
433 test_mq_SOURCES = \
434  test_mq.c
435 test_mq_LDADD = \
436  $(top_builddir)/src/util/libgnunetutil.la
437
438 test_mq_client_SOURCES = \
439  test_mq_client.c
440 test_mq_client_LDADD = \
441  $(top_builddir)/src/util/libgnunetutil.la
442
443 test_os_network_SOURCES = \
444  test_os_network.c
445 test_os_network_LDADD = \
446  $(top_builddir)/src/util/libgnunetutil.la
447
448 test_peer_SOURCES = \
449  test_peer.c
450 test_peer_LDADD = \
451 $(top_builddir)/src/util/libgnunetutil.la -lgcrypt
452
453 test_plugin_SOURCES = \
454  test_plugin.c
455 test_plugin_LDADD = \
456  $(top_builddir)/src/util/libgnunetutil.la
457
458 test_program_SOURCES = \
459  test_program.c
460 test_program_LDADD = \
461  $(top_builddir)/src/util/libgnunetutil.la
462
463 test_resolver_api_SOURCES = \
464  test_resolver_api.c
465 test_resolver_api_LDADD = \
466   $(top_builddir)/src/util/libgnunetutil.la
467
468 test_scheduler_SOURCES = \
469  test_scheduler.c
470 test_scheduler_LDADD = \
471  $(top_builddir)/src/util/libgnunetutil.la
472
473 test_scheduler_delay_SOURCES = \
474  test_scheduler_delay.c
475 test_scheduler_delay_LDADD = \
476  $(top_builddir)/src/util/libgnunetutil.la
477
478 test_server_mst_interrupt_SOURCES = \
479  test_server_mst_interrupt.c
480 test_server_mst_interrupt_LDADD = \
481  $(top_builddir)/src/util/libgnunetutil.la
482
483 test_server_SOURCES = \
484  test_server.c
485 test_server_LDADD = \
486  $(top_builddir)/src/util/libgnunetutil.la
487
488 test_server_disconnect_SOURCES = \
489  test_server_disconnect.c
490 test_server_disconnect_LDADD = \
491  $(top_builddir)/src/util/libgnunetutil.la
492
493 test_server_with_client_SOURCES = \
494  test_server_with_client.c
495 test_server_with_client_LDADD = \
496  $(top_builddir)/src/util/libgnunetutil.la
497
498 test_server_with_client_unix_SOURCES = \
499  test_server_with_client_unix.c
500 test_server_with_client_unix_LDADD = \
501  $(top_builddir)/src/util/libgnunetutil.la
502
503
504 test_service_SOURCES = \
505  test_service.c
506 test_service_LDADD = \
507  $(top_builddir)/src/util/libgnunetutil.la
508
509 test_strings_SOURCES = \
510  test_strings.c
511 test_strings_LDADD = \
512  $(top_builddir)/src/util/libgnunetutil.la
513
514
515 test_strings_to_data_SOURCES = \
516  test_strings_to_data.c
517 test_strings_to_data_LDADD = \
518  $(top_builddir)/src/util/libgnunetutil.la
519
520
521 test_time_SOURCES = \
522  test_time.c
523 test_time_LDADD = \
524  $(top_builddir)/src/util/libgnunetutil.la
525
526 test_speedup_SOURCES = \
527  test_speedup.c
528 test_speedup_LDADD = \
529  $(top_builddir)/src/util/libgnunetutil.la
530
531 perf_crypto_hash_SOURCES = \
532  perf_crypto_hash.c
533 perf_crypto_hash_LDADD = \
534  $(top_builddir)/src/util/libgnunetutil.la
535
536 perf_crypto_symmetric_SOURCES = \
537  perf_crypto_symmetric.c
538 perf_crypto_symmetric_LDADD = \
539  $(top_builddir)/src/util/libgnunetutil.la
540
541 perf_malloc_SOURCES = \
542  perf_malloc.c
543 perf_malloc_LDADD = \
544  $(top_builddir)/src/util/libgnunetutil.la
545
546
547 EXTRA_DIST = \
548   test_configuration_data.conf \
549   test_program_data.conf \
550   test_resolver_api_data.conf \
551   test_service_data.conf \
552   test_speedup_data.conf \
553   gnunet-qr.py.in