7983d61dbd8bc6238e6c5f62cf8655d7fadff083
[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 pkgcfgdir= $(pkgdatadir)/config.d/
6
7 dist_pkgcfg_DATA = \
8   util.conf 
9
10 pkgcfg_DATA = \
11   resolver.conf
12
13 if MINGW
14 noinst_LTLIBRARIES = \
15   libgnunetutilwin.la
16 libgnunetutilwin_la_SOURCES = \
17   win.c \
18   winproc.c
19 libgnunetutilwin_la_LDFLAGS = \
20   -no-undefined -Wl,--export-all-symbols 
21 libgnunetutilwin_la_LIBADD = \
22   -lshell32 -liconv -lstdc++ \
23   -lcomdlg32 -lgdi32 -liphlpapi
24 WINLIB = libgnunetutilwin.la
25 W32CAT = w32cat
26 endif
27
28 if !MINGW
29  SERVER_CLIENT_UNIX = test_server_with_client_unix
30 endif
31
32 if USE_COVERAGE
33   AM_CFLAGS = --coverage -O0
34   XLIB = -lgcov
35 endif
36
37 w32cat_SOURCES = w32cat.c
38
39 noinst_PROGRAMS = \
40  gnunet-config-diff \
41  $(W32CAT) \
42  test_common_logging_dummy
43
44
45 gnunet_config_diff_SOURCES = \
46  gnunet-config-diff.c
47 gnunet_config_diff_LDADD = \
48  $(top_builddir)/src/util/libgnunetutil.la  
49 gnunet_config_diff_DEPENDENCIES = \
50  libgnunetutil.la
51
52 test_common_logging_dummy_SOURCES = \
53  test_common_logging_dummy.c
54 test_common_logging_dummy_LDADD = \
55  $(top_builddir)/src/util/libgnunetutil.la
56 test_common_logging_dummy_DEPENDENCIES = \
57  libgnunetutil.la
58
59 lib_LTLIBRARIES = libgnunetutil.la
60
61 libgnunetutil_la_SOURCES = \
62   bandwidth.c \
63   bio.c \
64   client.c \
65   common_allocation.c \
66   common_endian.c \
67   common_logging.c \
68   configuration.c \
69   connection.c \
70   container_bloomfilter.c \
71   container_heap.c \
72   container_meta_data.c \
73   container_multihashmap.c \
74   container_slist.c \
75   crypto_aes.c \
76   crypto_crc.c \
77   crypto_ecc.c \
78   crypto_hash.c \
79   crypto_hkdf.c \
80   crypto_kdf.c \
81   crypto_ksk.c \
82   crypto_random.c \
83   crypto_rsa.c \
84   disk.c \
85   disk.h \
86   getopt.c \
87   getopt_helpers.c \
88   helper.c \
89   load.c \
90   network.c \
91   os_installation.c \
92   os_network.c \
93   os_priority.c \
94   peer.c \
95   plugin.c \
96   program.c \
97   pseudonym.c \
98   resolver_api.c resolver.h \
99   scheduler.c \
100   server.c \
101   server_mst.c \
102   server_nc.c \
103   server_tc.c \
104   service.c \
105   signal.c \
106   strings.c \
107   time.c \
108   speedup.c
109
110
111 libgnunetutil_la_LIBADD = \
112   $(GCLIBADD) $(WINLIB) \
113   $(LIBGCRYPT_LIBS) \
114   $(LTLIBICONV) \
115   $(LTLIBINTL) \
116   -lltdl -lz -lunistring $(XLIB) 
117
118 libgnunetutil_la_LDFLAGS = \
119   $(GN_LIB_LDFLAGS) \
120   -version-info 8:0:0
121
122
123 bin_PROGRAMS = \
124  gnunet-service-resolver \
125  gnunet-resolver \
126  gnunet-config \
127  gnunet-ecc \
128  gnunet-rsa \
129  gnunet-uri 
130
131
132 gnunet_service_resolver_SOURCES = \
133  gnunet-service-resolver.c         
134 gnunet_service_resolver_LDADD = \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   $(GN_LIBINTL)
137 gnunet_service_resolver_DEPENDENCIES = \
138   libgnunetutil.la
139
140
141 gnunet_resolver_SOURCES = \
142  gnunet-resolver.c         
143 gnunet_resolver_LDADD = \
144   $(top_builddir)/src/util/libgnunetutil.la \
145   $(GN_LIBINTL)
146 gnunet_resolver_DEPENDENCIES = \
147   libgnunetutil.la
148
149
150 gnunet_rsa_SOURCES = \
151  gnunet-rsa.c         
152 gnunet_rsa_LDADD = \
153   $(top_builddir)/src/util/libgnunetutil.la \
154   $(GN_LIBINTL) -lgcrypt
155 gnunet_rsa_DEPENDENCIES = \
156   libgnunetutil.la
157
158
159 gnunet_ecc_SOURCES = \
160  gnunet-ecc.c         
161 gnunet_ecc_LDADD = \
162   $(top_builddir)/src/util/libgnunetutil.la \
163   $(GN_LIBINTL) -lgcrypt
164 gnunet_ecc_DEPENDENCIES = \
165   libgnunetutil.la
166
167
168 gnunet_config_SOURCES = \
169  gnunet-config.c         
170 gnunet_config_LDADD = \
171   $(top_builddir)/src/util/libgnunetutil.la \
172   $(GN_LIBINTL)
173 gnunet_config_DEPENDENCIES = \
174   libgnunetutil.la
175
176
177 gnunet_uri_SOURCES = \
178  gnunet-uri.c         
179 gnunet_uri_LDADD = \
180   $(top_builddir)/src/util/libgnunetutil.la \
181   $(GN_LIBINTL)
182 gnunet_uri_DEPENDENCIES = \
183   libgnunetutil.la
184
185 plugin_LTLIBRARIES = \
186   libgnunet_plugin_test.la
187
188 libgnunet_plugin_test_la_SOURCES = \
189   test_plugin_plug.c
190 libgnunet_plugin_test_la_LDFLAGS = \
191  $(GN_PLUGIN_LDFLAGS)
192
193 if HAVE_BENCHMARKS
194  BENCHMARKS = \
195   perf_crypto_hash \
196   perf_malloc
197 endif
198
199 check_PROGRAMS = \
200  test_bio \
201  test_client \
202  test_common_allocation \
203  test_common_endian \
204  test_common_logging \
205  test_configuration \
206  test_container_bloomfilter \
207  test_container_meta_data \
208  test_container_multihashmap \
209  test_container_heap \
210  test_container_slist \
211  test_crypto_aes \
212  test_crypto_aes_weak \
213  test_crypto_crc \
214  test_crypto_ecc \
215  test_crypto_hash \
216  test_crypto_hkdf \
217  test_crypto_ksk \
218  test_crypto_random \
219  test_crypto_rsa \
220  test_disk \
221  test_getopt \
222  test_connection \
223  test_connection_addressing \
224  test_connection_receive_cancel \
225  test_connection_timeout \
226  test_connection_timeout_no_connect \
227  test_connection_transmit_cancel \
228  test_os_network \
229  test_os_priority \
230  test_peer \
231  test_plugin \
232  test_program \
233  test_pseudonym \
234  test_resolver_api \
235  test_scheduler \
236  test_scheduler_delay \
237  test_server_mst_interrupt \
238  test_server \
239  test_server_disconnect \
240  test_server_with_client \
241  $(SERVER_CLIENT_UNIX) \
242  test_service \
243  test_strings \
244  test_time \
245  test_speedup \
246  $(BENCHMARKS) \
247  test_os_start_process \
248  test_common_logging_runtime_loglevels
249
250 if ENABLE_TEST_RUN
251 TESTS = $(check_PROGRAMS)
252 endif
253
254 test_bio_SOURCES = \
255  test_bio.c
256 test_bio_LDADD = \
257  $(top_builddir)/src/util/libgnunetutil.la
258
259
260 test_os_start_process_SOURCES = \
261  test_os_start_process.c
262 test_os_start_process_LDADD = \
263  $(top_builddir)/src/util/libgnunetutil.la
264 test_os_start_process_DEPENDENCIES = \
265  $(WINCAT)
266
267 test_client_SOURCES = \
268  test_client.c
269 test_client_LDADD = \
270  $(top_builddir)/src/util/libgnunetutil.la  
271
272 test_common_allocation_SOURCES = \
273  test_common_allocation.c
274 test_common_allocation_LDADD = \
275  $(top_builddir)/src/util/libgnunetutil.la  
276
277 test_common_endian_SOURCES = \
278  test_common_endian.c
279 test_common_endian_LDADD = \
280  $(top_builddir)/src/util/libgnunetutil.la  
281
282 test_common_logging_SOURCES = \
283  test_common_logging.c
284 test_common_logging_LDADD = \
285  $(top_builddir)/src/util/libgnunetutil.la  
286
287 test_common_logging_runtime_loglevels_SOURCES = \
288  test_common_logging_runtime_loglevels.c
289 test_common_logging_runtime_loglevels_LDADD = \
290  $(top_builddir)/src/util/libgnunetutil.la
291
292 test_configuration_SOURCES = \
293  test_configuration.c
294 test_configuration_LDADD = \
295  $(top_builddir)/src/util/libgnunetutil.la  
296
297 test_container_bloomfilter_SOURCES = \
298  test_container_bloomfilter.c
299 test_container_bloomfilter_LDADD = \
300  $(top_builddir)/src/util/libgnunetutil.la  
301
302 test_container_meta_data_SOURCES = \
303  test_container_meta_data.c
304 test_container_meta_data_LDADD = \
305  $(top_builddir)/src/util/libgnunetutil.la -lextractor
306
307 test_container_multihashmap_SOURCES = \
308  test_container_multihashmap.c
309 test_container_multihashmap_LDADD = \
310  $(top_builddir)/src/util/libgnunetutil.la  
311
312 test_container_heap_SOURCES = \
313  test_container_heap.c
314 test_container_heap_LDADD = \
315  $(top_builddir)/src/util/libgnunetutil.la   
316
317 test_container_slist_SOURCES = \
318  test_container_slist.c
319 test_container_slist_LDADD = \
320  $(top_builddir)/src/util/libgnunetutil.la  
321
322 test_crypto_aes_SOURCES = \
323  test_crypto_aes.c
324 test_crypto_aes_LDADD = \
325  $(top_builddir)/src/util/libgnunetutil.la  
326
327 test_crypto_aes_weak_SOURCES = \
328  test_crypto_aes_weak.c
329 test_crypto_aes_weak_LDADD = \
330  $(top_builddir)/src/util/libgnunetutil.la  \
331  $(LIBGCRYPT_LIBS)
332
333 test_crypto_crc_SOURCES = \
334  test_crypto_crc.c
335 test_crypto_crc_LDADD = \
336  $(top_builddir)/src/util/libgnunetutil.la  
337
338 test_crypto_ecc_SOURCES = \
339  test_crypto_ecc.c
340 test_crypto_ecc_LDADD = \
341  $(top_builddir)/src/util/libgnunetutil.la  
342
343 test_crypto_hash_SOURCES = \
344  test_crypto_hash.c
345 test_crypto_hash_LDADD = \
346  $(top_builddir)/src/util/libgnunetutil.la  
347
348 test_crypto_hkdf_SOURCES = \
349  test_crypto_hkdf.c
350 test_crypto_hkdf_LDADD = \
351  $(top_builddir)/src/util/libgnunetutil.la  
352
353 test_crypto_ksk_SOURCES = \
354  test_crypto_ksk.c
355 test_crypto_ksk_LDADD = \
356  $(top_builddir)/src/util/libgnunetutil.la  
357
358 test_crypto_random_SOURCES = \
359  test_crypto_random.c
360 test_crypto_random_LDADD = \
361  $(top_builddir)/src/util/libgnunetutil.la  
362
363 test_crypto_rsa_SOURCES = \
364  test_crypto_rsa.c
365 test_crypto_rsa_LDADD = \
366  $(top_builddir)/src/util/libgnunetutil.la  
367
368 test_disk_SOURCES = \
369  test_disk.c
370 test_disk_LDADD = \
371  $(top_builddir)/src/util/libgnunetutil.la  
372
373 test_getopt_SOURCES = \
374  test_getopt.c
375 test_getopt_LDADD = \
376  $(top_builddir)/src/util/libgnunetutil.la  
377
378 test_connection_SOURCES = \
379  test_connection.c
380 test_connection_LDADD = \
381  $(top_builddir)/src/util/libgnunetutil.la  
382
383 test_connection_addressing_SOURCES = \
384  test_connection_addressing.c
385 test_connection_addressing_LDADD = \
386  $(top_builddir)/src/util/libgnunetutil.la  
387
388 test_connection_receive_cancel_SOURCES = \
389  test_connection_receive_cancel.c
390 test_connection_receive_cancel_LDADD = \
391  $(top_builddir)/src/util/libgnunetutil.la  
392
393 test_connection_timeout_SOURCES = \
394  test_connection_timeout.c
395 test_connection_timeout_LDADD = \
396  $(top_builddir)/src/util/libgnunetutil.la  
397
398 test_connection_timeout_no_connect_SOURCES = \
399  test_connection_timeout_no_connect.c
400 test_connection_timeout_no_connect_LDADD = \
401  $(top_builddir)/src/util/libgnunetutil.la  
402
403 test_connection_transmit_cancel_SOURCES = \
404  test_connection_transmit_cancel.c
405 test_connection_transmit_cancel_LDADD = \
406  $(top_builddir)/src/util/libgnunetutil.la  
407
408 test_os_network_SOURCES = \
409  test_os_network.c
410 test_os_network_LDADD = \
411  $(top_builddir)/src/util/libgnunetutil.la  
412
413 test_os_priority_SOURCES = \
414  test_os_priority.c
415 test_os_priority_LDADD = \
416  $(top_builddir)/src/util/libgnunetutil.la  
417
418 test_peer_SOURCES = \
419  test_peer.c
420 test_peer_LDADD = \
421 $(top_builddir)/src/util/libgnunetutil.la
422
423 test_plugin_SOURCES = \
424  test_plugin.c
425 test_plugin_LDADD = \
426  $(top_builddir)/src/util/libgnunetutil.la  
427
428 test_program_SOURCES = \
429  test_program.c
430 test_program_LDADD = \
431  $(top_builddir)/src/util/libgnunetutil.la  
432
433 test_pseudonym_SOURCES = \
434  test_pseudonym.c
435 test_pseudonym_LDADD = \
436  $(top_builddir)/src/util/libgnunetutil.la  
437
438 test_resolver_api_SOURCES = \
439  test_resolver_api.c
440 test_resolver_api_LDADD = \
441   $(top_builddir)/src/util/libgnunetutil.la  
442
443 test_scheduler_SOURCES = \
444  test_scheduler.c
445 test_scheduler_LDADD = \
446  $(top_builddir)/src/util/libgnunetutil.la  
447
448 test_scheduler_delay_SOURCES = \
449  test_scheduler_delay.c
450 test_scheduler_delay_LDADD = \
451  $(top_builddir)/src/util/libgnunetutil.la  
452
453 test_server_mst_interrupt_SOURCES = \
454  test_server_mst_interrupt.c
455 test_server_mst_interrupt_LDADD = \
456  $(top_builddir)/src/util/libgnunetutil.la  
457
458 test_server_SOURCES = \
459  test_server.c
460 test_server_LDADD = \
461  $(top_builddir)/src/util/libgnunetutil.la  
462
463 test_server_disconnect_SOURCES = \
464  test_server_disconnect.c
465 test_server_disconnect_LDADD = \
466  $(top_builddir)/src/util/libgnunetutil.la  
467
468 test_server_with_client_SOURCES = \
469  test_server_with_client.c
470 test_server_with_client_LDADD = \
471  $(top_builddir)/src/util/libgnunetutil.la  
472
473 test_server_with_client_unix_SOURCES = \
474  test_server_with_client_unix.c
475 test_server_with_client_unix_LDADD = \
476  $(top_builddir)/src/util/libgnunetutil.la  
477
478
479 test_service_SOURCES = \
480  test_service.c
481 test_service_LDADD = \
482  $(top_builddir)/src/util/libgnunetutil.la  
483
484 test_strings_SOURCES = \
485  test_strings.c
486 test_strings_LDADD = \
487  $(top_builddir)/src/util/libgnunetutil.la  
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_malloc_SOURCES = \
505  perf_malloc.c
506 perf_malloc_LDADD = \
507  $(top_builddir)/src/util/libgnunetutil.la  
508
509
510 EXTRA_DIST = \
511   test_configuration_data.conf \
512   test_program_data.conf \
513   test_pseudonym_data.conf \
514   test_resolver_api_data.conf \
515   test_service_data.conf \
516   test_speedup_data.conf