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