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