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