- prepare for different local tests
[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.h mesh_protocol.h
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 mesh_tunnel_tree.h
67 gnunet_service_mesh_LDADD = \
68   $(top_builddir)/src/util/libgnunetutil.la \
69   $(top_builddir)/src/core/libgnunetcore.la \
70   $(top_builddir)/src/dht/libgnunetdht.la \
71   $(top_builddir)/src/statistics/libgnunetstatistics.la \
72   $(top_builddir)/src/block/libgnunetblock.la \
73   $(top_builddir)/src/mesh/libgnunetmeshblock.la \
74   $(top_builddir)/src/regex/libgnunetregex.la
75 gnunet_service_mesh_DEPENDENCIES = \
76   $(top_builddir)/src/util/libgnunetutil.la \
77   $(top_builddir)/src/core/libgnunetcore.la \
78   $(top_builddir)/src/dht/libgnunetdht.la \
79   $(top_builddir)/src/statistics/libgnunetstatistics.la \
80   $(top_builddir)/src/block/libgnunetblock.la \
81   libgnunetmeshblock.la \
82   $(top_builddir)/src/regex/libgnunetregex.la
83
84 check_PROGRAMS = \
85  test_mesh_api \
86  test_mesh_tree_api \
87  test_mesh_local_1 \
88  test_mesh_local_2 \
89  test_mesh_local_traffic_fwd \
90  test_mesh_local_traffic_bck \
91  test_mesh_local_traffic_both \
92  test_mesh_2dtorus \
93  test_mesh_regex \
94  test_mesh_small_unicast \
95  test_mesh_small_multicast \
96  test_mesh_small_speed \
97  test_mesh_small_speed_ack
98
99 test_mesh_api_SOURCES = \
100  test_mesh_api.c
101 test_mesh_api_LDADD = \
102  $(top_builddir)/src/util/libgnunetutil.la \
103  $(top_builddir)/src/testing/libgnunettesting.la \
104  $(top_builddir)/src/mesh/libgnunetmesh.la
105 test_mesh_api_DEPENDENCIES = \
106   libgnunetmesh.la \
107    $(top_builddir)/src/util/libgnunetutil.la
108
109 test_mesh_tree_api_SOURCES = \
110  test_mesh_tree_api.c
111 test_mesh_tree_api_LDADD = \
112  $(top_builddir)/src/util/libgnunetutil.la \
113  $(top_builddir)/src/dht/libgnunetdht.la
114 test_mesh_tree_api_DEPENDENCIES = \
115   libgnunetmesh.la \
116   $(top_builddir)/src/dht/libgnunetdht.la
117
118 test_mesh_local_1_SOURCES = \
119  test_mesh_local_1.c
120 test_mesh_local_1_LDADD = \
121  $(top_builddir)/src/util/libgnunetutil.la \
122  $(top_builddir)/src/testing/libgnunettesting.la \
123  $(top_builddir)/src/mesh/libgnunetmesh.la
124 test_mesh_local_1_DEPENDENCIES = \
125   libgnunetmesh.la
126
127 test_mesh_local_2_SOURCES = \
128  test_mesh_local_2.c
129 test_mesh_local_2_LDADD = \
130  $(top_builddir)/src/util/libgnunetutil.la \
131  $(top_builddir)/src/testing/libgnunettesting.la \
132  $(top_builddir)/src/mesh/libgnunetmesh.la
133 test_mesh_local_2_DEPENDENCIES = \
134   libgnunetmesh.la
135
136 test_mesh_local_traffic_fwd_SOURCES = \
137  test_mesh_local_traffic.c
138 test_mesh_local_traffic_fwd_LDADD = \
139  $(top_builddir)/src/util/libgnunetutil.la \
140  $(top_builddir)/src/testing/libgnunettesting.la \
141  $(top_builddir)/src/mesh/libgnunetmesh.la
142 test_mesh_local_traffic_fwd_DEPENDENCIES = \
143   libgnunetmesh.la
144
145 test_mesh_local_traffic_bck_SOURCES = \
146  test_mesh_local_traffic.c
147 test_mesh_local_traffic_bck_LDADD = \
148  $(top_builddir)/src/util/libgnunetutil.la \
149  $(top_builddir)/src/testing/libgnunettesting.la \
150  $(top_builddir)/src/mesh/libgnunetmesh.la
151 test_mesh_local_traffic_bck_DEPENDENCIES = \
152   libgnunetmesh.la
153
154 test_mesh_local_traffic_both_SOURCES = \
155  test_mesh_local_traffic.c
156 test_mesh_local_traffic_both_LDADD = \
157  $(top_builddir)/src/util/libgnunetutil.la \
158  $(top_builddir)/src/testing/libgnunettesting.la \
159  $(top_builddir)/src/mesh/libgnunetmesh.la
160 test_mesh_local_traffic_both_DEPENDENCIES = \
161   libgnunetmesh.la
162
163
164 test_mesh_2dtorus_SOURCES = \
165  test_mesh_2dtorus.c
166 test_mesh_2dtorus_LDADD = \
167   $(top_builddir)/src/util/libgnunetutil.la \
168   $(top_builddir)/src/testing_old/libgnunettesting_old.la
169
170 test_mesh_regex_SOURCES = \
171  test_mesh_regex.c
172 test_mesh_regex_LDADD = \
173   $(top_builddir)/src/mesh/libgnunetmesh.la \
174   $(top_builddir)/src/util/libgnunetutil.la \
175   $(top_builddir)/src/testing_old/libgnunettesting_old.la
176 test_mesh_regex_DEPENDENCIES = \
177   libgnunetmesh.la
178
179
180 test_mesh_small_unicast_SOURCES = \
181  test_mesh_small.c
182 test_mesh_small_unicast_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_small_unicast_DEPENDENCIES = \
187   libgnunetmesh.la
188
189 test_mesh_small_multicast_SOURCES = \
190  test_mesh_small.c
191 test_mesh_small_multicast_LDADD = \
192   $(top_builddir)/src/mesh/libgnunetmesh.la \
193   $(top_builddir)/src/util/libgnunetutil.la \
194   $(top_builddir)/src/testing_old/libgnunettesting_old.la
195 test_mesh_small_multicast_DEPENDENCIES = \
196   libgnunetmesh.la
197
198 test_mesh_small_speed_SOURCES = \
199  test_mesh_small.c
200 test_mesh_small_speed_LDADD = \
201   $(top_builddir)/src/mesh/libgnunetmesh.la \
202   $(top_builddir)/src/util/libgnunetutil.la \
203   $(top_builddir)/src/testing_old/libgnunettesting_old.la
204 test_mesh_small_speed_DEPENDENCIES = \
205   libgnunetmesh.la
206
207 test_mesh_small_speed_ack_SOURCES = \
208  test_mesh_small.c
209 test_mesh_small_speed_ack_LDADD = \
210   $(top_builddir)/src/mesh/libgnunetmesh.la \
211   $(top_builddir)/src/util/libgnunetutil.la \
212   $(top_builddir)/src/testing_old/libgnunettesting_old.la
213 test_mesh_small_speed_ack_DEPENDENCIES = \
214   libgnunetmesh.la
215
216 if ENABLE_TEST_RUN
217 TESTS = test_mesh_api \
218  test_mesh_tree_api \
219  test_mesh_local_1 test_mesh_local_2 \
220  test_mesh_local_traffic_fwd \
221  test_mesh_local_traffic_bck \
222  test_mesh_local_traffic_both \
223  test_mesh_2dtorus test_mesh_regex \
224  test_mesh_small_unicast test_mesh_small_multicast
225 endif
226
227 EXTRA_DIST = \
228   test_mesh.conf \
229   test_mesh_2dtorus.conf \
230   test_mesh_small.conf \
231   test_mesh_path.conf