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