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