- debug
[oweals/gnunet.git] / src / dht / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2 if MINGW
3  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 -liconv -lstdc++ -lcomdlg32 -lgdi32
4 endif
5
6 plugindir = $(libdir)/gnunet
7
8 pkgcfgdir= $(pkgdatadir)/config.d/
9
10 libexecdir= $(pkglibdir)/libexec/
11
12 pkgcfg_DATA = \
13   dht.conf 
14
15 if USE_COVERAGE
16   AM_CFLAGS = --coverage -O0
17   XLIB = -lgcov
18 endif
19
20 lib_LTLIBRARIES = \
21  libgnunetdht.la 
22
23 libgnunetdht_la_SOURCES = \
24   dht_api.c dht.h 
25 libgnunetdht_la_LIBADD = \
26   $(top_builddir)/src/util/libgnunetutil.la \
27   $(XLIB) \
28   $(LTLIBINTL)
29 libgnunetdht_la_LDFLAGS = \
30   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
31   -version-info 2:0:2
32
33
34 plugin_LTLIBRARIES = \
35   libgnunet_plugin_block_dht.la 
36
37 libgnunet_plugin_block_dht_la_SOURCES = \
38   plugin_block_dht.c
39 libgnunet_plugin_block_dht_la_LIBADD = \
40   $(top_builddir)/src/hello/libgnunethello.la \
41   $(top_builddir)/src/block/libgnunetblock.la \
42   $(top_builddir)/src/util/libgnunetutil.la \
43   $(LTLIBINTL)
44 libgnunet_plugin_block_dht_la_LDFLAGS = \
45  $(GN_PLUGIN_LDFLAGS)
46 libgnunet_plugin_block_dht_la_DEPENDENCIES = \
47   $(top_builddir)/src/block/libgnunetblock.la 
48
49
50
51 libexec_PROGRAMS = \
52  gnunet-service-dht 
53
54 noinst_PROGRAMS = \
55  gnunet-dht-monitor \
56  gnunet-dht-get \
57  gnunet-dht-put
58
59 gnunet_service_dht_SOURCES = \
60  gnunet-service-dht.c gnunet-service-dht.h \
61  gnunet-service-dht_clients.c gnunet-service-dht_clients.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   $(top_builddir)/src/dht/libgnunetdht.la \
84   $(top_builddir)/src/core/libgnunetcore.la \
85   $(top_builddir)/src/util/libgnunetutil.la 
86 gnunet_dht_get_DEPENDENCIES = \
87   libgnunetdht.la                             
88
89 gnunet_dht_put_SOURCES = \
90  gnunet-dht-put.c         
91 gnunet_dht_put_LDADD = \
92   $(top_builddir)/src/dht/libgnunetdht.la \
93   $(top_builddir)/src/core/libgnunetcore.la \
94   $(top_builddir)/src/util/libgnunetutil.la 
95 gnunet_dht_put_DEPENDENCIES = \
96   libgnunetdht.la                             
97
98 gnunet_dht_monitor_SOURCES = \
99  gnunet-dht-monitor.c         
100 gnunet_dht_monitor_LDADD = \
101   $(top_builddir)/src/dht/libgnunetdht.la \
102   $(top_builddir)/src/core/libgnunetcore.la \
103   $(top_builddir)/src/util/libgnunetutil.la 
104 gnunet_dht_monitor_DEPENDENCIES = \
105   libgnunetdht.la                             
106
107 if HAVE_TESTING
108 noinst_LIBRARIES = libgnunetdhttest.a
109 endif
110
111 libgnunetdhttest_a_SOURCES = \
112   dht_test_lib.c dht_test_lib.h
113 libgnunetdhttest_a_LIBADD = \
114  $(top_builddir)/src/util/libgnunetutil.la \
115  $(top_builddir)/src/testbed/libgnunettestbed.la \
116  $(top_builddir)/src/dht/libgnunetdht.la
117 libgnunetdhttest_a_DEPENDENCIES = \
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 TESTS = test_dht_api $(check_SCRIPTS) \
138  test_dht_twopeer \
139  test_dht_line \
140  test_dht_monitor \
141  $(NEW_TESTS) 
142 endif
143
144 test_dht_api_SOURCES = \
145  test_dht_api.c
146 test_dht_api_LDADD = \
147  $(top_builddir)/src/util/libgnunetutil.la \
148  $(top_builddir)/src/testing/libgnunettesting.la \
149  $(top_builddir)/src/hello/libgnunethello.la \
150  $(top_builddir)/src/dht/libgnunetdht.la
151 test_dht_api_DEPENDENCIES = \
152   libgnunetdht.la                           
153
154 test_dht_twopeer_SOURCES = \
155  test_dht_topo.c
156 test_dht_twopeer_LDADD = \
157  $(top_builddir)/src/dht/libgnunetdhttest.a \
158  $(top_builddir)/src/util/libgnunetutil.la \
159  $(top_builddir)/src/dht/libgnunetdhttest.a \
160  $(top_builddir)/src/testbed/libgnunettestbed.la \
161  $(top_builddir)/src/dht/libgnunetdht.la    
162 test_dht_twopeer_DEPENDENCIES = \
163   libgnunetdht.la                           
164
165 test_dht_2dtorus_SOURCES = \
166  test_dht_topo.c
167 test_dht_2dtorus_LDADD = \
168  $(top_builddir)/src/dht/libgnunetdhttest.a \
169  $(top_builddir)/src/util/libgnunetutil.la \
170  $(top_builddir)/src/testbed/libgnunettestbed.la \
171  $(top_builddir)/src/dht/libgnunetdht.la
172 test_dht_2dtorus_DEPENDENCIES = \
173   libgnunetdht.la
174
175 test_dht_line_SOURCES = \
176  test_dht_topo.c
177 test_dht_line_LDADD = \
178  $(top_builddir)/src/dht/libgnunetdhttest.a \
179  $(top_builddir)/src/util/libgnunetutil.la \
180  $(top_builddir)/src/testbed/libgnunettestbed.la \
181  $(top_builddir)/src/dht/libgnunetdht.la 
182 test_dht_line_DEPENDENCIES = \
183   libgnunetdht.la
184
185 test_dht_multipeer_SOURCES = \
186  test_dht_topo.c
187 test_dht_multipeer_LDADD = \
188  $(top_builddir)/src/dht/libgnunetdhttest.a \
189  $(top_builddir)/src/util/libgnunetutil.la \
190  $(top_builddir)/src/statistics/libgnunetstatistics.la \
191  $(top_builddir)/src/testbed/libgnunettestbed.la \
192  $(top_builddir)/src/dht/libgnunetdht.la  
193 test_dht_multipeer_DEPENDENCIES = \
194   libgnunetdht.la                           
195
196 test_dht_monitor_SOURCES = \
197   test_dht_monitor.c
198 test_dht_monitor_LDADD = \
199  $(top_builddir)/src/dht/libgnunetdhttest.a \
200  $(top_builddir)/src/util/libgnunetutil.la \
201  $(top_builddir)/src/testbed/libgnunettestbed.la \
202  $(top_builddir)/src/dht/libgnunetdht.la
203 test_dht_monitor_DEPENDENCIES = \
204   libgnunetdht.la
205
206 EXTRA_DIST = \
207   $(check_SCRIPTS) \
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.py.in \
215   test_dht_multipeer_topology.dat
216
217 if HAVE_PYTHON
218 check_SCRIPTS = \
219   test_dht_tools.py
220 endif
221
222 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
223
224 %.py: %.py.in Makefile
225         $(do_subst) < $(srcdir)/$< > $@
226         chmod +x $@
227
228 test_dht_tools.py: test_dht_tools.py.in Makefile
229         $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
230         chmod +x test_dht_tools.py