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