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