- sync
[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 gnunet-service-mesh-new
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 gnunet_service_mesh_new_SOURCES = \
92  gnunet-service-mesh-new.c \
93  mesh_tunnel_tree.c \
94  mesh_common.c
95 gnunet_service_mesh_new_CFLAGS = $(AM_CFLAGS)
96 gnunet_service_mesh_new_LDADD = \
97   $(top_builddir)/src/util/libgnunetutil.la \
98   $(top_builddir)/src/core/libgnunetcore.la \
99   $(top_builddir)/src/dht/libgnunetdht.la \
100   $(top_builddir)/src/statistics/libgnunetstatistics.la \
101   $(top_builddir)/src/block/libgnunetblock.la \
102   $(top_builddir)/src/mesh/libgnunetmeshblock.la \
103   $(top_builddir)/src/regex/libgnunetregex.la
104 gnunet_service_mesh_new_DEPENDENCIES = \
105   $(top_builddir)/src/util/libgnunetutil.la \
106   $(top_builddir)/src/core/libgnunetcore.la \
107   $(top_builddir)/src/dht/libgnunetdht.la \
108   $(top_builddir)/src/statistics/libgnunetstatistics.la \
109   $(top_builddir)/src/block/libgnunetblock.la \
110   libgnunetmeshblock.la \
111   $(top_builddir)/src/regex/libgnunetregex.la
112 if LINUX
113 gnunet_service_mesh_new_LDFLAGS = -lrt
114 endif
115
116
117 noinst_PROGRAMS = \
118 gnunet-regex-profiler
119
120 gnunet_regex_profiler_SOURCES = \
121   gnunet-regex-profiler.c
122 gnunet_regex_profiler_LDADD = \
123   $(top_builddir)/src/util/libgnunetutil.la \
124   $(top_builddir)/src/testbed/libgnunettestbed.la \
125   $(top_builddir)/src/mesh/libgnunetmesh.la \
126   $(top_builddir)/src/regex/libgnunetregex.la \
127   $(top_builddir)/src/statistics/libgnunetstatistics.la
128 gnunet_regex_profiler_DEPENDENCIES = \
129   libgnunetmesh.la
130
131 check_PROGRAMS = \
132  test_mesh_api \
133  test_mesh_tree_api \
134  test_mesh_local_1 \
135  test_mesh_local_2 \
136  test_mesh_local_traffic_fwd \
137  test_mesh_local_traffic_bck \
138  test_mesh_local_traffic_both \
139  test_mesh_2dtorus \
140  test_mesh_regex \
141  test_mesh_small_unicast \
142  test_mesh_small_multicast \
143  test_mesh_small_speed \
144  test_mesh_small_speed_nobuf \
145  test_mesh_small_speed_min \
146  test_mesh_small_speed_backwards \
147  test_mesh_small_speed_nobuf_backwards \
148  test_mesh_small_speed_min_backwards \
149  test_mesh_small_speed_ack
150
151 test_mesh_api_SOURCES = \
152  test_mesh_api.c
153 test_mesh_api_LDADD = \
154  $(top_builddir)/src/util/libgnunetutil.la \
155  $(top_builddir)/src/testing/libgnunettesting.la \
156  $(top_builddir)/src/mesh/libgnunetmesh.la
157 test_mesh_api_DEPENDENCIES = \
158   libgnunetmesh.la \
159    $(top_builddir)/src/util/libgnunetutil.la
160
161 test_mesh_tree_api_SOURCES = \
162  test_mesh_tree_api.c
163 test_mesh_tree_api_LDADD = \
164  $(top_builddir)/src/util/libgnunetutil.la \
165  $(top_builddir)/src/dht/libgnunetdht.la
166 test_mesh_tree_api_DEPENDENCIES = \
167   libgnunetmesh.la \
168   $(top_builddir)/src/dht/libgnunetdht.la
169
170 test_mesh_local_1_SOURCES = \
171  test_mesh_local_1.c
172 test_mesh_local_1_LDADD = \
173  $(top_builddir)/src/util/libgnunetutil.la \
174  $(top_builddir)/src/testing/libgnunettesting.la \
175  $(top_builddir)/src/mesh/libgnunetmesh.la
176 test_mesh_local_1_DEPENDENCIES = \
177   libgnunetmesh.la
178
179 test_mesh_local_2_SOURCES = \
180  test_mesh_local_2.c
181 test_mesh_local_2_LDADD = \
182  $(top_builddir)/src/util/libgnunetutil.la \
183  $(top_builddir)/src/testing/libgnunettesting.la \
184  $(top_builddir)/src/mesh/libgnunetmesh.la
185 test_mesh_local_2_DEPENDENCIES = \
186   libgnunetmesh.la
187
188 test_mesh_local_traffic_fwd_SOURCES = \
189  test_mesh_local_traffic.c
190 test_mesh_local_traffic_fwd_LDADD = \
191  $(top_builddir)/src/util/libgnunetutil.la \
192  $(top_builddir)/src/testing/libgnunettesting.la \
193  $(top_builddir)/src/mesh/libgnunetmesh.la
194 test_mesh_local_traffic_fwd_DEPENDENCIES = \
195   libgnunetmesh.la
196
197 test_mesh_local_traffic_bck_SOURCES = \
198  test_mesh_local_traffic.c
199 test_mesh_local_traffic_bck_LDADD = \
200  $(top_builddir)/src/util/libgnunetutil.la \
201  $(top_builddir)/src/testing/libgnunettesting.la \
202  $(top_builddir)/src/mesh/libgnunetmesh.la
203 test_mesh_local_traffic_bck_DEPENDENCIES = \
204   libgnunetmesh.la
205
206 test_mesh_local_traffic_both_SOURCES = \
207  test_mesh_local_traffic.c
208 test_mesh_local_traffic_both_LDADD = \
209  $(top_builddir)/src/util/libgnunetutil.la \
210  $(top_builddir)/src/testing/libgnunettesting.la \
211  $(top_builddir)/src/mesh/libgnunetmesh.la
212 test_mesh_local_traffic_both_DEPENDENCIES = \
213   libgnunetmesh.la
214
215
216 test_mesh_2dtorus_SOURCES = \
217  test_mesh_2dtorus.c
218 test_mesh_2dtorus_LDADD = \
219   $(top_builddir)/src/util/libgnunetutil.la \
220   $(top_builddir)/src/testing_old/libgnunettesting_old.la
221
222 test_mesh_regex_SOURCES = \
223  test_mesh_regex.c
224 test_mesh_regex_LDADD = \
225   $(top_builddir)/src/mesh/libgnunetmesh.la \
226   $(top_builddir)/src/util/libgnunetutil.la \
227   $(top_builddir)/src/testing_old/libgnunettesting_old.la
228 test_mesh_regex_DEPENDENCIES = \
229   libgnunetmesh.la
230
231
232 test_mesh_small_unicast_SOURCES = \
233  test_mesh_small.c
234 test_mesh_small_unicast_LDADD = \
235   $(top_builddir)/src/mesh/libgnunetmesh.la \
236   $(top_builddir)/src/util/libgnunetutil.la \
237   $(top_builddir)/src/testing_old/libgnunettesting_old.la
238 test_mesh_small_unicast_DEPENDENCIES = \
239   libgnunetmesh.la
240
241 test_mesh_small_multicast_SOURCES = \
242  test_mesh_small.c
243 test_mesh_small_multicast_LDADD = \
244   $(top_builddir)/src/mesh/libgnunetmesh.la \
245   $(top_builddir)/src/util/libgnunetutil.la \
246   $(top_builddir)/src/testing_old/libgnunettesting_old.la
247 test_mesh_small_multicast_DEPENDENCIES = \
248   libgnunetmesh.la
249
250 test_mesh_small_speed_ack_SOURCES = \
251  test_mesh_small.c
252 test_mesh_small_speed_ack_LDADD = \
253   $(top_builddir)/src/mesh/libgnunetmesh.la \
254   $(top_builddir)/src/util/libgnunetutil.la \
255   $(top_builddir)/src/testing_old/libgnunettesting_old.la
256 test_mesh_small_speed_ack_DEPENDENCIES = \
257   libgnunetmesh.la
258
259 test_mesh_small_speed_SOURCES = \
260  test_mesh_small.c
261 test_mesh_small_speed_LDADD = \
262   $(top_builddir)/src/mesh/libgnunetmesh.la \
263   $(top_builddir)/src/util/libgnunetutil.la \
264   $(top_builddir)/src/testing_old/libgnunettesting_old.la
265 test_mesh_small_speed_DEPENDENCIES = \
266   libgnunetmesh.la
267
268 test_mesh_small_speed_min_SOURCES = \
269  test_mesh_small.c
270 test_mesh_small_speed_min_LDADD = \
271   $(top_builddir)/src/mesh/libgnunetmesh.la \
272   $(top_builddir)/src/util/libgnunetutil.la \
273   $(top_builddir)/src/testing_old/libgnunettesting_old.la
274 test_mesh_small_speed_min_DEPENDENCIES = \
275   libgnunetmesh.la
276
277 test_mesh_small_speed_nobuf_SOURCES = \
278  test_mesh_small.c
279 test_mesh_small_speed_nobuf_LDADD = \
280   $(top_builddir)/src/mesh/libgnunetmesh.la \
281   $(top_builddir)/src/util/libgnunetutil.la \
282   $(top_builddir)/src/testing_old/libgnunettesting_old.la
283 test_mesh_small_speed_nobuf_DEPENDENCIES = \
284   libgnunetmesh.la
285
286 test_mesh_small_speed_backwards_SOURCES = \
287  test_mesh_small.c
288 test_mesh_small_speed_backwards_LDADD = \
289   $(top_builddir)/src/mesh/libgnunetmesh.la \
290   $(top_builddir)/src/util/libgnunetutil.la \
291   $(top_builddir)/src/testing_old/libgnunettesting_old.la
292 test_mesh_small_speed_backwards_DEPENDENCIES = \
293   libgnunetmesh.la
294
295 test_mesh_small_speed_min_backwards_SOURCES = \
296  test_mesh_small.c
297 test_mesh_small_speed_min_backwards_LDADD = \
298   $(top_builddir)/src/mesh/libgnunetmesh.la \
299   $(top_builddir)/src/util/libgnunetutil.la \
300   $(top_builddir)/src/testing_old/libgnunettesting_old.la
301 test_mesh_small_speed_min_backwards_DEPENDENCIES = \
302   libgnunetmesh.la
303
304 test_mesh_small_speed_nobuf_backwards_SOURCES = \
305  test_mesh_small.c
306 test_mesh_small_speed_nobuf_backwards_LDADD = \
307   $(top_builddir)/src/mesh/libgnunetmesh.la \
308   $(top_builddir)/src/util/libgnunetutil.la \
309   $(top_builddir)/src/testing_old/libgnunettesting_old.la
310 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = \
311   libgnunetmesh.la
312
313
314 if ENABLE_TEST_RUN
315 TESTS = test_mesh_api \
316  test_mesh_tree_api \
317  test_mesh_local_1 test_mesh_local_2 \
318  test_mesh_local_traffic_fwd \
319  test_mesh_local_traffic_bck \
320  test_mesh_local_traffic_both \
321  test_mesh_2dtorus test_mesh_regex \
322  test_mesh_small_unicast test_mesh_small_multicast \
323  test_mesh_small_speed \
324  test_mesh_small_speed_min \
325  test_mesh_small_speed_nobuf \
326  test_mesh_small_speed_backwards \
327  test_mesh_small_speed_min_backwards
328 endif
329
330 EXTRA_DIST = \
331   test_mesh.conf \
332   test_mesh_2dtorus.conf \
333   test_mesh_small.conf \
334   regex_profiler_test.conf
335