fix for mantis 2445
[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  gnunet-service-mesh_new
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  $(top_builddir)/src/block/libgnunetblock.la \
41  libgnunetmeshblock.la
42
43
44 gnunet_service_mesh_SOURCES = \
45  gnunet-service-mesh.c \
46  mesh_tunnel_tree.c mesh_tunnel_tree.h
47 gnunet_service_mesh_LDADD = \
48   $(top_builddir)/src/core/libgnunetcore.la \
49   $(top_builddir)/src/dht/libgnunetdht.la \
50   $(top_builddir)/src/block/libgnunetblock.la \
51   $(top_builddir)/src/util/libgnunetutil.la
52 gnunet_service_mesh_DEPENDENCIES = \
53   $(top_builddir)/src/core/libgnunetcore.la \
54   $(top_builddir)/src/block/libgnunetblock.la \
55   $(top_builddir)/src/dht/libgnunetdht.la \
56   $(top_builddir)/src/util/libgnunetutil.la
57
58 gnunet_service_mesh_new_SOURCES = \
59  gnunet-service-mesh_new.c \
60  mesh_tunnel_tree.c mesh_tunnel_tree.h
61 gnunet_service_mesh_new_LDADD = \
62   $(top_builddir)/src/mesh/libgnunetmeshblock.la \
63   $(top_builddir)/src/core/libgnunetcore.la\
64   $(top_builddir)/src/dht/libgnunetdht.la \
65   $(top_builddir)/src/regex/libgnunetregex.la \
66   $(top_builddir)/src/util/libgnunetutil.la
67 gnunet_service_mesh_new_DEPENDENCIES = \
68   libgnunetmeshblock.la \
69   $(top_builddir)/src/core/libgnunetcore.la\
70   $(top_builddir)/src/regex/libgnunetregex.la \
71   $(top_builddir)/src/dht/libgnunetdht.la \
72   $(top_builddir)/src/util/libgnunetutil.la
73
74 libgnunetmesh_la_SOURCES = \
75   mesh_api.c mesh.h mesh_protocol.h
76 libgnunetmesh_la_LIBADD = \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(XLIB) \
79   $(LTLIBINTL)
80 libgnunetmesh_la_LDFLAGS = \
81   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
82   -version-info 1:0:0
83
84 libgnunetmeshblock_la_SOURCES = \
85   mesh_block_lib.c
86 libgnunetmeshblock_la_LIBADD = \
87   $(top_builddir)/src/util/libgnunetutil.la \
88   $(XLIB) \
89   $(LTLIBINTL)
90 libgnunetmeshblock_la_LDFLAGS = \
91   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
92   -version-info 1:0:0
93
94
95 check_PROGRAMS = \
96  test_mesh_api \
97  test_mesh_tree_api \
98  test_mesh_local_1 \
99  test_mesh_local_2 \
100  test_mesh_2dtorus \
101  test_mesh_small_unicast \
102  test_mesh_small_multicast \
103  test_mesh_small_speed \
104  test_mesh_small_speed_ack
105
106 test_mesh_api_SOURCES = \
107  test_mesh_api.c
108 test_mesh_api_LDADD = \
109  $(top_builddir)/src/util/libgnunetutil.la \
110  $(top_builddir)/src/testing/libgnunettesting.la \
111  $(top_builddir)/src/mesh/libgnunetmesh.la
112 test_mesh_api_DEPENDENCIES = \
113   libgnunetmesh.la \
114    $(top_builddir)/src/util/libgnunetutil.la
115
116 test_mesh_tree_api_SOURCES = \
117  test_mesh_tree_api.c
118 test_mesh_tree_api_LDADD = \
119  $(top_builddir)/src/util/libgnunetutil.la \
120  $(top_builddir)/src/dht/libgnunetdht.la
121 test_mesh_tree_api_DEPENDENCIES = \
122   libgnunetmesh.la \
123   $(top_builddir)/src/dht/libgnunetdht.la
124
125 test_mesh_local_1_SOURCES = \
126  test_mesh_local_1.c
127 test_mesh_local_1_LDADD = \
128  $(top_builddir)/src/util/libgnunetutil.la \
129  $(top_builddir)/src/testing/libgnunettesting.la \
130  $(top_builddir)/src/mesh/libgnunetmesh.la
131 test_mesh_local_1_DEPENDENCIES = \
132   libgnunetmesh.la
133
134 test_mesh_local_2_SOURCES = \
135  test_mesh_local_2.c
136 test_mesh_local_2_LDADD = \
137  $(top_builddir)/src/util/libgnunetutil.la \
138  $(top_builddir)/src/testing/libgnunettesting.la \
139  $(top_builddir)/src/mesh/libgnunetmesh.la
140 test_mesh_local_2_DEPENDENCIES = \
141   libgnunetmesh.la
142
143 test_mesh_2dtorus_SOURCES = \
144  test_mesh_2dtorus.c
145 test_mesh_2dtorus_LDADD = \
146   $(top_builddir)/src/util/libgnunetutil.la \
147   $(top_builddir)/src/testing_old/libgnunettesting_old.la
148
149 test_mesh_small_unicast_SOURCES = \
150  test_mesh_small.c
151 test_mesh_small_unicast_LDADD = \
152   $(top_builddir)/src/mesh/libgnunetmesh.la \
153   $(top_builddir)/src/util/libgnunetutil.la \
154   $(top_builddir)/src/testing_old/libgnunettesting_old.la
155 test_mesh_small_unicast_DEPENDENCIES = \
156   libgnunetmesh.la
157
158 test_mesh_small_multicast_SOURCES = \
159  test_mesh_small.c
160 test_mesh_small_multicast_LDADD = \
161   $(top_builddir)/src/mesh/libgnunetmesh.la \
162   $(top_builddir)/src/util/libgnunetutil.la \
163   $(top_builddir)/src/testing_old/libgnunettesting_old.la
164 test_mesh_small_multicast_DEPENDENCIES = \
165   libgnunetmesh.la
166
167 test_mesh_small_speed_SOURCES = \
168  test_mesh_small.c
169 test_mesh_small_speed_LDADD = \
170   $(top_builddir)/src/mesh/libgnunetmesh.la \
171   $(top_builddir)/src/util/libgnunetutil.la \
172   $(top_builddir)/src/testing_old/libgnunettesting_old.la
173 test_mesh_small_speed_DEPENDENCIES = \
174   libgnunetmesh.la
175
176 test_mesh_small_speed_ack_SOURCES = \
177  test_mesh_small.c
178 test_mesh_small_speed_ack_LDADD = \
179   $(top_builddir)/src/mesh/libgnunetmesh.la \
180   $(top_builddir)/src/util/libgnunetutil.la \
181   $(top_builddir)/src/testing_old/libgnunettesting_old.la
182 test_mesh_small_speed_ack_DEPENDENCIES = \
183   libgnunetmesh.la
184
185 if ENABLE_TEST_RUN
186 TESTS = test_mesh_api test_mesh_tree_api test_mesh_local_1 test_mesh_local_2 \
187  test_mesh_2dtorus test_mesh_small_unicast test_mesh_small_multicast
188 endif
189
190 EXTRA_DIST = \
191   test_mesh.conf \
192   test_mesh_2dtorus.conf \
193   test_mesh_small.conf \
194   test_mesh_path.conf