installing all service, daemon and helper binaries to lib/gnunet/libexec/; updating...
[oweals/gnunet.git] / src / mesh / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if MINGW
4   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5 endif
6
7 if USE_COVERAGE
8   AM_CFLAGS = --coverage -O0
9   XLIB = -lgcov
10 endif
11
12 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 libexecdir= $(pkglibdir)/libexec/
15
16 pkgcfg_DATA = \
17   mesh.conf
18
19 plugindir = $(libdir)/gnunet
20
21 AM_CLFAGS = -g
22
23 libexec_PROGRAMS = \
24  gnunet-service-mesh
25
26 lib_LTLIBRARIES = \
27   libgnunetmesh.la \
28   libgnunetmeshblock.la
29
30 plugin_LTLIBRARIES = \
31  libgnunet_plugin_block_mesh.la
32
33 libgnunet_plugin_block_mesh_la_SOURCES = \
34  plugin_block_mesh.c
35 libgnunet_plugin_block_mesh_la_LIBADD = \
36  $(top_builddir)/src/mesh/libgnunetmeshblock.la \
37  $(top_builddir)/src/block/libgnunetblock.la \
38  $(top_builddir)/src/util/libgnunetutil.la
39 libgnunet_plugin_block_mesh_la_LDFLAGS = \
40  $(GN_PLUGIN_LDFLAGS)
41 libgnunet_plugin_block_mesh_la_DEPENDENCIES = \
42  libgnunetmeshblock.la \
43  $(top_builddir)/src/block/libgnunetblock.la \
44  $(top_builddir)/src/util/libgnunetutil.la
45
46 libgnunetmesh_la_SOURCES = \
47   mesh_api.c mesh_common.c
48 libgnunetmesh_la_LIBADD = \
49   $(top_builddir)/src/util/libgnunetutil.la \
50   $(XLIB) \
51   $(LTLIBINTL)
52 libgnunetmesh_la_LDFLAGS = \
53   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
54   -version-info 1:0:0
55
56 libgnunetmeshblock_la_SOURCES = \
57   mesh_block_lib.c
58 libgnunetmeshblock_la_LIBADD = \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   $(XLIB) \
61   $(LTLIBINTL)
62 libgnunetmeshblock_la_LDFLAGS = \
63   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
64   -version-info 1:0:0
65
66 gnunet_service_mesh_SOURCES = \
67  gnunet-service-mesh.c \
68  mesh_tunnel_tree.c \
69  mesh_common.c
70 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
71 gnunet_service_mesh_LDADD = \
72   $(top_builddir)/src/util/libgnunetutil.la \
73   $(top_builddir)/src/core/libgnunetcore.la \
74   $(top_builddir)/src/dht/libgnunetdht.la \
75   $(top_builddir)/src/statistics/libgnunetstatistics.la \
76   $(top_builddir)/src/block/libgnunetblock.la \
77   $(top_builddir)/src/mesh/libgnunetmeshblock.la \
78   $(top_builddir)/src/regex/libgnunetregex.la
79 gnunet_service_mesh_DEPENDENCIES = \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(top_builddir)/src/core/libgnunetcore.la \
82   $(top_builddir)/src/dht/libgnunetdht.la \
83   $(top_builddir)/src/statistics/libgnunetstatistics.la \
84   $(top_builddir)/src/block/libgnunetblock.la \
85   libgnunetmeshblock.la \
86   $(top_builddir)/src/regex/libgnunetregex.la
87 if LINUX
88 gnunet_service_mesh_LDFLAGS = -lrt
89 endif
90
91 noinst_PROGRAMS = \
92 gnunet-regex-profiler
93
94 gnunet_regex_profiler_SOURCES = \
95   gnunet-regex-profiler.c
96 gnunet_regex_profiler_LDADD = \
97   $(top_builddir)/src/util/libgnunetutil.la \
98   $(top_builddir)/src/testbed/libgnunettestbed.la \
99   $(top_builddir)/src/mesh/libgnunetmesh.la \
100   $(top_builddir)/src/regex/libgnunetregex.la \
101   $(top_builddir)/src/statistics/libgnunetstatistics.la
102 gnunet_regex_profiler_DEPENDENCIES = \
103   libgnunetmesh.la
104
105 check_PROGRAMS = \
106  test_mesh_api \
107  test_mesh_tree_api \
108  test_mesh_local_1 \
109  test_mesh_local_2 \
110  test_mesh_local_traffic_fwd \
111  test_mesh_local_traffic_bck \
112  test_mesh_local_traffic_both \
113  test_mesh_2dtorus \
114  test_mesh_regex \
115  test_mesh_small_unicast \
116  test_mesh_small_multicast \
117  test_mesh_small_speed \
118  test_mesh_small_speed_nobuf \
119  test_mesh_small_speed_min \
120  test_mesh_small_speed_backwards \
121  test_mesh_small_speed_nobuf_backwards \
122  test_mesh_small_speed_min_backwards \
123  test_mesh_small_speed_ack
124
125 test_mesh_api_SOURCES = \
126  test_mesh_api.c
127 test_mesh_api_LDADD = \
128  $(top_builddir)/src/util/libgnunetutil.la \
129  $(top_builddir)/src/testing/libgnunettesting.la \
130  $(top_builddir)/src/mesh/libgnunetmesh.la
131 test_mesh_api_DEPENDENCIES = \
132   libgnunetmesh.la \
133    $(top_builddir)/src/util/libgnunetutil.la
134
135 test_mesh_tree_api_SOURCES = \
136  test_mesh_tree_api.c
137 test_mesh_tree_api_LDADD = \
138  $(top_builddir)/src/util/libgnunetutil.la \
139  $(top_builddir)/src/dht/libgnunetdht.la
140 test_mesh_tree_api_DEPENDENCIES = \
141   libgnunetmesh.la \
142   $(top_builddir)/src/dht/libgnunetdht.la
143
144 test_mesh_local_1_SOURCES = \
145  test_mesh_local_1.c
146 test_mesh_local_1_LDADD = \
147  $(top_builddir)/src/util/libgnunetutil.la \
148  $(top_builddir)/src/testing/libgnunettesting.la \
149  $(top_builddir)/src/mesh/libgnunetmesh.la
150 test_mesh_local_1_DEPENDENCIES = \
151   libgnunetmesh.la
152
153 test_mesh_local_2_SOURCES = \
154  test_mesh_local_2.c
155 test_mesh_local_2_LDADD = \
156  $(top_builddir)/src/util/libgnunetutil.la \
157  $(top_builddir)/src/testing/libgnunettesting.la \
158  $(top_builddir)/src/mesh/libgnunetmesh.la
159 test_mesh_local_2_DEPENDENCIES = \
160   libgnunetmesh.la
161
162 test_mesh_local_traffic_fwd_SOURCES = \
163  test_mesh_local_traffic.c
164 test_mesh_local_traffic_fwd_LDADD = \
165  $(top_builddir)/src/util/libgnunetutil.la \
166  $(top_builddir)/src/testing/libgnunettesting.la \
167  $(top_builddir)/src/mesh/libgnunetmesh.la
168 test_mesh_local_traffic_fwd_DEPENDENCIES = \
169   libgnunetmesh.la
170
171 test_mesh_local_traffic_bck_SOURCES = \
172  test_mesh_local_traffic.c
173 test_mesh_local_traffic_bck_LDADD = \
174  $(top_builddir)/src/util/libgnunetutil.la \
175  $(top_builddir)/src/testing/libgnunettesting.la \
176  $(top_builddir)/src/mesh/libgnunetmesh.la
177 test_mesh_local_traffic_bck_DEPENDENCIES = \
178   libgnunetmesh.la
179
180 test_mesh_local_traffic_both_SOURCES = \
181  test_mesh_local_traffic.c
182 test_mesh_local_traffic_both_LDADD = \
183  $(top_builddir)/src/util/libgnunetutil.la \
184  $(top_builddir)/src/testing/libgnunettesting.la \
185  $(top_builddir)/src/mesh/libgnunetmesh.la
186 test_mesh_local_traffic_both_DEPENDENCIES = \
187   libgnunetmesh.la
188
189
190 test_mesh_2dtorus_SOURCES = \
191  test_mesh_2dtorus.c
192 test_mesh_2dtorus_LDADD = \
193   $(top_builddir)/src/util/libgnunetutil.la \
194   $(top_builddir)/src/testing_old/libgnunettesting_old.la
195
196 test_mesh_regex_SOURCES = \
197  test_mesh_regex.c
198 test_mesh_regex_LDADD = \
199   $(top_builddir)/src/mesh/libgnunetmesh.la \
200   $(top_builddir)/src/util/libgnunetutil.la \
201   $(top_builddir)/src/testing_old/libgnunettesting_old.la
202 test_mesh_regex_DEPENDENCIES = \
203   libgnunetmesh.la
204
205
206 test_mesh_small_unicast_SOURCES = \
207  test_mesh_small.c
208 test_mesh_small_unicast_LDADD = \
209   $(top_builddir)/src/mesh/libgnunetmesh.la \
210   $(top_builddir)/src/util/libgnunetutil.la \
211   $(top_builddir)/src/testing_old/libgnunettesting_old.la
212 test_mesh_small_unicast_DEPENDENCIES = \
213   libgnunetmesh.la
214
215 test_mesh_small_multicast_SOURCES = \
216  test_mesh_small.c
217 test_mesh_small_multicast_LDADD = \
218   $(top_builddir)/src/mesh/libgnunetmesh.la \
219   $(top_builddir)/src/util/libgnunetutil.la \
220   $(top_builddir)/src/testing_old/libgnunettesting_old.la
221 test_mesh_small_multicast_DEPENDENCIES = \
222   libgnunetmesh.la
223
224 test_mesh_small_speed_ack_SOURCES = \
225  test_mesh_small.c
226 test_mesh_small_speed_ack_LDADD = \
227   $(top_builddir)/src/mesh/libgnunetmesh.la \
228   $(top_builddir)/src/util/libgnunetutil.la \
229   $(top_builddir)/src/testing_old/libgnunettesting_old.la
230 test_mesh_small_speed_ack_DEPENDENCIES = \
231   libgnunetmesh.la
232
233 test_mesh_small_speed_SOURCES = \
234  test_mesh_small.c
235 test_mesh_small_speed_LDADD = \
236   $(top_builddir)/src/mesh/libgnunetmesh.la \
237   $(top_builddir)/src/util/libgnunetutil.la \
238   $(top_builddir)/src/testing_old/libgnunettesting_old.la
239 test_mesh_small_speed_DEPENDENCIES = \
240   libgnunetmesh.la
241
242 test_mesh_small_speed_min_SOURCES = \
243  test_mesh_small.c
244 test_mesh_small_speed_min_LDADD = \
245   $(top_builddir)/src/mesh/libgnunetmesh.la \
246   $(top_builddir)/src/util/libgnunetutil.la \
247   $(top_builddir)/src/testing_old/libgnunettesting_old.la
248 test_mesh_small_speed_min_DEPENDENCIES = \
249   libgnunetmesh.la
250
251 test_mesh_small_speed_nobuf_SOURCES = \
252  test_mesh_small.c
253 test_mesh_small_speed_nobuf_LDADD = \
254   $(top_builddir)/src/mesh/libgnunetmesh.la \
255   $(top_builddir)/src/util/libgnunetutil.la \
256   $(top_builddir)/src/testing_old/libgnunettesting_old.la
257 test_mesh_small_speed_nobuf_DEPENDENCIES = \
258   libgnunetmesh.la
259
260 test_mesh_small_speed_backwards_SOURCES = \
261  test_mesh_small.c
262 test_mesh_small_speed_backwards_LDADD = \
263   $(top_builddir)/src/mesh/libgnunetmesh.la \
264   $(top_builddir)/src/util/libgnunetutil.la \
265   $(top_builddir)/src/testing_old/libgnunettesting_old.la
266 test_mesh_small_speed_backwards_DEPENDENCIES = \
267   libgnunetmesh.la
268
269 test_mesh_small_speed_min_backwards_SOURCES = \
270  test_mesh_small.c
271 test_mesh_small_speed_min_backwards_LDADD = \
272   $(top_builddir)/src/mesh/libgnunetmesh.la \
273   $(top_builddir)/src/util/libgnunetutil.la \
274   $(top_builddir)/src/testing_old/libgnunettesting_old.la
275 test_mesh_small_speed_min_backwards_DEPENDENCIES = \
276   libgnunetmesh.la
277
278 test_mesh_small_speed_nobuf_backwards_SOURCES = \
279  test_mesh_small.c
280 test_mesh_small_speed_nobuf_backwards_LDADD = \
281   $(top_builddir)/src/mesh/libgnunetmesh.la \
282   $(top_builddir)/src/util/libgnunetutil.la \
283   $(top_builddir)/src/testing_old/libgnunettesting_old.la
284 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = \
285   libgnunetmesh.la
286
287
288 if ENABLE_TEST_RUN
289 TESTS = test_mesh_api \
290  test_mesh_tree_api \
291  test_mesh_local_1 test_mesh_local_2 \
292  test_mesh_local_traffic_fwd \
293  test_mesh_local_traffic_bck \
294  test_mesh_local_traffic_both \
295  test_mesh_2dtorus test_mesh_regex \
296  test_mesh_small_unicast test_mesh_small_multicast \
297  test_mesh_small_speed \
298  test_mesh_small_speed_min \
299  test_mesh_small_speed_nobuf \
300  test_mesh_small_speed_backwards \
301  test_mesh_small_speed_min_backwards
302 endif
303
304 EXTRA_DIST = \
305   test_mesh.conf \
306   test_mesh_2dtorus.conf \
307   test_mesh_small.conf \
308   test_mesh_path.conf