44e22e390c48a977b8eee0ecd19785ee2b1d31d6
[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 libgnunetutil_la_CPPFLAGS = \
114   $(LTDLINCL)
115
116 libgnunetutil_la_LIBADD = \
117   $(GCLIBADD) $(WINLIB) \
118   $(LIBGCRYPT_LIBS) \
119   $(LTLIBICONV) \
120   $(LTLIBINTL) \
121   $(LIBLTDL) $(Z_LIBS) -lunistring $(XLIB) 
122
123 libgnunetutil_la_LDFLAGS = \
124   $(GN_LIB_LDFLAGS) \
125   -version-info 11:0:2
126
127 if HAVE_TESTING
128   GNUNET_ECC = gnunet-ecc
129 endif
130
131
132 libexec_PROGRAMS = \
133  gnunet-service-resolver 
134
135 bin_PROGRAMS = \
136  gnunet-resolver \
137  gnunet-config \
138  $(GNUNET_ECC) \
139  gnunet-rsa \
140  gnunet-uri 
141
142
143 gnunet_service_resolver_SOURCES = \
144  gnunet-service-resolver.c         
145 gnunet_service_resolver_LDADD = \
146   $(top_builddir)/src/util/libgnunetutil.la \
147   $(GN_LIBINTL)
148 gnunet_service_resolver_DEPENDENCIES = \
149   libgnunetutil.la
150
151
152 gnunet_resolver_SOURCES = \
153  gnunet-resolver.c         
154 gnunet_resolver_LDADD = \
155   $(top_builddir)/src/util/libgnunetutil.la \
156   $(GN_LIBINTL)
157 gnunet_resolver_DEPENDENCIES = \
158   libgnunetutil.la
159
160
161 gnunet_rsa_SOURCES = \
162  gnunet-rsa.c         
163 gnunet_rsa_LDADD = \
164   $(top_builddir)/src/util/libgnunetutil.la \
165   $(GN_LIBINTL) -lgcrypt
166 gnunet_rsa_DEPENDENCIES = \
167   libgnunetutil.la
168
169
170 gnunet_ecc_SOURCES = \
171  gnunet-ecc.c         
172 gnunet_ecc_LDADD = \
173   $(top_builddir)/src/util/libgnunetutil.la \
174   $(GN_LIBINTL) -lgcrypt
175 gnunet_ecc_DEPENDENCIES = \
176   libgnunetutil.la
177
178
179 gnunet_config_SOURCES = \
180  gnunet-config.c         
181 gnunet_config_LDADD = \
182   $(top_builddir)/src/util/libgnunetutil.la \
183   $(GN_LIBINTL)
184 gnunet_config_DEPENDENCIES = \
185   libgnunetutil.la
186
187
188 gnunet_uri_SOURCES = \
189  gnunet-uri.c         
190 gnunet_uri_LDADD = \
191   $(top_builddir)/src/util/libgnunetutil.la \
192   $(GN_LIBINTL)
193 gnunet_uri_DEPENDENCIES = \
194   libgnunetutil.la
195
196 plugin_LTLIBRARIES = \
197   libgnunet_plugin_test.la
198
199 libgnunet_plugin_test_la_SOURCES = \
200   test_plugin_plug.c
201 libgnunet_plugin_test_la_LDFLAGS = \
202  $(GN_PLUGIN_LDFLAGS)
203
204 if HAVE_BENCHMARKS
205  BENCHMARKS = \
206   perf_crypto_hash \
207   perf_malloc
208 endif
209
210 check_PROGRAMS = \
211  test_bio \
212  test_client \
213  test_common_allocation \
214  test_common_endian \
215  test_common_logging \
216  test_configuration \
217  test_container_bloomfilter \
218  test_container_meta_data \
219  test_container_multihashmap \
220  test_container_multihashmap32 \
221  test_container_heap \
222  test_container_slist \
223  test_crypto_aes \
224  test_crypto_aes_weak \
225  test_crypto_crc \
226  test_crypto_ecc \
227  test_crypto_hash \
228  test_crypto_hkdf \
229  test_crypto_ksk \
230  test_crypto_random \
231  test_crypto_rsa \
232  test_disk \
233  test_getopt \
234  test_connection \
235  test_connection_addressing \
236  test_connection_receive_cancel \
237  test_connection_timeout \
238  test_connection_timeout_no_connect \
239  test_connection_transmit_cancel \
240  test_mq \
241  test_mq_client \
242  test_os_network \
243  test_peer \
244  test_plugin \
245  test_program \
246  test_resolver_api \
247  test_scheduler \
248  test_scheduler_delay \
249  test_server_mst_interrupt \
250  test_server \
251  test_server_disconnect \
252  test_server_with_client \
253  $(SERVER_CLIENT_UNIX) \
254  test_service \
255  test_strings \
256  test_strings_to_data \
257  test_time \
258  test_speedup \
259  $(BENCHMARKS) \
260  test_os_start_process \
261  test_common_logging_runtime_loglevels
262
263 if ENABLE_TEST_RUN
264 TESTS = $(check_PROGRAMS)
265 endif
266
267 test_bio_SOURCES = \
268  test_bio.c
269 test_bio_LDADD = \
270  $(top_builddir)/src/util/libgnunetutil.la
271
272
273 test_os_start_process_SOURCES = \
274  test_os_start_process.c
275 test_os_start_process_LDADD = \
276  $(top_builddir)/src/util/libgnunetutil.la
277 test_os_start_process_DEPENDENCIES = \
278  $(WINCAT)
279
280 test_client_SOURCES = \
281  test_client.c
282 test_client_LDADD = \
283  $(top_builddir)/src/util/libgnunetutil.la  
284
285 test_common_allocation_SOURCES = \
286  test_common_allocation.c
287 test_common_allocation_LDADD = \
288  $(top_builddir)/src/util/libgnunetutil.la  
289
290 test_common_endian_SOURCES = \
291  test_common_endian.c
292 test_common_endian_LDADD = \
293  $(top_builddir)/src/util/libgnunetutil.la  
294
295 test_common_logging_SOURCES = \
296  test_common_logging.c
297 test_common_logging_LDADD = \
298  $(top_builddir)/src/util/libgnunetutil.la  
299
300 test_common_logging_runtime_loglevels_SOURCES = \
301  test_common_logging_runtime_loglevels.c
302 test_common_logging_runtime_loglevels_LDADD = \
303  $(top_builddir)/src/util/libgnunetutil.la
304
305 test_configuration_SOURCES = \
306  test_configuration.c
307 test_configuration_LDADD = \
308  $(top_builddir)/src/util/libgnunetutil.la  
309
310 test_container_bloomfilter_SOURCES = \
311  test_container_bloomfilter.c
312 test_container_bloomfilter_LDADD = \
313  $(top_builddir)/src/util/libgnunetutil.la  
314
315 test_container_meta_data_SOURCES = \
316  test_container_meta_data.c
317 test_container_meta_data_LDADD = \
318  $(top_builddir)/src/util/libgnunetutil.la -lextractor
319
320 test_container_multihashmap_SOURCES = \
321  test_container_multihashmap.c
322 test_container_multihashmap_LDADD = \
323  $(top_builddir)/src/util/libgnunetutil.la
324
325 test_container_multihashmap32_SOURCES = \
326  test_container_multihashmap32.c
327 test_container_multihashmap32_LDADD = \
328  $(top_builddir)/src/util/libgnunetutil.la
329
330 test_container_heap_SOURCES = \
331  test_container_heap.c
332 test_container_heap_LDADD = \
333  $(top_builddir)/src/util/libgnunetutil.la   
334
335 test_container_slist_SOURCES = \
336  test_container_slist.c
337 test_container_slist_LDADD = \
338  $(top_builddir)/src/util/libgnunetutil.la  
339
340 test_crypto_aes_SOURCES = \
341  test_crypto_aes.c
342 test_crypto_aes_LDADD = \
343  $(top_builddir)/src/util/libgnunetutil.la  
344
345 test_crypto_aes_weak_SOURCES = \
346  test_crypto_aes_weak.c
347 test_crypto_aes_weak_LDADD = \
348  $(top_builddir)/src/util/libgnunetutil.la  \
349  $(LIBGCRYPT_LIBS)
350
351 test_crypto_crc_SOURCES = \
352  test_crypto_crc.c
353 test_crypto_crc_LDADD = \
354  $(top_builddir)/src/util/libgnunetutil.la  
355
356 test_crypto_ecc_SOURCES = \
357  test_crypto_ecc.c
358 test_crypto_ecc_LDADD = \
359  $(top_builddir)/src/util/libgnunetutil.la \
360  $(LIBGCRYPT_LIBS)
361
362 test_crypto_hash_SOURCES = \
363  test_crypto_hash.c
364 test_crypto_hash_LDADD = \
365  $(top_builddir)/src/util/libgnunetutil.la  
366
367 test_crypto_hkdf_SOURCES = \
368  test_crypto_hkdf.c
369 test_crypto_hkdf_LDADD = \
370  $(top_builddir)/src/util/libgnunetutil.la  
371
372 test_crypto_ksk_SOURCES = \
373  test_crypto_ksk.c
374 test_crypto_ksk_LDADD = \
375  $(top_builddir)/src/util/libgnunetutil.la  
376
377 test_crypto_random_SOURCES = \
378  test_crypto_random.c
379 test_crypto_random_LDADD = \
380  $(top_builddir)/src/util/libgnunetutil.la  
381
382 test_crypto_rsa_SOURCES = \
383  test_crypto_rsa.c
384 test_crypto_rsa_LDADD = \
385  $(top_builddir)/src/util/libgnunetutil.la  
386
387 test_disk_SOURCES = \
388  test_disk.c
389 test_disk_LDADD = \
390  $(top_builddir)/src/util/libgnunetutil.la  
391
392 test_getopt_SOURCES = \
393  test_getopt.c
394 test_getopt_LDADD = \
395  $(top_builddir)/src/util/libgnunetutil.la  
396
397 test_connection_SOURCES = \
398  test_connection.c
399 test_connection_LDADD = \
400  $(top_builddir)/src/util/libgnunetutil.la  
401
402 test_connection_addressing_SOURCES = \
403  test_connection_addressing.c
404 test_connection_addressing_LDADD = \
405  $(top_builddir)/src/util/libgnunetutil.la  
406
407 test_connection_receive_cancel_SOURCES = \
408  test_connection_receive_cancel.c
409 test_connection_receive_cancel_LDADD = \
410  $(top_builddir)/src/util/libgnunetutil.la  
411
412 test_connection_timeout_SOURCES = \
413  test_connection_timeout.c
414 test_connection_timeout_LDADD = \
415  $(top_builddir)/src/util/libgnunetutil.la  
416
417 test_connection_timeout_no_connect_SOURCES = \
418  test_connection_timeout_no_connect.c
419 test_connection_timeout_no_connect_LDADD = \
420  $(top_builddir)/src/util/libgnunetutil.la  
421
422 test_connection_transmit_cancel_SOURCES = \
423  test_connection_transmit_cancel.c
424 test_connection_transmit_cancel_LDADD = \
425  $(top_builddir)/src/util/libgnunetutil.la  
426
427 test_mq_SOURCES = \
428  test_mq.c
429 test_mq_LDADD = \
430  $(top_builddir)/src/util/libgnunetutil.la
431
432 test_mq_client_SOURCES = \
433  test_mq_client.c
434 test_mq_client_LDADD = \
435  $(top_builddir)/src/util/libgnunetutil.la
436
437 test_os_network_SOURCES = \
438  test_os_network.c
439 test_os_network_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