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