use gnunetcheck for the DB
[oweals/gnunet.git] / src / dht / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3 if MINGW
4  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 -liconv -lstdc++ -lcomdlg32 -lgdi32
5 endif
6
7 plugindir = $(libdir)/gnunet
8
9 pkgcfgdir= $(pkgdatadir)/config.d/
10
11 libexecdir= $(pkglibdir)/libexec/
12
13 pkgcfg_DATA = \
14   dht.conf
15
16 if USE_COVERAGE
17   AM_CFLAGS = --coverage -O0
18   XLIB = -lgcov
19 endif
20
21 lib_LTLIBRARIES = \
22  libgnunetdht.la
23
24 libgnunetdht_la_SOURCES = \
25   dht_api.c dht.h
26 libgnunetdht_la_LIBADD = \
27   $(top_builddir)/src/util/libgnunetutil.la \
28   $(XLIB) \
29   $(LTLIBINTL)
30 libgnunetdht_la_LDFLAGS = \
31   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
32   -version-info 3:0:0
33
34
35 plugin_LTLIBRARIES = \
36   libgnunet_plugin_block_dht.la
37
38 libgnunet_plugin_block_dht_la_SOURCES = \
39   plugin_block_dht.c
40 libgnunet_plugin_block_dht_la_LIBADD = \
41   $(top_builddir)/src/hello/libgnunethello.la \
42   $(top_builddir)/src/block/libgnunetblock.la \
43   $(top_builddir)/src/util/libgnunetutil.la \
44   $(LTLIBINTL)
45 libgnunet_plugin_block_dht_la_LDFLAGS = \
46  $(GN_PLUGIN_LDFLAGS)
47
48
49 libexec_PROGRAMS = \
50  gnunet-service-dht
51
52 if HAVE_EXPERIMENTAL
53 libexec_PROGRAMS += \
54  gnunet-service-dht-xvine \
55  gnunet-service-dht-whanau
56 endif
57
58 noinst_PROGRAMS = \
59  gnunet-dht-monitor \
60  gnunet-dht-get \
61  gnunet-dht-put \
62  gnunet-dht-profiler
63
64 gnunet_service_dht_SOURCES = \
65  gnunet-service-dht.c gnunet-service-dht.h \
66  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
67  gnunet-service-dht_hello.c gnunet-service-dht_hello.h \
68  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
69  gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
70  gnunet-service-dht_routing.c gnunet-service-dht_routing.h
71 gnunet_service_dht_LDADD = \
72   $(top_builddir)/src/statistics/libgnunetstatistics.la \
73   $(top_builddir)/src/core/libgnunetcore.la \
74   $(top_builddir)/src/nse/libgnunetnse.la \
75   $(top_builddir)/src/ats/libgnunetats.la \
76   $(top_builddir)/src/transport/libgnunettransport.la \
77   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
78   $(top_builddir)/src/hello/libgnunethello.la \
79   $(top_builddir)/src/block/libgnunetblock.la \
80   $(top_builddir)/src/datacache/libgnunetdatacache.la \
81   $(top_builddir)/src/util/libgnunetutil.la \
82   -lm
83
84 gnunet_service_dht_xvine_SOURCES = \
85  gnunet-service-xdht.c gnunet-service-dht.h \
86  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
87  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
88  gnunet-service-xdht_neighbours.c gnunet-service-xdht_neighbours.h \
89  gnunet-service-xdht_routing.c gnunet-service-xdht_routing.h
90
91 gnunet_service_dht_xvine_LDADD = \
92   $(top_builddir)/src/statistics/libgnunetstatistics.la \
93   $(top_builddir)/src/core/libgnunetcore.la \
94   $(top_builddir)/src/nse/libgnunetnse.la \
95   $(top_builddir)/src/ats/libgnunetats.la \
96   $(top_builddir)/src/transport/libgnunettransport.la \
97   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
98   $(top_builddir)/src/hello/libgnunethello.la \
99   $(top_builddir)/src/block/libgnunetblock.la \
100   $(top_builddir)/src/datacache/libgnunetdatacache.la \
101   $(top_builddir)/src/util/libgnunetutil.la \
102   -lm
103
104 gnunet_service_dht_whanau_SOURCES = \
105  gnunet-service-wdht.c gnunet-service-wdht.h \
106  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
107  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
108  gnunet-service-wdht_neighbours.c gnunet-service-dht_neighbours.h
109 gnunet_service_dht_whanau_LDADD = \
110   $(top_builddir)/src/statistics/libgnunetstatistics.la \
111   $(top_builddir)/src/core/libgnunetcore.la \
112   $(top_builddir)/src/nse/libgnunetnse.la \
113   $(top_builddir)/src/ats/libgnunetats.la \
114   $(top_builddir)/src/transport/libgnunettransport.la \
115   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
116   $(top_builddir)/src/hello/libgnunethello.la \
117   $(top_builddir)/src/block/libgnunetblock.la \
118   $(top_builddir)/src/datacache/libgnunetdatacache.la \
119   $(top_builddir)/src/util/libgnunetutil.la \
120   -lm
121
122 gnunet_dht_get_SOURCES = \
123  gnunet-dht-get.c
124 gnunet_dht_get_LDADD = \
125   libgnunetdht.la \
126   $(top_builddir)/src/core/libgnunetcore.la \
127   $(top_builddir)/src/util/libgnunetutil.la
128
129 gnunet_dht_put_SOURCES = \
130  gnunet-dht-put.c
131 gnunet_dht_put_LDADD = \
132   libgnunetdht.la \
133   $(top_builddir)/src/core/libgnunetcore.la \
134   $(top_builddir)/src/util/libgnunetutil.la
135
136 gnunet_dht_monitor_SOURCES = \
137  gnunet-dht-monitor.c
138 gnunet_dht_monitor_LDADD = \
139   libgnunetdht.la \
140   $(top_builddir)/src/core/libgnunetcore.la \
141   $(top_builddir)/src/util/libgnunetutil.la
142
143 gnunet_dht_profiler_SOURCES = \
144   gnunet_dht_profiler.c
145 gnunet_dht_profiler_LDADD = \
146   libgnunetdht.la \
147   $(top_builddir)/src/core/libgnunetcore.la \
148   $(top_builddir)/src/util/libgnunetutil.la \
149  $(top_builddir)/src/testbed/libgnunettestbed.la
150
151 if HAVE_TESTING
152 noinst_LIBRARIES = libgnunetdhttest.a
153 endif
154
155 libgnunetdhttest_a_SOURCES = \
156   dht_test_lib.c dht_test_lib.h
157 libgnunetdhttest_a_LIBADD = \
158  $(top_builddir)/src/util/libgnunetutil.la \
159  $(top_builddir)/src/testbed/libgnunettestbed.la \
160  libgnunetdht.la
161
162 if HAVE_TESTING
163 check_PROGRAMS = \
164  test_dht_api \
165  test_dht_twopeer \
166  test_dht_multipeer \
167  test_dht_line \
168  test_dht_2dtorus \
169  test_dht_monitor
170 endif
171
172 if HAVE_EXPERIMENTAL
173 # These tests still do not work as testbed does
174 # not support the respective topology op
175  NEW_TESTS = test_dht_2dtorus test_dht_multipeer
176 endif
177
178 if ENABLE_TEST_RUN
179 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
180 TESTS = test_dht_api $(check_SCRIPTS) \
181  test_dht_twopeer \
182  test_dht_line \
183  test_dht_monitor \
184  $(NEW_TESTS)
185 endif
186
187 test_dht_api_SOURCES = \
188  test_dht_api.c
189 test_dht_api_LDADD = \
190  $(top_builddir)/src/util/libgnunetutil.la \
191  $(top_builddir)/src/testing/libgnunettesting.la \
192  $(top_builddir)/src/hello/libgnunethello.la \
193  libgnunetdht.la
194
195 test_dht_twopeer_SOURCES = \
196  test_dht_topo.c
197 test_dht_twopeer_LDADD = \
198  libgnunetdhttest.a \
199  $(top_builddir)/src/util/libgnunetutil.la \
200  libgnunetdhttest.a \
201  $(top_builddir)/src/testbed/libgnunettestbed.la \
202  libgnunetdht.la
203
204 test_dht_2dtorus_SOURCES = \
205  test_dht_topo.c
206 test_dht_2dtorus_LDADD = \
207  libgnunetdhttest.a \
208  $(top_builddir)/src/util/libgnunetutil.la \
209  $(top_builddir)/src/testbed/libgnunettestbed.la \
210  libgnunetdht.la
211
212 test_dht_line_SOURCES = \
213  test_dht_topo.c
214 test_dht_line_LDADD = \
215  libgnunetdhttest.a \
216  $(top_builddir)/src/util/libgnunetutil.la \
217  $(top_builddir)/src/testbed/libgnunettestbed.la \
218  libgnunetdht.la
219
220 test_dht_multipeer_SOURCES = \
221  test_dht_topo.c
222 test_dht_multipeer_LDADD = \
223  libgnunetdhttest.a \
224  $(top_builddir)/src/util/libgnunetutil.la \
225  $(top_builddir)/src/statistics/libgnunetstatistics.la \
226  $(top_builddir)/src/testbed/libgnunettestbed.la \
227  libgnunetdht.la
228
229 test_dht_monitor_SOURCES = \
230   test_dht_monitor.c
231 test_dht_monitor_LDADD = \
232  libgnunetdhttest.a \
233  $(top_builddir)/src/util/libgnunetutil.la \
234  $(top_builddir)/src/testbed/libgnunettestbed.la \
235  libgnunetdht.la
236
237 EXTRA_DIST = \
238   $(check_SCRIPTS) \
239   test_dht_api_data.conf \
240   test_dht_api_peer1.conf \
241   test_dht_monitor.conf \
242   test_dht_multipeer.conf \
243   test_dht_2dtorus.conf \
244   test_dht_line.conf \
245   test_dht_tools.py.in \
246   test_dht_multipeer_topology.dat
247
248 if HAVE_PYTHON
249 check_SCRIPTS = \
250   test_dht_tools.py
251 endif
252
253 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
254
255 %.py: %.py.in Makefile
256         $(do_subst) < $(srcdir)/$< > $@
257         chmod +x $@
258
259 test_dht_tools.py: test_dht_tools.py.in Makefile
260         $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
261         chmod +x test_dht_tools.py