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