-fix time assertion introduce in last patch
[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 \
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 \
254  test_connection_addressing \
255  test_connection_receive_cancel \
256  test_connection_timeout \
257  test_connection_timeout_no_connect \
258  test_connection_transmit_cancel \
259  test_mq \
260  test_mq_client \
261  test_os_network \
262  test_peer \
263  test_plugin \
264  test_program \
265  test_resolver_api \
266  test_scheduler \
267  test_scheduler_delay \
268  test_server_mst_interrupt \
269  test_server \
270  test_server_disconnect \
271  test_server_with_client \
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 test_bio_SOURCES = \
288  test_bio.c
289 test_bio_LDADD = \
290  $(top_builddir)/src/util/libgnunetutil.la
291
292
293 test_os_start_process_SOURCES = \
294  test_os_start_process.c
295 test_os_start_process_LDADD = \
296  $(top_builddir)/src/util/libgnunetutil.la
297 test_os_start_process_DEPENDENCIES = \
298  $(WINCAT)
299
300 test_client_SOURCES = \
301  test_client.c
302 test_client_LDADD = \
303  $(top_builddir)/src/util/libgnunetutil.la
304
305 test_common_allocation_SOURCES = \
306  test_common_allocation.c
307 test_common_allocation_LDADD = \
308  $(top_builddir)/src/util/libgnunetutil.la
309
310 test_common_endian_SOURCES = \
311  test_common_endian.c
312 test_common_endian_LDADD = \
313  $(top_builddir)/src/util/libgnunetutil.la
314
315 test_common_logging_SOURCES = \
316  test_common_logging.c
317 test_common_logging_LDADD = \
318  $(top_builddir)/src/util/libgnunetutil.la
319
320 test_common_logging_runtime_loglevels_SOURCES = \
321  test_common_logging_runtime_loglevels.c
322 test_common_logging_runtime_loglevels_LDADD = \
323  $(top_builddir)/src/util/libgnunetutil.la
324
325 test_configuration_SOURCES = \
326  test_configuration.c
327 test_configuration_LDADD = \
328  $(top_builddir)/src/util/libgnunetutil.la
329
330 test_container_bloomfilter_SOURCES = \
331  test_container_bloomfilter.c
332 test_container_bloomfilter_LDADD = \
333  $(top_builddir)/src/util/libgnunetutil.la
334
335 test_container_meta_data_SOURCES = \
336  test_container_meta_data.c
337 test_container_meta_data_LDADD = \
338  $(top_builddir)/src/util/libgnunetutil.la -lextractor
339
340 test_container_multihashmap_SOURCES = \
341  test_container_multihashmap.c
342 test_container_multihashmap_LDADD = \
343  $(top_builddir)/src/util/libgnunetutil.la
344
345 test_container_multihashmap32_SOURCES = \
346  test_container_multihashmap32.c
347 test_container_multihashmap32_LDADD = \
348  $(top_builddir)/src/util/libgnunetutil.la
349
350 test_container_multipeermap_SOURCES = \
351  test_container_multipeermap.c
352 test_container_multipeermap_LDADD = \
353  $(top_builddir)/src/util/libgnunetutil.la
354
355 test_container_heap_SOURCES = \
356  test_container_heap.c
357 test_container_heap_LDADD = \
358  $(top_builddir)/src/util/libgnunetutil.la
359
360 test_container_slist_SOURCES = \
361  test_container_slist.c
362 test_container_slist_LDADD = \
363  $(top_builddir)/src/util/libgnunetutil.la
364
365 test_crypto_symmetric_SOURCES = \
366  test_crypto_symmetric.c
367 test_crypto_symmetric_LDADD = \
368  $(top_builddir)/src/util/libgnunetutil.la
369
370 test_crypto_crc_SOURCES = \
371  test_crypto_crc.c
372 test_crypto_crc_LDADD = \
373  $(top_builddir)/src/util/libgnunetutil.la
374
375 test_crypto_ecdsa_SOURCES = \
376  test_crypto_ecdsa.c
377 test_crypto_ecdsa_LDADD = \
378  $(top_builddir)/src/util/libgnunetutil.la \
379  $(LIBGCRYPT_LIBS)
380
381 test_crypto_eddsa_SOURCES = \
382  test_crypto_eddsa.c
383 test_crypto_eddsa_LDADD = \
384  $(top_builddir)/src/util/libgnunetutil.la \
385  $(LIBGCRYPT_LIBS)
386
387 test_crypto_ecdhe_SOURCES = \
388  test_crypto_ecdhe.c
389 test_crypto_ecdhe_LDADD = \
390  $(top_builddir)/src/util/libgnunetutil.la \
391  $(LIBGCRYPT_LIBS)
392
393 test_crypto_hash_SOURCES = \
394  test_crypto_hash.c
395 test_crypto_hash_LDADD = \
396  $(top_builddir)/src/util/libgnunetutil.la
397
398 test_crypto_hkdf_SOURCES = \
399  test_crypto_hkdf.c
400 test_crypto_hkdf_LDADD = \
401  $(top_builddir)/src/util/libgnunetutil.la
402
403 test_crypto_paillier_SOURCES = \
404  test_crypto_paillier.c
405 test_crypto_paillier_LDADD = \
406  $(LIBGCRYPT_LIBS) \
407  $(top_builddir)/src/util/libgnunetutil.la
408
409 test_crypto_random_SOURCES = \
410  test_crypto_random.c
411 test_crypto_random_LDADD = \
412  $(top_builddir)/src/util/libgnunetutil.la
413
414 test_disk_SOURCES = \
415  test_disk.c
416 test_disk_LDADD = \
417  $(top_builddir)/src/util/libgnunetutil.la
418
419 test_getopt_SOURCES = \
420  test_getopt.c
421 test_getopt_LDADD = \
422  $(top_builddir)/src/util/libgnunetutil.la
423
424 test_connection_SOURCES = \
425  test_connection.c
426 test_connection_LDADD = \
427  $(top_builddir)/src/util/libgnunetutil.la
428
429 test_connection_addressing_SOURCES = \
430  test_connection_addressing.c
431 test_connection_addressing_LDADD = \
432  $(top_builddir)/src/util/libgnunetutil.la
433
434 test_connection_receive_cancel_SOURCES = \
435  test_connection_receive_cancel.c
436 test_connection_receive_cancel_LDADD = \
437  $(top_builddir)/src/util/libgnunetutil.la
438
439 test_connection_timeout_SOURCES = \
440  test_connection_timeout.c
441 test_connection_timeout_LDADD = \
442  $(top_builddir)/src/util/libgnunetutil.la
443
444 test_connection_timeout_no_connect_SOURCES = \
445  test_connection_timeout_no_connect.c
446 test_connection_timeout_no_connect_LDADD = \
447  $(top_builddir)/src/util/libgnunetutil.la
448
449 test_connection_transmit_cancel_SOURCES = \
450  test_connection_transmit_cancel.c
451 test_connection_transmit_cancel_LDADD = \
452  $(top_builddir)/src/util/libgnunetutil.la
453
454 test_mq_SOURCES = \
455  test_mq.c
456 test_mq_LDADD = \
457  $(top_builddir)/src/util/libgnunetutil.la
458
459 test_mq_client_SOURCES = \
460  test_mq_client.c
461 test_mq_client_LDADD = \
462  $(top_builddir)/src/util/libgnunetutil.la
463
464 test_os_network_SOURCES = \
465  test_os_network.c
466 test_os_network_LDADD = \
467  $(top_builddir)/src/util/libgnunetutil.la
468
469 test_peer_SOURCES = \
470  test_peer.c
471 test_peer_LDADD = \
472 $(top_builddir)/src/util/libgnunetutil.la -lgcrypt
473
474 test_plugin_SOURCES = \
475  test_plugin.c
476 test_plugin_LDADD = \
477  $(top_builddir)/src/util/libgnunetutil.la
478
479 test_program_SOURCES = \
480  test_program.c
481 test_program_LDADD = \
482  $(top_builddir)/src/util/libgnunetutil.la
483
484 test_resolver_api_SOURCES = \
485  test_resolver_api.c
486 test_resolver_api_LDADD = \
487   $(top_builddir)/src/util/libgnunetutil.la
488
489 test_scheduler_SOURCES = \
490  test_scheduler.c
491 test_scheduler_LDADD = \
492  $(top_builddir)/src/util/libgnunetutil.la
493
494 test_scheduler_delay_SOURCES = \
495  test_scheduler_delay.c
496 test_scheduler_delay_LDADD = \
497  $(top_builddir)/src/util/libgnunetutil.la
498
499 test_server_mst_interrupt_SOURCES = \
500  test_server_mst_interrupt.c
501 test_server_mst_interrupt_LDADD = \
502  $(top_builddir)/src/util/libgnunetutil.la
503
504 test_server_SOURCES = \
505  test_server.c
506 test_server_LDADD = \
507  $(top_builddir)/src/util/libgnunetutil.la
508
509 test_server_disconnect_SOURCES = \
510  test_server_disconnect.c
511 test_server_disconnect_LDADD = \
512  $(top_builddir)/src/util/libgnunetutil.la
513
514 test_server_with_client_SOURCES = \
515  test_server_with_client.c
516 test_server_with_client_LDADD = \
517  $(top_builddir)/src/util/libgnunetutil.la
518
519 test_server_with_client_unix_SOURCES = \
520  test_server_with_client_unix.c
521 test_server_with_client_unix_LDADD = \
522  $(top_builddir)/src/util/libgnunetutil.la
523
524
525 test_service_SOURCES = \
526  test_service.c
527 test_service_LDADD = \
528  $(top_builddir)/src/util/libgnunetutil.la
529
530 test_strings_SOURCES = \
531  test_strings.c
532 test_strings_LDADD = \
533  $(top_builddir)/src/util/libgnunetutil.la
534
535
536 test_strings_to_data_SOURCES = \
537  test_strings_to_data.c
538 test_strings_to_data_LDADD = \
539  $(top_builddir)/src/util/libgnunetutil.la
540
541
542 test_time_SOURCES = \
543  test_time.c
544 test_time_LDADD = \
545  $(top_builddir)/src/util/libgnunetutil.la
546
547 test_speedup_SOURCES = \
548  test_speedup.c
549 test_speedup_LDADD = \
550  $(top_builddir)/src/util/libgnunetutil.la
551
552 perf_crypto_hash_SOURCES = \
553  perf_crypto_hash.c
554 perf_crypto_hash_LDADD = \
555  $(top_builddir)/src/util/libgnunetutil.la
556
557 perf_crypto_symmetric_SOURCES = \
558  perf_crypto_symmetric.c
559 perf_crypto_symmetric_LDADD = \
560  $(top_builddir)/src/util/libgnunetutil.la
561
562 perf_malloc_SOURCES = \
563  perf_malloc.c
564 perf_malloc_LDADD = \
565  $(top_builddir)/src/util/libgnunetutil.la
566
567
568 EXTRA_DIST = \
569   test_configuration_data.conf \
570   test_program_data.conf \
571   test_resolver_api_data.conf \
572   test_service_data.conf \
573   test_speedup_data.conf \
574   gnunet-qr.py.in