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