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