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