- use proper channel_ack/data_ack
[oweals/gnunet.git] / src / mesh / Makefile.am
1 AM_CPPFLAGS = -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 EXP_LIB = \
24  libgnunetmeshenc.la
25
26 #EXP_LIBEXEC = \
27 # gnunet-service-mesh-enc
28
29 libexec_PROGRAMS = \
30  gnunet-service-mesh $(EXP_LIBEXEC)
31
32 bin_PROGRAMS = \
33  gnunet-mesh
34
35 lib_LTLIBRARIES = \
36   libgnunetmesh.la $(EXP_LIB)
37
38 plugin_LTLIBRARIES = \
39  libgnunet_plugin_block_mesh.la
40
41 libgnunet_plugin_block_mesh_la_SOURCES = \
42  plugin_block_mesh.c
43 libgnunet_plugin_block_mesh_la_LIBADD = \
44  $(top_builddir)/src/block/libgnunetblock.la \
45  $(top_builddir)/src/util/libgnunetutil.la
46 libgnunet_plugin_block_mesh_la_LDFLAGS = \
47  $(GN_PLUGIN_LDFLAGS)
48 libgnunet_plugin_block_mesh_la_DEPENDENCIES = \
49  $(top_builddir)/src/block/libgnunetblock.la \
50  $(top_builddir)/src/util/libgnunetutil.la
51
52
53 libgnunetmesh_la_SOURCES = \
54   mesh_api.c mesh_common.c
55 libgnunetmesh_la_LIBADD = \
56   $(top_builddir)/src/util/libgnunetutil.la \
57   $(XLIB) \
58   $(LTLIBINTL)
59 libgnunetmesh_la_LDFLAGS = \
60   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
61   -version-info 3:0:0
62
63
64 libgnunetmeshenc_la_SOURCES = \
65   mesh_api_enc.c mesh_common.c
66 libgnunetmeshenc_la_LIBADD = \
67   $(top_builddir)/src/util/libgnunetutil.la \
68   $(XLIB) \
69   $(LTLIBINTL)
70 libgnunetmeshenc_la_LDFLAGS = \
71   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
72   -version-info 1:0:0
73
74
75 gnunet_mesh_SOURCES = \
76   gnunet-mesh.c
77 gnunet_mesh_LDADD = \
78   $(top_builddir)/src/mesh/libgnunetmesh.la \
79   $(top_builddir)/src/util/libgnunetutil.la
80 gnunet_mesh_DEPENDENCIES = \
81   libgnunetmesh.la
82
83 gnunet_service_mesh_SOURCES = \
84  gnunet-service-mesh.c \
85  mesh_path.c \
86  mesh_common.c
87 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
88 gnunet_service_mesh_LDADD = \
89   $(top_builddir)/src/util/libgnunetutil.la \
90   $(top_builddir)/src/core/libgnunetcore.la \
91   $(top_builddir)/src/dht/libgnunetdht.la \
92   $(top_builddir)/src/statistics/libgnunetstatistics.la \
93   $(top_builddir)/src/block/libgnunetblock.la
94 gnunet_service_mesh_DEPENDENCIES = \
95   $(top_builddir)/src/util/libgnunetutil.la \
96   $(top_builddir)/src/core/libgnunetcore.la \
97   $(top_builddir)/src/dht/libgnunetdht.la \
98   $(top_builddir)/src/statistics/libgnunetstatistics.la \
99   $(top_builddir)/src/block/libgnunetblock.la
100 if LINUX
101   gnunet_service_mesh_LDFLAGS = -lrt
102 endif
103
104 gnunet_service_mesh_enc_SOURCES = \
105  gnunet-service-mesh-enc.c \
106  gnunet-service-mesh_tunnel.c \
107  gnunet-service-mesh_channel.c \
108  gnunet-service-mesh_connection.c \
109  gnunet-service-mesh_peer.c \
110  gnunet-service-mesh_dht.c \
111  gnunet-service-mesh_local.c \
112  mesh_path.c \
113  mesh_common.c
114 gnunet_service_mesh_enc_CFLAGS = $(AM_CFLAGS)
115 gnunet_service_mesh_enc_LDADD = \
116   $(top_builddir)/src/util/libgnunetutil.la \
117   $(top_builddir)/src/core/libgnunetcore.la \
118   $(top_builddir)/src/dht/libgnunetdht.la \
119   $(top_builddir)/src/statistics/libgnunetstatistics.la \
120   $(top_builddir)/src/block/libgnunetblock.la
121 gnunet_service_mesh_enc_DEPENDENCIES = \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(top_builddir)/src/core/libgnunetcore.la \
124   $(top_builddir)/src/dht/libgnunetdht.la \
125   $(top_builddir)/src/statistics/libgnunetstatistics.la \
126   $(top_builddir)/src/block/libgnunetblock.la
127 if LINUX
128   gnunet_service_mesh_enc_LDFLAGS = -lrt
129 endif
130
131
132 if HAVE_TESTING
133  noinst_LIBRARIES = libgnunetmeshtest.a $(noinst_LIB_EXP)
134 endif
135
136 libgnunetmeshtest_a_SOURCES = \
137   mesh_test_lib.c mesh_test_lib.h
138 libgnunetmeshtest_a_LIBADD = \
139  $(top_builddir)/src/util/libgnunetutil.la \
140  $(top_builddir)/src/testbed/libgnunettestbed.la \
141  $(top_builddir)/src/mesh/libgnunetmeshenc.la
142 libgnunetmeshtest_a_DEPENDENCIES = \
143   libgnunetmeshenc.la
144
145 if HAVE_TESTING
146 check_PROGRAMS = \
147   test_mesh_single \
148   test_mesh_local \
149   test_mesh_small_forward \
150   test_mesh_small_signal  \
151   test_mesh_small_speed  \
152   test_mesh_small_speed_ack  \
153   test_mesh_small_speed_nobuf  \
154   test_mesh_small_speed_backwards  \
155   test_mesh_small_speed_nobuf_backwards \
156   test_mesh_small_speed_reliable \
157   test_mesh_small_speed_reliable_backwards
158 endif
159
160 ld_mesh_test_lib = \
161   $(top_builddir)/src/util/libgnunetutil.la \
162   $(top_builddir)/src/testing/libgnunettesting.la \
163   $(top_builddir)/src/mesh/libgnunetmeshtest.a \
164   $(top_builddir)/src/mesh/libgnunetmeshenc.la \
165   $(top_builddir)/src/testbed/libgnunettestbed.la
166
167 dep_mesh_test_lib = \
168   libgnunetmeshenc.la \
169   libgnunetmeshtest.a
170
171 test_mesh_single_SOURCES = \
172   test_mesh_single.c
173 test_mesh_single_LDADD = $(ld_mesh_test_lib)
174 test_mesh_single_DEPENDENCIES = $(dep_mesh_test_lib)
175
176 test_mesh_local_SOURCES = \
177   test_mesh_local.c
178 test_mesh_local_LDADD = $(ld_mesh_test_lib)
179 test_mesh_local_DEPENDENCIES = $(dep_mesh_test_lib)
180
181 test_mesh_small_forward_SOURCES = \
182   test_mesh_small.c
183 test_mesh_small_forward_LDADD = $(ld_mesh_test_lib)
184 test_mesh_small_forward_DEPENDENCIES = $(dep_mesh_test_lib)
185
186 test_mesh_small_signal_SOURCES = \
187   test_mesh_small.c
188 test_mesh_small_signal_LDADD = $(ld_mesh_test_lib)
189 test_mesh_small_signal_DEPENDENCIES = $(dep_mesh_test_lib)
190
191 test_mesh_small_speed_SOURCES = \
192   test_mesh_small.c
193 test_mesh_small_speed_LDADD = $(ld_mesh_test_lib)
194 test_mesh_small_speed_DEPENDENCIES = $(dep_mesh_test_lib)
195
196 test_mesh_small_speed_ack_SOURCES = \
197   test_mesh_small.c
198 test_mesh_small_speed_ack_LDADD = $(ld_mesh_test_lib)
199 test_mesh_small_speed_ack_DEPENDENCIES = $(dep_mesh_test_lib)
200
201 test_mesh_small_speed_nobuf_SOURCES = \
202   test_mesh_small.c
203 test_mesh_small_speed_nobuf_LDADD = $(ld_mesh_test_lib)
204 test_mesh_small_speed_nobuf_DEPENDENCIES = $(dep_mesh_test_lib)
205
206 test_mesh_small_speed_backwards_SOURCES = \
207   test_mesh_small.c
208 test_mesh_small_speed_backwards_LDADD = $(ld_mesh_test_lib)
209 test_mesh_small_speed_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
210
211 test_mesh_small_speed_nobuf_backwards_SOURCES = \
212   test_mesh_small.c
213 test_mesh_small_speed_nobuf_backwards_LDADD = $(ld_mesh_test_lib)
214 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
215
216 test_mesh_small_speed_reliable_SOURCES = \
217   test_mesh_small.c
218 test_mesh_small_speed_reliable_LDADD = $(ld_mesh_test_lib)
219 test_mesh_small_speed_reliable_DEPENDENCIES = $(dep_mesh_test_lib)
220
221 test_mesh_small_speed_reliable_backwards_SOURCES = \
222   test_mesh_small.c
223 test_mesh_small_speed_reliable_backwards_LDADD = $(ld_mesh_test_lib)
224 test_mesh_small_speed_reliable_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
225
226
227 if ENABLE_TEST_RUN
228 TESTS = \
229  $(check_PROGRAMS)
230 endif
231
232 EXTRA_DIST = \
233   mesh.h mesh_protocol.h \
234   test_mesh.conf