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