-fixing #2405
[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 pkgcfg_DATA = \
11   dht.conf 
12
13 if HAVE_ZLIB
14  ZLIB_LNK = -lz
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = --coverage -O0
19   XLIB = -lgcov
20 endif
21
22 lib_LTLIBRARIES = \
23  libgnunetdht.la 
24
25 libgnunetdht_la_SOURCES = \
26   dht_api.c dht.h 
27 libgnunetdht_la_LIBADD = \
28   $(top_builddir)/src/util/libgnunetutil.la \
29   $(XLIB) \
30   $(LTLIBINTL)
31 libgnunetdht_la_LDFLAGS = \
32   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
33   -version-info 1:0:1
34
35
36 plugin_LTLIBRARIES = \
37   libgnunet_plugin_block_dht.la 
38
39 libgnunet_plugin_block_dht_la_SOURCES = \
40   plugin_block_dht.c
41 libgnunet_plugin_block_dht_la_LIBADD = \
42   $(top_builddir)/src/hello/libgnunethello.la \
43   $(top_builddir)/src/block/libgnunetblock.la \
44   $(top_builddir)/src/util/libgnunetutil.la \
45   $(LTLIBINTL)
46 libgnunet_plugin_block_dht_la_LDFLAGS = \
47  $(GN_PLUGIN_LDFLAGS)
48 libgnunet_plugin_block_dht_la_DEPENDENCIES = \
49   $(top_builddir)/src/block/libgnunetblock.la 
50
51
52
53 bin_PROGRAMS = \
54  gnunet-service-dht \
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 check_PROGRAMS = \
109  test_dht_api \
110  test_dht_twopeer \
111  test_dht_twopeer_put_get \
112  test_dht_twopeer_get_put \
113  test_dht_twopeer_path_tracking \
114  test_dht_multipeer \
115  test_dht_line \
116  test_dht_2dtorus \
117  test_dht_monitor
118
119 if ENABLE_TEST_RUN
120 TESTS = test_dht_api $(check_SCRIPTS) \
121  test_dht_twopeer \
122  test_dht_twopeer_put_get \
123  test_dht_twopeer_get_put \
124  test_dht_twopeer_path_tracking \
125  test_dht_multipeer  \
126  test_dht_line \
127  test_dht_2dtorus \
128  test_dht_monitor
129 endif
130
131 test_dht_api_SOURCES = \
132  test_dht_api.c
133 test_dht_api_LDADD = \
134  $(top_builddir)/src/util/libgnunetutil.la \
135  $(top_builddir)/src/hello/libgnunethello.la \
136  $(top_builddir)/src/dht/libgnunetdht.la
137 test_dht_api_DEPENDENCIES = \
138   libgnunetdht.la                           
139
140 test_dht_twopeer_SOURCES = \
141  test_dht_twopeer.c
142 test_dht_twopeer_LDADD = \
143  $(top_builddir)/src/util/libgnunetutil.la \
144  $(top_builddir)/src/testing/libgnunettesting.la \
145  $(top_builddir)/src/dht/libgnunetdht.la    
146 test_dht_twopeer_DEPENDENCIES = \
147   libgnunetdht.la                           
148
149 test_dht_twopeer_put_get_SOURCES = \
150  test_dht_twopeer_put_get.c
151 test_dht_twopeer_put_get_LDADD = \
152  $(top_builddir)/src/util/libgnunetutil.la \
153  $(top_builddir)/src/testing/libgnunettesting.la \
154  $(top_builddir)/src/dht/libgnunetdht.la   
155
156 test_dht_twopeer_get_put_SOURCES = \
157  test_dht_twopeer_get_put.c
158 test_dht_twopeer_get_put_LDADD = \
159  $(top_builddir)/src/util/libgnunetutil.la \
160  $(top_builddir)/src/testing/libgnunettesting.la \
161  $(top_builddir)/src/dht/libgnunetdht.la   
162
163 test_dht_twopeer_path_tracking_SOURCES = \
164  test_dht_twopeer_path_tracking.c
165 test_dht_twopeer_path_tracking_LDADD = \
166  $(top_builddir)/src/util/libgnunetutil.la \
167  $(top_builddir)/src/testing/libgnunettesting.la \
168  $(top_builddir)/src/dht/libgnunetdht.la   
169
170 test_dht_multipeer_SOURCES = \
171  test_dht_multipeer.c
172 test_dht_multipeer_LDADD = \
173  $(top_builddir)/src/util/libgnunetutil.la \
174  $(top_builddir)/src/statistics/libgnunetstatistics.la \
175  $(top_builddir)/src/testing/libgnunettesting.la \
176  $(top_builddir)/src/dht/libgnunetdht.la  
177 test_dht_multipeer_DEPENDENCIES = \
178   libgnunetdht.la                           
179
180 test_dht_2dtorus_SOURCES = \
181  test_dht_topo.c
182 test_dht_2dtorus_LDADD = \
183  $(top_builddir)/src/util/libgnunetutil.la \
184  $(top_builddir)/src/testing/libgnunettesting.la \
185  $(top_builddir)/src/dht/libgnunetdht.la
186 test_dht_2dtorus_DEPENDENCIES = \
187   libgnunetdht.la
188
189 test_dht_line_SOURCES = \
190  test_dht_topo.c
191 test_dht_line_LDADD = \
192  $(top_builddir)/src/util/libgnunetutil.la \
193  $(top_builddir)/src/testing/libgnunettesting.la \
194  $(top_builddir)/src/dht/libgnunetdht.la
195 test_dht_line_DEPENDENCIES = \
196   libgnunetdht.la
197
198 test_dht_monitor_SOURCES = test_dht_monitor.c
199 test_dht_monitor_LDADD = \
200  $(top_builddir)/src/util/libgnunetutil.la \
201  $(top_builddir)/src/testing/libgnunettesting.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_twopeer_data.conf \
211   test_dht_multipeer_data.conf \
212   test_dht_2dtorus.conf \
213   test_dht_line.conf \
214   multipeer_topo.dat
215
216 check_SCRIPTS = \
217   test_dht_tools.sh