removed debug out
[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 HAVE_MYSQL=0
8 if HAVE_MYSQL
9  MYSQL_PLUGIN = libgnunet_plugin_dhtlog_mysql.la
10 endif
11
12 if HAVE_ZLIB
13  ZLIB_LNK = -lz
14 endif
15
16 if USE_COVERAGE
17   AM_CFLAGS = --coverage -O0
18   XLIB = -lgcov
19 endif
20
21 lib_LTLIBRARIES = libgnunetdht.la \
22  libgnunetdhtlog.la
23
24 plugin_LTLIBRARIES = \
25  libgnunet_plugin_dhtlog_dummy.la $(MYSQL_PLUGIN) \
26  libgnunet_plugin_dhtlog_mysql_dump.la 
27
28 if HAVE_MYSQL
29 libgnunet_plugin_dhtlog_mysql_la_SOURCES = \
30   plugin_dhtlog_mysql.c
31 libgnunet_plugin_dhtlog_mysql_la_LIBADD = \
32   $(top_builddir)/src/util/libgnunetutil.la \
33   $(XLIB)
34 libgnunet_plugin_dhtlog_mysql_la_LDFLAGS = \
35  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient $(ZLIB_LNK)
36 endif 
37
38 libgnunet_plugin_dhtlog_dummy_la_SOURCES = \
39   plugin_dhtlog_dummy.c
40 libgnunet_plugin_dhtlog_dummy_la_LIBADD = \
41   $(top_builddir)/src/util/libgnunetutil.la \
42   $(XLIB)
43 libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \
44  $(GN_PLUGIN_LDFLAGS)
45  
46 libgnunet_plugin_dhtlog_mysql_dump_la_SOURCES = \
47   plugin_dhtlog_mysql_dump.c
48 libgnunet_plugin_dhtlog_mysql_dump_la_LIBADD = \
49   $(top_builddir)/src/util/libgnunetutil.la \
50   $(XLIB)
51 libgnunet_plugin_dhtlog_mysql_dump_la_LDFLAGS = \
52  $(GN_PLUGIN_LDFLAGS)
53
54 libgnunetdhtlog_la_SOURCES = \
55   dhtlog.c dhtlog.h
56 libgnunetdhtlog_la_LIBADD = \
57   $(top_builddir)/src/util/libgnunetutil.la
58 libgnunetdhtlog_la_LDFLAGS = \
59   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
60   -version-info 0:0:0
61
62 libgnunetdht_la_SOURCES = \
63   dht_api.c dht.h
64 libgnunetdht_la_LIBADD = \
65   $(top_builddir)/src/util/libgnunetutil.la \
66   $(XLIB)
67 libgnunetdht_la_LDFLAGS = \
68   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
69   -version-info 0:0:0
70
71 if HAVE_EXPERIMENTAL
72 STUD_PROGS =  gnunet-service-dht-can \
73  gnunet-service-dht-freenet \
74  gnunet-service-dht-kademlia \
75  gnunet-service-dht-koorde 
76 endif
77
78 bin_PROGRAMS = $(STUD_PROGS) \
79  gnunet-service-dht \
80  gnunet-dht-get \
81  gnunet-dht-get-peer \
82  gnunet-dht-put 
83
84 noinst_PROGRAMS = \
85  gnunet-dht-driver 
86
87 gnunet_service_dht_SOURCES = \
88  gnunet-service-dht.c         
89 gnunet_service_dht_LDADD = \
90   $(top_builddir)/src/statistics/libgnunetstatistics.la \
91   $(top_builddir)/src/core/libgnunetcore.la \
92   $(top_builddir)/src/transport/libgnunettransport.la \
93   $(top_builddir)/src/hello/libgnunethello.la \
94   $(top_builddir)/src/datacache/libgnunetdatacache.la \
95   $(top_builddir)/src/util/libgnunetutil.la \
96   $(top_builddir)/src/dht/libgnunetdhtlog.la
97
98 gnunet_service_dht_can_SOURCES = \
99  dht_can.c dht_can_helper.c dht_can_helper.h
100 gnunet_service_dht_can_LDADD = \
101   $(top_builddir)/src/statistics/libgnunetstatistics.la \
102   $(top_builddir)/src/core/libgnunetcore.la \
103   $(top_builddir)/src/transport/libgnunettransport.la \
104   $(top_builddir)/src/hello/libgnunethello.la \
105   $(top_builddir)/src/datacache/libgnunetdatacache.la \
106   $(top_builddir)/src/util/libgnunetutil.la 
107
108 gnunet_service_dht_freenet_SOURCES = \
109  dht_freenet.c 
110 gnunet_service_dht_freenet_LDADD = \
111   $(top_builddir)/src/statistics/libgnunetstatistics.la \
112   $(top_builddir)/src/core/libgnunetcore.la \
113   $(top_builddir)/src/transport/libgnunettransport.la \
114   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
115   $(top_builddir)/src/hello/libgnunethello.la \
116   $(top_builddir)/src/datacache/libgnunetdatacache.la \
117   $(top_builddir)/src/util/libgnunetutil.la 
118
119 gnunet_service_dht_kademlia_SOURCES = \
120  dht_kademlia.c dht_kademlia.h
121 gnunet_service_dht_kademlia_LDADD = \
122   $(top_builddir)/src/statistics/libgnunetstatistics.la \
123   $(top_builddir)/src/core/libgnunetcore.la \
124   $(top_builddir)/src/transport/libgnunettransport.la \
125   $(top_builddir)/src/hello/libgnunethello.la \
126   $(top_builddir)/src/datacache/libgnunetdatacache.la \
127   $(top_builddir)/src/util/libgnunetutil.la 
128
129 gnunet_service_dht_koorde_SOURCES = \
130  dht_koorde.c dht_koorde.h
131 gnunet_service_dht_koorde_LDADD = \
132   $(top_builddir)/src/statistics/libgnunetstatistics.la \
133   $(top_builddir)/src/core/libgnunetcore.la \
134   $(top_builddir)/src/transport/libgnunettransport.la \
135   $(top_builddir)/src/hello/libgnunethello.la \
136   $(top_builddir)/src/datacache/libgnunetdatacache.la \
137   $(top_builddir)/src/util/libgnunetutil.la 
138
139 #gnunet_service_dht_new_SOURCES = \
140 # gnunet-service-dht-new.c         
141 #gnunet_service_dht_new_LDADD = \
142 #  $(top_builddir)/src/statistics/libgnunetstatistics.la \
143 #  $(top_builddir)/src/core/libgnunetcore.la \
144 #  $(top_builddir)/src/transport/libgnunettransport.la \
145 #  $(top_builddir)/src/hello/libgnunethello.la \
146 #  $(top_builddir)/src/datacache/libgnunetdatacache.la \
147 #  $(top_builddir)/src/util/libgnunetutil.la \
148 #  $(top_builddir)/src/dht/libgnunetdhtlog.la
149
150 gnunet_dht_get_SOURCES = \
151  gnunet-dht-get.c         
152 gnunet_dht_get_LDADD = \
153   $(top_builddir)/src/dht/libgnunetdht.la \
154   $(top_builddir)/src/core/libgnunetcore.la \
155   $(top_builddir)/src/util/libgnunetutil.la 
156
157 gnunet_dht_get_peer_SOURCES = \
158  gnunet-dht-get-peer.c         
159 gnunet_dht_get_peer_LDADD = \
160   $(top_builddir)/src/dht/libgnunetdht.la \
161   $(top_builddir)/src/hello/libgnunethello.la \
162   $(top_builddir)/src/core/libgnunetcore.la \
163   $(top_builddir)/src/util/libgnunetutil.la 
164
165 gnunet_dht_put_SOURCES = \
166  gnunet-dht-put.c         
167 gnunet_dht_put_LDADD = \
168   $(top_builddir)/src/dht/libgnunetdht.la \
169   $(top_builddir)/src/core/libgnunetcore.la \
170   $(top_builddir)/src/util/libgnunetutil.la 
171
172 gnunet_dht_driver_SOURCES = \
173  gnunet-dht-driver.c         
174 gnunet_dht_driver_LDADD = \
175   $(top_builddir)/src/dht/libgnunetdht.la \
176   $(top_builddir)/src/dht/libgnunetdhtlog.la \
177   $(top_builddir)/src/core/libgnunetcore.la \
178   $(top_builddir)/src/testing/libgnunettesting.la \
179   $(top_builddir)/src/util/libgnunetutil.la \
180   $(top_builddir)/src/dht/libgnunetdhtlog.la
181
182 check_PROGRAMS = \
183  test_dht_api \
184  test_dht_twopeer \
185  test_dht_twopeer_put_get \
186  test_dht_multipeer \
187  test_dhtlog
188
189 if !DISABLE_TEST_RUN
190 TESTS = test_dht_api $(check_SCRIPTS) \
191  test_dht_twopeer \
192  test_dht_twopeer_put_get
193 endif
194
195 test_dht_api_SOURCES = \
196  test_dht_api.c
197 test_dht_api_LDADD = \
198  $(top_builddir)/src/util/libgnunetutil.la \
199  $(top_builddir)/src/hello/libgnunethello.la \
200  $(top_builddir)/src/dht/libgnunetdht.la
201
202 test_dht_multipeer_SOURCES = \
203  test_dht_multipeer.c
204 test_dht_multipeer_LDADD = \
205  $(top_builddir)/src/util/libgnunetutil.la \
206  $(top_builddir)/src/testing/libgnunettesting.la \
207  $(top_builddir)/src/dht/libgnunetdht.la  
208
209 test_dht_twopeer_SOURCES = \
210  test_dht_twopeer.c
211 test_dht_twopeer_LDADD = \
212  $(top_builddir)/src/util/libgnunetutil.la \
213  $(top_builddir)/src/testing/libgnunettesting.la \
214  $(top_builddir)/src/dht/libgnunetdht.la    
215
216 test_dht_twopeer_put_get_SOURCES = \
217  test_dht_twopeer_put_get.c
218 test_dht_twopeer_put_get_LDADD = \
219  $(top_builddir)/src/util/libgnunetutil.la \
220  $(top_builddir)/src/testing/libgnunettesting.la \
221  $(top_builddir)/src/dht/libgnunetdht.la   
222
223 test_dhtlog_SOURCES = \
224  test_dhtlog.c
225 test_dhtlog_LDADD = \
226  $(top_builddir)/src/util/libgnunetutil.la \
227  $(top_builddir)/src/testing/libgnunettesting.la \
228  $(top_builddir)/src/dht/libgnunetdht.la \
229  $(top_builddir)/src/dht/libgnunetdhtlog.la
230
231 EXTRA_DIST = \
232   $(check_SCRIPTS) \
233   test_dht_api_data.conf \
234   test_dht_api_peer1.conf \
235   test_dht_twopeer_data.conf \
236   test_dht_multipeer_data.conf
237
238 check_SCRIPTS = \
239   test_dht_tools.sh