convert DHT API to new MQ API
[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_clients.c gnunet-service-dht_clients.h \
67  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
68  gnunet-service-dht_hello.c gnunet-service-dht_hello.h \
69  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
70  gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
71  gnunet-service-dht_routing.c gnunet-service-dht_routing.h
72 gnunet_service_dht_LDADD = \
73   $(top_builddir)/src/statistics/libgnunetstatistics.la \
74   $(top_builddir)/src/core/libgnunetcore.la \
75   $(top_builddir)/src/nse/libgnunetnse.la \
76   $(top_builddir)/src/ats/libgnunetats.la \
77   $(top_builddir)/src/transport/libgnunettransport.la \
78   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
79   $(top_builddir)/src/hello/libgnunethello.la \
80   $(top_builddir)/src/block/libgnunetblock.la \
81   $(top_builddir)/src/datacache/libgnunetdatacache.la \
82   $(top_builddir)/src/util/libgnunetutil.la \
83   -lm
84
85 gnunet_service_dht_xvine_SOURCES = \
86  gnunet-service-xdht.c gnunet-service-xdht.h \
87  gnunet-service-xdht_clients.c gnunet-service-xdht_clients.h \
88  gnunet-service-xdht_datacache.c gnunet-service-xdht_datacache.h \
89  gnunet-service-xdht_nse.c gnunet-service-xdht_nse.h \
90  gnunet-service-xdht_neighbours.c gnunet-service-xdht_neighbours.h \
91  gnunet-service-xdht_routing.c gnunet-service-xdht_routing.h
92
93 gnunet_service_dht_xvine_LDADD = \
94   $(top_builddir)/src/statistics/libgnunetstatistics.la \
95   $(top_builddir)/src/core/libgnunetcore.la \
96   $(top_builddir)/src/nse/libgnunetnse.la \
97   $(top_builddir)/src/ats/libgnunetats.la \
98   $(top_builddir)/src/transport/libgnunettransport.la \
99   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
100   $(top_builddir)/src/hello/libgnunethello.la \
101   $(top_builddir)/src/block/libgnunetblock.la \
102   $(top_builddir)/src/datacache/libgnunetdatacache.la \
103   $(top_builddir)/src/util/libgnunetutil.la \
104   -lm
105
106 gnunet_service_dht_whanau_SOURCES = \
107  gnunet-service-wdht.c gnunet-service-wdht.h \
108  gnunet-service-wdht_clients.c gnunet-service-wdht_clients.h \
109  gnunet-service-wdht_datacache.c gnunet-service-wdht_datacache.h \
110  gnunet-service-wdht_nse.c gnunet-service-wdht_nse.h \
111  gnunet-service-wdht_neighbours.c gnunet-service-wdht_neighbours.h
112 gnunet_service_dht_whanau_LDADD = \
113   $(top_builddir)/src/statistics/libgnunetstatistics.la \
114   $(top_builddir)/src/core/libgnunetcore.la \
115   $(top_builddir)/src/nse/libgnunetnse.la \
116   $(top_builddir)/src/ats/libgnunetats.la \
117   $(top_builddir)/src/transport/libgnunettransport.la \
118   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
119   $(top_builddir)/src/hello/libgnunethello.la \
120   $(top_builddir)/src/block/libgnunetblock.la \
121   $(top_builddir)/src/datacache/libgnunetdatacache.la \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   -lm
124
125 gnunet_dht_get_SOURCES = \
126  gnunet-dht-get.c
127 gnunet_dht_get_LDADD = \
128   libgnunetdht.la \
129   $(top_builddir)/src/core/libgnunetcore.la \
130   $(top_builddir)/src/util/libgnunetutil.la
131
132 gnunet_dht_put_SOURCES = \
133  gnunet-dht-put.c
134 gnunet_dht_put_LDADD = \
135   libgnunetdht.la \
136   $(top_builddir)/src/core/libgnunetcore.la \
137   $(top_builddir)/src/util/libgnunetutil.la
138
139 gnunet_dht_monitor_SOURCES = \
140  gnunet-dht-monitor.c
141 gnunet_dht_monitor_LDADD = \
142   libgnunetdht.la \
143   $(top_builddir)/src/core/libgnunetcore.la \
144   $(top_builddir)/src/util/libgnunetutil.la
145
146 gnunet_dht_profiler_SOURCES = \
147   gnunet_dht_profiler.c
148 gnunet_dht_profiler_LDADD = \
149   libgnunetdht.la \
150   $(top_builddir)/src/core/libgnunetcore.la \
151   $(top_builddir)/src/util/libgnunetutil.la \
152  $(top_builddir)/src/testbed/libgnunettestbed.la
153
154 if HAVE_TESTING
155 noinst_LIBRARIES = libgnunetdhttest.a
156 endif
157
158 libgnunetdhttest_a_SOURCES = \
159   dht_test_lib.c dht_test_lib.h
160 libgnunetdhttest_a_LIBADD = \
161  $(top_builddir)/src/util/libgnunetutil.la \
162  $(top_builddir)/src/testbed/libgnunettestbed.la \
163  libgnunetdht.la
164
165 if HAVE_TESTING
166 check_PROGRAMS = \
167  test_dht_api \
168  test_dht_twopeer \
169  test_dht_multipeer \
170  test_dht_line \
171  test_dht_2dtorus \
172  test_dht_monitor
173 endif
174
175 if HAVE_EXPERIMENTAL
176 # These tests still do not work as testbed does
177 # not support the respective topology op
178  NEW_TESTS = test_dht_2dtorus test_dht_multipeer
179 endif
180
181 if ENABLE_TEST_RUN
182 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
183 TESTS = test_dht_api $(check_SCRIPTS) \
184  test_dht_twopeer \
185  test_dht_line \
186  test_dht_monitor \
187  $(NEW_TESTS)
188 endif
189
190 test_dht_api_SOURCES = \
191  test_dht_api.c
192 test_dht_api_LDADD = \
193  $(top_builddir)/src/util/libgnunetutil.la \
194  $(top_builddir)/src/testing/libgnunettesting.la \
195  $(top_builddir)/src/hello/libgnunethello.la \
196  libgnunetdht.la
197
198 test_dht_twopeer_SOURCES = \
199  test_dht_topo.c
200 test_dht_twopeer_LDADD = \
201  libgnunetdhttest.a \
202  $(top_builddir)/src/util/libgnunetutil.la \
203  libgnunetdhttest.a \
204  $(top_builddir)/src/testbed/libgnunettestbed.la \
205  libgnunetdht.la
206
207 test_dht_2dtorus_SOURCES = \
208  test_dht_topo.c
209 test_dht_2dtorus_LDADD = \
210  libgnunetdhttest.a \
211  $(top_builddir)/src/util/libgnunetutil.la \
212  $(top_builddir)/src/testbed/libgnunettestbed.la \
213  libgnunetdht.la
214
215 test_dht_line_SOURCES = \
216  test_dht_topo.c
217 test_dht_line_LDADD = \
218  libgnunetdhttest.a \
219  $(top_builddir)/src/util/libgnunetutil.la \
220  $(top_builddir)/src/testbed/libgnunettestbed.la \
221  libgnunetdht.la
222
223 test_dht_multipeer_SOURCES = \
224  test_dht_topo.c
225 test_dht_multipeer_LDADD = \
226  libgnunetdhttest.a \
227  $(top_builddir)/src/util/libgnunetutil.la \
228  $(top_builddir)/src/statistics/libgnunetstatistics.la \
229  $(top_builddir)/src/testbed/libgnunettestbed.la \
230  libgnunetdht.la
231
232 test_dht_monitor_SOURCES = \
233   test_dht_monitor.c
234 test_dht_monitor_LDADD = \
235  libgnunetdhttest.a \
236  $(top_builddir)/src/util/libgnunetutil.la \
237  $(top_builddir)/src/testbed/libgnunettestbed.la \
238  libgnunetdht.la
239
240 EXTRA_DIST = \
241   $(check_SCRIPTS) \
242   test_dht_api_data.conf \
243   test_dht_api_peer1.conf \
244   test_dht_monitor.conf \
245   test_dht_multipeer.conf \
246   test_dht_2dtorus.conf \
247   test_dht_line.conf \
248   test_dht_tools.py.in \
249   test_dht_multipeer_topology.dat
250
251 if HAVE_PYTHON
252 check_SCRIPTS = \
253   test_dht_tools.py
254 endif
255
256 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
257
258 %.py: %.py.in Makefile
259         $(do_subst) < $(srcdir)/$< > $@
260         chmod +x $@
261
262 test_dht_tools.py: test_dht_tools.py.in Makefile
263         $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
264         chmod +x test_dht_tools.py