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