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