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