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