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