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