9920fce0b7b16f5d00a4e462bbdaacd8cd0bd444
[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_time \
249  test_speedup \
250  $(BENCHMARKS) \
251  test_os_start_process \
252  test_common_logging_runtime_loglevels
253
254 if ENABLE_TEST_RUN
255 TESTS = $(check_PROGRAMS)
256 endif
257
258 test_bio_SOURCES = \
259  test_bio.c
260 test_bio_LDADD = \
261  $(top_builddir)/src/util/libgnunetutil.la
262
263
264 test_os_start_process_SOURCES = \
265  test_os_start_process.c
266 test_os_start_process_LDADD = \
267  $(top_builddir)/src/util/libgnunetutil.la
268 test_os_start_process_DEPENDENCIES = \
269  $(WINCAT)
270
271 test_client_SOURCES = \
272  test_client.c
273 test_client_LDADD = \
274  $(top_builddir)/src/util/libgnunetutil.la  
275
276 test_common_allocation_SOURCES = \
277  test_common_allocation.c
278 test_common_allocation_LDADD = \
279  $(top_builddir)/src/util/libgnunetutil.la  
280
281 test_common_endian_SOURCES = \
282  test_common_endian.c
283 test_common_endian_LDADD = \
284  $(top_builddir)/src/util/libgnunetutil.la  
285
286 test_common_logging_SOURCES = \
287  test_common_logging.c
288 test_common_logging_LDADD = \
289  $(top_builddir)/src/util/libgnunetutil.la  
290
291 test_common_logging_runtime_loglevels_SOURCES = \
292  test_common_logging_runtime_loglevels.c
293 test_common_logging_runtime_loglevels_LDADD = \
294  $(top_builddir)/src/util/libgnunetutil.la
295
296 test_configuration_SOURCES = \
297  test_configuration.c
298 test_configuration_LDADD = \
299  $(top_builddir)/src/util/libgnunetutil.la  
300
301 test_container_bloomfilter_SOURCES = \
302  test_container_bloomfilter.c
303 test_container_bloomfilter_LDADD = \
304  $(top_builddir)/src/util/libgnunetutil.la  
305
306 test_container_meta_data_SOURCES = \
307  test_container_meta_data.c
308 test_container_meta_data_LDADD = \
309  $(top_builddir)/src/util/libgnunetutil.la -lextractor
310
311 test_container_multihashmap_SOURCES = \
312  test_container_multihashmap.c
313 test_container_multihashmap_LDADD = \
314  $(top_builddir)/src/util/libgnunetutil.la  
315
316 test_container_heap_SOURCES = \
317  test_container_heap.c
318 test_container_heap_LDADD = \
319  $(top_builddir)/src/util/libgnunetutil.la   
320
321 test_container_slist_SOURCES = \
322  test_container_slist.c
323 test_container_slist_LDADD = \
324  $(top_builddir)/src/util/libgnunetutil.la  
325
326 test_crypto_aes_SOURCES = \
327  test_crypto_aes.c
328 test_crypto_aes_LDADD = \
329  $(top_builddir)/src/util/libgnunetutil.la  
330
331 test_crypto_aes_weak_SOURCES = \
332  test_crypto_aes_weak.c
333 test_crypto_aes_weak_LDADD = \
334  $(top_builddir)/src/util/libgnunetutil.la  \
335  $(LIBGCRYPT_LIBS)
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_ecc_SOURCES = \
343  test_crypto_ecc.c
344 test_crypto_ecc_LDADD = \
345  $(top_builddir)/src/util/libgnunetutil.la \
346  $(LIBGCRYPT_LIBS)
347
348 test_crypto_hash_SOURCES = \
349  test_crypto_hash.c
350 test_crypto_hash_LDADD = \
351  $(top_builddir)/src/util/libgnunetutil.la  
352
353 test_crypto_hkdf_SOURCES = \
354  test_crypto_hkdf.c
355 test_crypto_hkdf_LDADD = \
356  $(top_builddir)/src/util/libgnunetutil.la  
357
358 test_crypto_ksk_SOURCES = \
359  test_crypto_ksk.c
360 test_crypto_ksk_LDADD = \
361  $(top_builddir)/src/util/libgnunetutil.la  
362
363 test_crypto_random_SOURCES = \
364  test_crypto_random.c
365 test_crypto_random_LDADD = \
366  $(top_builddir)/src/util/libgnunetutil.la  
367
368 test_crypto_rsa_SOURCES = \
369  test_crypto_rsa.c
370 test_crypto_rsa_LDADD = \
371  $(top_builddir)/src/util/libgnunetutil.la  
372
373 test_disk_SOURCES = \
374  test_disk.c
375 test_disk_LDADD = \
376  $(top_builddir)/src/util/libgnunetutil.la  
377
378 test_getopt_SOURCES = \
379  test_getopt.c
380 test_getopt_LDADD = \
381  $(top_builddir)/src/util/libgnunetutil.la  
382
383 test_connection_SOURCES = \
384  test_connection.c
385 test_connection_LDADD = \
386  $(top_builddir)/src/util/libgnunetutil.la  
387
388 test_connection_addressing_SOURCES = \
389  test_connection_addressing.c
390 test_connection_addressing_LDADD = \
391  $(top_builddir)/src/util/libgnunetutil.la  
392
393 test_connection_receive_cancel_SOURCES = \
394  test_connection_receive_cancel.c
395 test_connection_receive_cancel_LDADD = \
396  $(top_builddir)/src/util/libgnunetutil.la  
397
398 test_connection_timeout_SOURCES = \
399  test_connection_timeout.c
400 test_connection_timeout_LDADD = \
401  $(top_builddir)/src/util/libgnunetutil.la  
402
403 test_connection_timeout_no_connect_SOURCES = \
404  test_connection_timeout_no_connect.c
405 test_connection_timeout_no_connect_LDADD = \
406  $(top_builddir)/src/util/libgnunetutil.la  
407
408 test_connection_transmit_cancel_SOURCES = \
409  test_connection_transmit_cancel.c
410 test_connection_transmit_cancel_LDADD = \
411  $(top_builddir)/src/util/libgnunetutil.la  
412
413 test_os_network_SOURCES = \
414  test_os_network.c
415 test_os_network_LDADD = \
416  $(top_builddir)/src/util/libgnunetutil.la  
417
418 test_os_priority_SOURCES = \
419  test_os_priority.c
420 test_os_priority_LDADD = \
421  $(top_builddir)/src/util/libgnunetutil.la  
422
423 test_peer_SOURCES = \
424  test_peer.c
425 test_peer_LDADD = \
426 $(top_builddir)/src/util/libgnunetutil.la
427
428 test_plugin_SOURCES = \
429  test_plugin.c
430 test_plugin_LDADD = \
431  $(top_builddir)/src/util/libgnunetutil.la  
432
433 test_program_SOURCES = \
434  test_program.c
435 test_program_LDADD = \
436  $(top_builddir)/src/util/libgnunetutil.la  
437
438 test_pseudonym_SOURCES = \
439  test_pseudonym.c
440 test_pseudonym_LDADD = \
441  $(top_builddir)/src/util/libgnunetutil.la  
442
443 test_resolver_api_SOURCES = \
444  test_resolver_api.c
445 test_resolver_api_LDADD = \
446   $(top_builddir)/src/util/libgnunetutil.la  
447
448 test_scheduler_SOURCES = \
449  test_scheduler.c
450 test_scheduler_LDADD = \
451  $(top_builddir)/src/util/libgnunetutil.la  
452
453 test_scheduler_delay_SOURCES = \
454  test_scheduler_delay.c
455 test_scheduler_delay_LDADD = \
456  $(top_builddir)/src/util/libgnunetutil.la  
457
458 test_server_mst_interrupt_SOURCES = \
459  test_server_mst_interrupt.c
460 test_server_mst_interrupt_LDADD = \
461  $(top_builddir)/src/util/libgnunetutil.la  
462
463 test_server_SOURCES = \
464  test_server.c
465 test_server_LDADD = \
466  $(top_builddir)/src/util/libgnunetutil.la  
467
468 test_server_disconnect_SOURCES = \
469  test_server_disconnect.c
470 test_server_disconnect_LDADD = \
471  $(top_builddir)/src/util/libgnunetutil.la  
472
473 test_server_with_client_SOURCES = \
474  test_server_with_client.c
475 test_server_with_client_LDADD = \
476  $(top_builddir)/src/util/libgnunetutil.la  
477
478 test_server_with_client_unix_SOURCES = \
479  test_server_with_client_unix.c
480 test_server_with_client_unix_LDADD = \
481  $(top_builddir)/src/util/libgnunetutil.la  
482
483
484 test_service_SOURCES = \
485  test_service.c
486 test_service_LDADD = \
487  $(top_builddir)/src/util/libgnunetutil.la  
488
489 test_strings_SOURCES = \
490  test_strings.c
491 test_strings_LDADD = \
492  $(top_builddir)/src/util/libgnunetutil.la  
493
494 test_time_SOURCES = \
495  test_time.c
496 test_time_LDADD = \
497  $(top_builddir)/src/util/libgnunetutil.la  
498
499 test_speedup_SOURCES = \
500  test_speedup.c
501 test_speedup_LDADD = \
502  $(top_builddir)/src/util/libgnunetutil.la  
503
504 perf_crypto_hash_SOURCES = \
505  perf_crypto_hash.c
506 perf_crypto_hash_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_pseudonym_data.conf \
519   test_resolver_api_data.conf \
520   test_service_data.conf \
521   test_speedup_data.conf