Update plibc header
[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_ecc \
214  test_crypto_hash \
215  test_crypto_hkdf \
216  test_crypto_random \
217  test_disk \
218  test_getopt \
219  test_connection \
220  test_connection_addressing \
221  test_connection_receive_cancel \
222  test_connection_timeout \
223  test_connection_timeout_no_connect \
224  test_connection_transmit_cancel \
225  test_mq \
226  test_mq_client \
227  test_os_network \
228  test_peer \
229  test_plugin \
230  test_program \
231  test_resolver_api \
232  test_scheduler \
233  test_scheduler_delay \
234  test_server_mst_interrupt \
235  test_server \
236  test_server_disconnect \
237  test_server_with_client \
238  $(SERVER_CLIENT_UNIX) \
239  test_service \
240  test_strings \
241  test_strings_to_data \
242  test_time \
243  test_speedup \
244  $(BENCHMARKS) \
245  test_os_start_process \
246  test_common_logging_runtime_loglevels
247
248 if ENABLE_TEST_RUN
249 TESTS = $(check_PROGRAMS)
250 endif
251
252 test_bio_SOURCES = \
253  test_bio.c
254 test_bio_LDADD = \
255  $(top_builddir)/src/util/libgnunetutil.la
256
257
258 test_os_start_process_SOURCES = \
259  test_os_start_process.c
260 test_os_start_process_LDADD = \
261  $(top_builddir)/src/util/libgnunetutil.la
262 test_os_start_process_DEPENDENCIES = \
263  $(WINCAT)
264
265 test_client_SOURCES = \
266  test_client.c
267 test_client_LDADD = \
268  $(top_builddir)/src/util/libgnunetutil.la  
269
270 test_common_allocation_SOURCES = \
271  test_common_allocation.c
272 test_common_allocation_LDADD = \
273  $(top_builddir)/src/util/libgnunetutil.la  
274
275 test_common_endian_SOURCES = \
276  test_common_endian.c
277 test_common_endian_LDADD = \
278  $(top_builddir)/src/util/libgnunetutil.la  
279
280 test_common_logging_SOURCES = \
281  test_common_logging.c
282 test_common_logging_LDADD = \
283  $(top_builddir)/src/util/libgnunetutil.la  
284
285 test_common_logging_runtime_loglevels_SOURCES = \
286  test_common_logging_runtime_loglevels.c
287 test_common_logging_runtime_loglevels_LDADD = \
288  $(top_builddir)/src/util/libgnunetutil.la
289
290 test_configuration_SOURCES = \
291  test_configuration.c
292 test_configuration_LDADD = \
293  $(top_builddir)/src/util/libgnunetutil.la  
294
295 test_container_bloomfilter_SOURCES = \
296  test_container_bloomfilter.c
297 test_container_bloomfilter_LDADD = \
298  $(top_builddir)/src/util/libgnunetutil.la  
299
300 test_container_meta_data_SOURCES = \
301  test_container_meta_data.c
302 test_container_meta_data_LDADD = \
303  $(top_builddir)/src/util/libgnunetutil.la -lextractor
304
305 test_container_multihashmap_SOURCES = \
306  test_container_multihashmap.c
307 test_container_multihashmap_LDADD = \
308  $(top_builddir)/src/util/libgnunetutil.la
309
310 test_container_multihashmap32_SOURCES = \
311  test_container_multihashmap32.c
312 test_container_multihashmap32_LDADD = \
313  $(top_builddir)/src/util/libgnunetutil.la
314
315 test_container_multipeermap_SOURCES = \
316  test_container_multipeermap.c
317 test_container_multipeermap_LDADD = \
318  $(top_builddir)/src/util/libgnunetutil.la
319
320 test_container_heap_SOURCES = \
321  test_container_heap.c
322 test_container_heap_LDADD = \
323  $(top_builddir)/src/util/libgnunetutil.la   
324
325 test_container_slist_SOURCES = \
326  test_container_slist.c
327 test_container_slist_LDADD = \
328  $(top_builddir)/src/util/libgnunetutil.la  
329
330 test_crypto_symmetric_SOURCES = \
331  test_crypto_symmetric.c
332 test_crypto_symmetric_LDADD = \
333  $(top_builddir)/src/util/libgnunetutil.la  
334
335 test_crypto_crc_SOURCES = \
336  test_crypto_crc.c
337 test_crypto_crc_LDADD = \
338  $(top_builddir)/src/util/libgnunetutil.la  
339
340 test_crypto_ecc_SOURCES = \
341  test_crypto_ecc.c
342 test_crypto_ecc_LDADD = \
343  $(top_builddir)/src/util/libgnunetutil.la \
344  $(LIBGCRYPT_LIBS)
345
346 test_crypto_hash_SOURCES = \
347  test_crypto_hash.c
348 test_crypto_hash_LDADD = \
349  $(top_builddir)/src/util/libgnunetutil.la  
350
351 test_crypto_hkdf_SOURCES = \
352  test_crypto_hkdf.c
353 test_crypto_hkdf_LDADD = \
354  $(top_builddir)/src/util/libgnunetutil.la  
355
356 test_crypto_random_SOURCES = \
357  test_crypto_random.c
358 test_crypto_random_LDADD = \
359  $(top_builddir)/src/util/libgnunetutil.la  
360
361 test_disk_SOURCES = \
362  test_disk.c
363 test_disk_LDADD = \
364  $(top_builddir)/src/util/libgnunetutil.la  
365
366 test_getopt_SOURCES = \
367  test_getopt.c
368 test_getopt_LDADD = \
369  $(top_builddir)/src/util/libgnunetutil.la  
370
371 test_connection_SOURCES = \
372  test_connection.c
373 test_connection_LDADD = \
374  $(top_builddir)/src/util/libgnunetutil.la  
375
376 test_connection_addressing_SOURCES = \
377  test_connection_addressing.c
378 test_connection_addressing_LDADD = \
379  $(top_builddir)/src/util/libgnunetutil.la  
380
381 test_connection_receive_cancel_SOURCES = \
382  test_connection_receive_cancel.c
383 test_connection_receive_cancel_LDADD = \
384  $(top_builddir)/src/util/libgnunetutil.la  
385
386 test_connection_timeout_SOURCES = \
387  test_connection_timeout.c
388 test_connection_timeout_LDADD = \
389  $(top_builddir)/src/util/libgnunetutil.la  
390
391 test_connection_timeout_no_connect_SOURCES = \
392  test_connection_timeout_no_connect.c
393 test_connection_timeout_no_connect_LDADD = \
394  $(top_builddir)/src/util/libgnunetutil.la  
395
396 test_connection_transmit_cancel_SOURCES = \
397  test_connection_transmit_cancel.c
398 test_connection_transmit_cancel_LDADD = \
399  $(top_builddir)/src/util/libgnunetutil.la  
400
401 test_mq_SOURCES = \
402  test_mq.c
403 test_mq_LDADD = \
404  $(top_builddir)/src/util/libgnunetutil.la
405
406 test_mq_client_SOURCES = \
407  test_mq_client.c
408 test_mq_client_LDADD = \
409  $(top_builddir)/src/util/libgnunetutil.la
410
411 test_os_network_SOURCES = \
412  test_os_network.c
413 test_os_network_LDADD = \
414  $(top_builddir)/src/util/libgnunetutil.la  
415
416 test_peer_SOURCES = \
417  test_peer.c
418 test_peer_LDADD = \
419 $(top_builddir)/src/util/libgnunetutil.la -lgcrypt
420
421 test_plugin_SOURCES = \
422  test_plugin.c
423 test_plugin_LDADD = \
424  $(top_builddir)/src/util/libgnunetutil.la  
425
426 test_program_SOURCES = \
427  test_program.c
428 test_program_LDADD = \
429  $(top_builddir)/src/util/libgnunetutil.la  
430
431 test_resolver_api_SOURCES = \
432  test_resolver_api.c
433 test_resolver_api_LDADD = \
434   $(top_builddir)/src/util/libgnunetutil.la  
435
436 test_scheduler_SOURCES = \
437  test_scheduler.c
438 test_scheduler_LDADD = \
439  $(top_builddir)/src/util/libgnunetutil.la  
440
441 test_scheduler_delay_SOURCES = \
442  test_scheduler_delay.c
443 test_scheduler_delay_LDADD = \
444  $(top_builddir)/src/util/libgnunetutil.la  
445
446 test_server_mst_interrupt_SOURCES = \
447  test_server_mst_interrupt.c
448 test_server_mst_interrupt_LDADD = \
449  $(top_builddir)/src/util/libgnunetutil.la  
450
451 test_server_SOURCES = \
452  test_server.c
453 test_server_LDADD = \
454  $(top_builddir)/src/util/libgnunetutil.la  
455
456 test_server_disconnect_SOURCES = \
457  test_server_disconnect.c
458 test_server_disconnect_LDADD = \
459  $(top_builddir)/src/util/libgnunetutil.la  
460
461 test_server_with_client_SOURCES = \
462  test_server_with_client.c
463 test_server_with_client_LDADD = \
464  $(top_builddir)/src/util/libgnunetutil.la  
465
466 test_server_with_client_unix_SOURCES = \
467  test_server_with_client_unix.c
468 test_server_with_client_unix_LDADD = \
469  $(top_builddir)/src/util/libgnunetutil.la  
470
471
472 test_service_SOURCES = \
473  test_service.c
474 test_service_LDADD = \
475  $(top_builddir)/src/util/libgnunetutil.la  
476
477 test_strings_SOURCES = \
478  test_strings.c
479 test_strings_LDADD = \
480  $(top_builddir)/src/util/libgnunetutil.la  
481
482
483 test_strings_to_data_SOURCES = \
484  test_strings_to_data.c
485 test_strings_to_data_LDADD = \
486  $(top_builddir)/src/util/libgnunetutil.la
487
488
489 test_time_SOURCES = \
490  test_time.c
491 test_time_LDADD = \
492  $(top_builddir)/src/util/libgnunetutil.la  
493
494 test_speedup_SOURCES = \
495  test_speedup.c
496 test_speedup_LDADD = \
497  $(top_builddir)/src/util/libgnunetutil.la  
498
499 perf_crypto_hash_SOURCES = \
500  perf_crypto_hash.c
501 perf_crypto_hash_LDADD = \
502  $(top_builddir)/src/util/libgnunetutil.la  
503
504 perf_crypto_symmetric_SOURCES = \
505  perf_crypto_symmetric.c
506 perf_crypto_symmetric_LDADD = \
507  $(top_builddir)/src/util/libgnunetutil.la  
508
509 perf_malloc_SOURCES = \
510  perf_malloc.c
511 perf_malloc_LDADD = \
512  $(top_builddir)/src/util/libgnunetutil.la  
513
514
515 EXTRA_DIST = \
516   test_configuration_data.conf \
517   test_program_data.conf \
518   test_resolver_api_data.conf \
519   test_service_data.conf \
520   test_speedup_data.conf