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