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