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