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