add $(GN_LIBINTL) to Makefile.am (fixes 0005902)
[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 gnunet_service_dht_LDFLAGS = \
80   $(GN_LIBINTL)
81
82 gnunet_dht_get_SOURCES = \
83  gnunet-dht-get.c
84 gnunet_dht_get_LDADD = \
85   libgnunetdht.la \
86   $(top_builddir)/src/core/libgnunetcore.la \
87   $(top_builddir)/src/util/libgnunetutil.la
88 gnunet_dht_get_LDFLAGS = \
89   $(GN_LIBINTL)
90
91 gnunet_dht_put_SOURCES = \
92  gnunet-dht-put.c
93 gnunet_dht_put_LDADD = \
94   libgnunetdht.la \
95   $(top_builddir)/src/core/libgnunetcore.la \
96   $(top_builddir)/src/util/libgnunetutil.la
97 gnunet_dht_put_LDFLAGS = \
98   $(GN_LIBINTL)
99
100 gnunet_dht_monitor_SOURCES = \
101  gnunet-dht-monitor.c
102 gnunet_dht_monitor_LDADD = \
103   libgnunetdht.la \
104   $(top_builddir)/src/core/libgnunetcore.la \
105   $(top_builddir)/src/util/libgnunetutil.la
106 gnunet_dht_monitor_LDFLAGS = \
107   $(GN_LIBINTL)
108
109 gnunet_dht_profiler_SOURCES = \
110   gnunet_dht_profiler.c
111 gnunet_dht_profiler_LDADD = \
112   libgnunetdht.la \
113   $(top_builddir)/src/core/libgnunetcore.la \
114   $(top_builddir)/src/util/libgnunetutil.la \
115  $(top_builddir)/src/testbed/libgnunettestbed.la
116 gnunet_dht_profiler_LDFLAGS = \
117   $(GN_LIBINTL)
118
119 if HAVE_TESTING
120 noinst_LIBRARIES = libgnunetdhttest.a
121 endif
122
123 libgnunetdhttest_a_SOURCES = \
124   dht_test_lib.c dht_test_lib.h
125 libgnunetdhttest_a_LIBADD = \
126  $(top_builddir)/src/util/libgnunetutil.la \
127  $(top_builddir)/src/testbed/libgnunettestbed.la \
128  libgnunetdht.la
129
130 if HAVE_TESTING
131 check_PROGRAMS = \
132  test_dht_api \
133  test_dht_twopeer \
134  test_dht_multipeer \
135  test_dht_line \
136  test_dht_2dtorus \
137  test_dht_monitor
138 endif
139
140 if HAVE_EXPERIMENTAL
141 # These tests still do not work as testbed does
142 # not support the respective topology op
143  NEW_TESTS = test_dht_2dtorus test_dht_multipeer
144 endif
145
146 if ENABLE_TEST_RUN
147 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
148 TESTS = test_dht_api $(check_SCRIPTS) \
149  test_dht_twopeer \
150  test_dht_line \
151  test_dht_monitor \
152  $(NEW_TESTS)
153 endif
154
155 test_dht_api_SOURCES = \
156  test_dht_api.c
157 test_dht_api_LDADD = \
158  $(top_builddir)/src/util/libgnunetutil.la \
159  $(top_builddir)/src/testing/libgnunettesting.la \
160  $(top_builddir)/src/hello/libgnunethello.la \
161  libgnunetdht.la
162
163 test_dht_twopeer_SOURCES = \
164  test_dht_topo.c
165 test_dht_twopeer_LDADD = \
166  libgnunetdhttest.a \
167  $(top_builddir)/src/util/libgnunetutil.la \
168  libgnunetdhttest.a \
169  $(top_builddir)/src/testbed/libgnunettestbed.la \
170  libgnunetdht.la
171
172 test_dht_2dtorus_SOURCES = \
173  test_dht_topo.c
174 test_dht_2dtorus_LDADD = \
175  libgnunetdhttest.a \
176  $(top_builddir)/src/util/libgnunetutil.la \
177  $(top_builddir)/src/testbed/libgnunettestbed.la \
178  libgnunetdht.la
179
180 test_dht_line_SOURCES = \
181  test_dht_topo.c
182 test_dht_line_LDADD = \
183  libgnunetdhttest.a \
184  $(top_builddir)/src/util/libgnunetutil.la \
185  $(top_builddir)/src/testbed/libgnunettestbed.la \
186  libgnunetdht.la
187
188 test_dht_multipeer_SOURCES = \
189  test_dht_topo.c
190 test_dht_multipeer_LDADD = \
191  libgnunetdhttest.a \
192  $(top_builddir)/src/util/libgnunetutil.la \
193  $(top_builddir)/src/statistics/libgnunetstatistics.la \
194  $(top_builddir)/src/testbed/libgnunettestbed.la \
195  libgnunetdht.la
196
197 test_dht_monitor_SOURCES = \
198   test_dht_monitor.c
199 test_dht_monitor_LDADD = \
200  libgnunetdhttest.a \
201  $(top_builddir)/src/util/libgnunetutil.la \
202  $(top_builddir)/src/testbed/libgnunettestbed.la \
203  libgnunetdht.la
204
205 EXTRA_DIST = \
206   $(check_SCRIPTS) \
207   gnunet-service-dht_clients.c \
208   test_dht_api_data.conf \
209   test_dht_api_peer1.conf \
210   test_dht_monitor.conf \
211   test_dht_multipeer.conf \
212   test_dht_2dtorus.conf \
213   test_dht_line.conf \
214   test_dht_tools.conf \
215   test_dht_tools.py.in \
216   test_dht_multipeer_topology.dat
217
218 if HAVE_PYTHON
219 check_SCRIPTS = \
220   test_dht_tools.py
221 endif
222
223 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' -e 's,[@]bindir[@],$(bindir),g'
224
225 SUFFIXES = .py.in .py
226 .py.in.py:
227         $(do_subst) < $(srcdir)/$< > $@
228         chmod +x $@
229
230 test_dht_tools.py: test_dht_tools.py.in Makefile
231         $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
232         chmod +x test_dht_tools.py