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