30593172867323190a4974c3a2f99bc60ca66ce8
[oweals/gnunet.git] / src / dht / Makefile.am
1 INCLUDES = -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
108 noinst_LIBRARIES = libgnunetdhttest.a
109
110 libgnunetdhttest_a_SOURCES = \
111   dht_test_lib.c dht_test_lib.h
112 libgnunetdhttest_a_LIBADD = \
113  $(top_builddir)/src/util/libgnunetutil.la \
114  $(top_builddir)/src/testbed/libgnunettestbed.la \
115  $(top_builddir)/src/dht/libgnunetdht.la
116 libgnunetdhttest_a_DEPENDENCIES = \
117   libgnunetdht.la   
118
119 check_PROGRAMS = \
120  test_dht_api \
121  test_dht_twopeer \
122  test_dht_multipeer \
123  test_dht_line \
124  test_dht_2dtorus \
125  test_dht_monitor
126
127 if HAVE_EXPERIMENTAL
128 # These tests still do not work as testbed does
129 # not support the respective topology op
130  NEW_TESTS = test_dht_2dtorus test_dht_multipeer 
131 endif
132
133 if ENABLE_TEST_RUN
134 TESTS = test_dht_api $(check_SCRIPTS) \
135  test_dht_twopeer \
136  test_dht_line \
137  test_dht_monitor \
138  $(NEW_TESTS) 
139 endif
140
141 test_dht_api_SOURCES = \
142  test_dht_api.c
143 test_dht_api_LDADD = \
144  $(top_builddir)/src/util/libgnunetutil.la \
145  $(top_builddir)/src/testing/libgnunettesting.la \
146  $(top_builddir)/src/hello/libgnunethello.la \
147  $(top_builddir)/src/dht/libgnunetdht.la
148 test_dht_api_DEPENDENCIES = \
149   libgnunetdht.la                           
150
151 test_dht_twopeer_SOURCES = \
152  test_dht_topo.c
153 test_dht_twopeer_LDADD = \
154  $(top_builddir)/src/dht/libgnunetdhttest.a \
155  $(top_builddir)/src/util/libgnunetutil.la \
156  $(top_builddir)/src/dht/libgnunetdhttest.a \
157  $(top_builddir)/src/testbed/libgnunettestbed.la \
158  $(top_builddir)/src/dht/libgnunetdht.la    
159 test_dht_twopeer_DEPENDENCIES = \
160   libgnunetdht.la                           
161
162 test_dht_2dtorus_SOURCES = \
163  test_dht_topo.c
164 test_dht_2dtorus_LDADD = \
165  $(top_builddir)/src/dht/libgnunetdhttest.a \
166  $(top_builddir)/src/util/libgnunetutil.la \
167  $(top_builddir)/src/testbed/libgnunettestbed.la \
168  $(top_builddir)/src/dht/libgnunetdht.la
169 test_dht_2dtorus_DEPENDENCIES = \
170   libgnunetdht.la
171
172 test_dht_line_SOURCES = \
173  test_dht_topo.c
174 test_dht_line_LDADD = \
175  $(top_builddir)/src/dht/libgnunetdhttest.a \
176  $(top_builddir)/src/util/libgnunetutil.la \
177  $(top_builddir)/src/testbed/libgnunettestbed.la \
178  $(top_builddir)/src/dht/libgnunetdht.la 
179 test_dht_line_DEPENDENCIES = \
180   libgnunetdht.la
181
182 test_dht_multipeer_SOURCES = \
183  test_dht_topo.c
184 test_dht_multipeer_LDADD = \
185  $(top_builddir)/src/dht/libgnunetdhttest.a \
186  $(top_builddir)/src/util/libgnunetutil.la \
187  $(top_builddir)/src/statistics/libgnunetstatistics.la \
188  $(top_builddir)/src/testbed/libgnunettestbed.la \
189  $(top_builddir)/src/dht/libgnunetdht.la  
190 test_dht_multipeer_DEPENDENCIES = \
191   libgnunetdht.la                           
192
193 test_dht_monitor_SOURCES = \
194   test_dht_monitor.c
195 test_dht_monitor_LDADD = \
196  $(top_builddir)/src/dht/libgnunetdhttest.a \
197  $(top_builddir)/src/util/libgnunetutil.la \
198  $(top_builddir)/src/testbed/libgnunettestbed.la \
199  $(top_builddir)/src/dht/libgnunetdht.la
200 test_dht_monitor_DEPENDENCIES = \
201   libgnunetdht.la
202
203 EXTRA_DIST = \
204   $(check_SCRIPTS) \
205   test_dht_api_data.conf \
206   test_dht_api_peer1.conf \
207   test_dht_monitor.conf \
208   test_dht_multipeer.conf \
209   test_dht_2dtorus.conf \
210   test_dht_line.conf \
211   test_dht_tools.py.in \
212   test_dht_multipeer_topology.dat
213
214 check_SCRIPTS = \
215   test_dht_tools.py
216
217 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
218
219 %.py: %.py.in Makefile
220         $(do_subst) < $(srcdir)/$< > $@
221         chmod +x $@
222
223 test_dht_tools.py: test_dht_tools.py.in Makefile
224         $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
225         chmod +x test_dht_tools.py