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