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