79d5b7edb38f8aafdf21fef3d00d8e8a9aa3de97
[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 endif
197
198 check_PROGRAMS = \
199  test_bio \
200  test_client \
201  test_common_allocation \
202  test_common_endian \
203  test_common_logging \
204  test_configuration \
205  test_container_bloomfilter \
206  test_container_meta_data \
207  test_container_multihashmap \
208  test_container_heap \
209  test_container_slist \
210  test_crypto_aes \
211  test_crypto_aes_weak \
212  test_crypto_crc \
213  test_crypto_ecc \
214  test_crypto_hash \
215  test_crypto_hkdf \
216  test_crypto_ksk \
217  test_crypto_random \
218  test_crypto_rsa \
219  test_disk \
220  test_getopt \
221  test_connection \
222  test_connection_addressing \
223  test_connection_receive_cancel \
224  test_connection_timeout \
225  test_connection_timeout_no_connect \
226  test_connection_transmit_cancel \
227  test_os_network \
228  test_os_priority \
229  test_peer \
230  test_plugin \
231  test_program \
232  test_pseudonym \
233  test_resolver_api \
234  test_scheduler \
235  test_scheduler_delay \
236  test_server_mst_interrupt \
237  test_server \
238  test_server_disconnect \
239  test_server_with_client \
240  $(SERVER_CLIENT_UNIX) \
241  test_service \
242  test_strings \
243  test_time \
244  test_speedup \
245  $(BENCHMARKS) \
246  test_os_start_process \
247  test_common_logging_runtime_loglevels
248
249 if ENABLE_TEST_RUN
250 TESTS = $(check_PROGRAMS)
251 endif
252
253 test_bio_SOURCES = \
254  test_bio.c
255 test_bio_LDADD = \
256  $(top_builddir)/src/util/libgnunetutil.la
257
258
259 test_os_start_process_SOURCES = \
260  test_os_start_process.c
261 test_os_start_process_LDADD = \
262  $(top_builddir)/src/util/libgnunetutil.la
263 test_os_start_process_DEPENDENCIES = \
264  $(WINCAT)
265
266 test_client_SOURCES = \
267  test_client.c
268 test_client_LDADD = \
269  $(top_builddir)/src/util/libgnunetutil.la  
270
271 test_common_allocation_SOURCES = \
272  test_common_allocation.c
273 test_common_allocation_LDADD = \
274  $(top_builddir)/src/util/libgnunetutil.la  
275
276 test_common_endian_SOURCES = \
277  test_common_endian.c
278 test_common_endian_LDADD = \
279  $(top_builddir)/src/util/libgnunetutil.la  
280
281 test_common_logging_SOURCES = \
282  test_common_logging.c
283 test_common_logging_LDADD = \
284  $(top_builddir)/src/util/libgnunetutil.la  
285
286 test_common_logging_runtime_loglevels_SOURCES = \
287  test_common_logging_runtime_loglevels.c
288 test_common_logging_runtime_loglevels_LDADD = \
289  $(top_builddir)/src/util/libgnunetutil.la
290
291 test_configuration_SOURCES = \
292  test_configuration.c
293 test_configuration_LDADD = \
294  $(top_builddir)/src/util/libgnunetutil.la  
295
296 test_container_bloomfilter_SOURCES = \
297  test_container_bloomfilter.c
298 test_container_bloomfilter_LDADD = \
299  $(top_builddir)/src/util/libgnunetutil.la  
300
301 test_container_meta_data_SOURCES = \
302  test_container_meta_data.c
303 test_container_meta_data_LDADD = \
304  $(top_builddir)/src/util/libgnunetutil.la -lextractor
305
306 test_container_multihashmap_SOURCES = \
307  test_container_multihashmap.c
308 test_container_multihashmap_LDADD = \
309  $(top_builddir)/src/util/libgnunetutil.la  
310
311 test_container_heap_SOURCES = \
312  test_container_heap.c
313 test_container_heap_LDADD = \
314  $(top_builddir)/src/util/libgnunetutil.la   
315
316 test_container_slist_SOURCES = \
317  test_container_slist.c
318 test_container_slist_LDADD = \
319  $(top_builddir)/src/util/libgnunetutil.la  
320
321 test_crypto_aes_SOURCES = \
322  test_crypto_aes.c
323 test_crypto_aes_LDADD = \
324  $(top_builddir)/src/util/libgnunetutil.la  
325
326 test_crypto_aes_weak_SOURCES = \
327  test_crypto_aes_weak.c
328 test_crypto_aes_weak_LDADD = \
329  $(top_builddir)/src/util/libgnunetutil.la  \
330  $(LIBGCRYPT_LIBS)
331
332 test_crypto_crc_SOURCES = \
333  test_crypto_crc.c
334 test_crypto_crc_LDADD = \
335  $(top_builddir)/src/util/libgnunetutil.la  
336
337 test_crypto_ecc_SOURCES = \
338  test_crypto_ecc.c
339 test_crypto_ecc_LDADD = \
340  $(top_builddir)/src/util/libgnunetutil.la  
341
342 test_crypto_hash_SOURCES = \
343  test_crypto_hash.c
344 test_crypto_hash_LDADD = \
345  $(top_builddir)/src/util/libgnunetutil.la  
346
347 test_crypto_hkdf_SOURCES = \
348  test_crypto_hkdf.c
349 test_crypto_hkdf_LDADD = \
350  $(top_builddir)/src/util/libgnunetutil.la  
351
352 test_crypto_ksk_SOURCES = \
353  test_crypto_ksk.c
354 test_crypto_ksk_LDADD = \
355  $(top_builddir)/src/util/libgnunetutil.la  
356
357 test_crypto_random_SOURCES = \
358  test_crypto_random.c
359 test_crypto_random_LDADD = \
360  $(top_builddir)/src/util/libgnunetutil.la  
361
362 test_crypto_rsa_SOURCES = \
363  test_crypto_rsa.c
364 test_crypto_rsa_LDADD = \
365  $(top_builddir)/src/util/libgnunetutil.la  
366
367 test_disk_SOURCES = \
368  test_disk.c
369 test_disk_LDADD = \
370  $(top_builddir)/src/util/libgnunetutil.la  
371
372 test_getopt_SOURCES = \
373  test_getopt.c
374 test_getopt_LDADD = \
375  $(top_builddir)/src/util/libgnunetutil.la  
376
377 test_connection_SOURCES = \
378  test_connection.c
379 test_connection_LDADD = \
380  $(top_builddir)/src/util/libgnunetutil.la  
381
382 test_connection_addressing_SOURCES = \
383  test_connection_addressing.c
384 test_connection_addressing_LDADD = \
385  $(top_builddir)/src/util/libgnunetutil.la  
386
387 test_connection_receive_cancel_SOURCES = \
388  test_connection_receive_cancel.c
389 test_connection_receive_cancel_LDADD = \
390  $(top_builddir)/src/util/libgnunetutil.la  
391
392 test_connection_timeout_SOURCES = \
393  test_connection_timeout.c
394 test_connection_timeout_LDADD = \
395  $(top_builddir)/src/util/libgnunetutil.la  
396
397 test_connection_timeout_no_connect_SOURCES = \
398  test_connection_timeout_no_connect.c
399 test_connection_timeout_no_connect_LDADD = \
400  $(top_builddir)/src/util/libgnunetutil.la  
401
402 test_connection_transmit_cancel_SOURCES = \
403  test_connection_transmit_cancel.c
404 test_connection_transmit_cancel_LDADD = \
405  $(top_builddir)/src/util/libgnunetutil.la  
406
407 test_os_network_SOURCES = \
408  test_os_network.c
409 test_os_network_LDADD = \
410  $(top_builddir)/src/util/libgnunetutil.la  
411
412 test_os_priority_SOURCES = \
413  test_os_priority.c
414 test_os_priority_LDADD = \
415  $(top_builddir)/src/util/libgnunetutil.la  
416
417 test_peer_SOURCES = \
418  test_peer.c
419 test_peer_LDADD = \
420 $(top_builddir)/src/util/libgnunetutil.la
421
422 test_plugin_SOURCES = \
423  test_plugin.c
424 test_plugin_LDADD = \
425  $(top_builddir)/src/util/libgnunetutil.la  
426
427 test_program_SOURCES = \
428  test_program.c
429 test_program_LDADD = \
430  $(top_builddir)/src/util/libgnunetutil.la  
431
432 test_pseudonym_SOURCES = \
433  test_pseudonym.c
434 test_pseudonym_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 test_time_SOURCES = \
489  test_time.c
490 test_time_LDADD = \
491  $(top_builddir)/src/util/libgnunetutil.la  
492
493 test_speedup_SOURCES = \
494  test_speedup.c
495 test_speedup_LDADD = \
496  $(top_builddir)/src/util/libgnunetutil.la  
497
498 perf_crypto_hash_SOURCES = \
499  perf_crypto_hash.c
500 perf_crypto_hash_LDADD = \
501  $(top_builddir)/src/util/libgnunetutil.la  
502
503
504 EXTRA_DIST = \
505   test_configuration_data.conf \
506   test_program_data.conf \
507   test_pseudonym_data.conf \
508   test_resolver_api_data.conf \
509   test_service_data.conf \
510   test_speedup_data.conf