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