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