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