- finally the last test
[oweals/gnunet.git] / src / gns / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if HAVE_GLIBCNSS
4 NSS_SUBDIR = nss
5 endif
6
7 SUBDIRS = . $(NSS_SUBDIR)
8
9 if MINGW
10   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
11   DO_W32_HELPER = gnunet-gns-helper-service-w32
12   DO_W32_NSP = libw32nsp.la
13   DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve
14   DO_W32_HS_CONF = gns-helper-service-w32.conf
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = --coverage -O0
19 endif
20
21 pkgcfgdir= $(pkgdatadir)/config.d/
22
23 plugindir = $(libdir)/gnunet
24
25 pkgcfg_DATA = \
26   gns.conf \
27   $(DO_W32_HS_CONF)
28
29 lib_LTLIBRARIES = \
30   $(DO_W32_NSP) \
31   libgnunetgns.la
32
33 if HAVE_MHD
34  DO_FCFSD=gnunet-gns-fcfsd
35 if HAVE_GNUTLS
36  DO_PROXY=gnunet-gns-proxy
37 endif
38 endif
39
40 bin_PROGRAMS = \
41   gnunet-service-gns \
42   $(DO_FCFSD) \
43         $(DO_PROXY) \
44   $(DO_W32_HELPER) \
45   $(DO_W32_NSPTOOLS) \
46   gnunet-gns \
47   gnunet-dns2gns
48
49 bin_SCRIPTS=gnunet-gns-proxy-setup-ca
50
51 check_PROGRAMS = \
52   test_gns_simple_shorten \
53   test_gns_simple_get_authority \
54   test_gns_simple_lookup \
55   test_gns_simple_delegated_lookup \
56   test_gns_simple_mx_lookup \
57         test_gns_simple_srv_lookup \
58   test_gns_simple_zkey_lookup \
59   test_gns_dht_delegated_lookup \
60   test_gns_pseu_shorten \
61   test_gns_max_queries \
62   test_gns_dht_three_peers \
63         test_gns_cname_lookup \
64         test_gns_ns_lookup \
65         test_gns_revocation \
66         test_gns_proxy
67
68
69 #  test_gns_simple_lookup
70 #  test_gns_simple_delegated_lookup
71 #  test_gns_dht_delegated_lookup
72
73
74 plugin_LTLIBRARIES = \
75   libgnunet_plugin_block_gns.la
76
77 test_gns_proxy_SOURCES = \
78   test_gns_proxy.c
79 test_gns_proxy_LDADD = -lmicrohttpd @LIBCURL@ \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(top_builddir)/src/namestore/libgnunetnamestore.la \
82   $(top_builddir)/src/gns/libgnunetgns.la \
83   $(top_builddir)/src/testing/libgnunettesting.la
84 test_gns_proxy_DEPENDENCIES = \
85   $(top_builddir)/src/util/libgnunetutil.la \
86   $(top_builddir)/src/namestore/libgnunetnamestore.la \
87   $(top_builddir)/src/gns/libgnunetgns.la \
88   $(top_builddir)/src/testbed/libgnunettesting.la
89
90 test_gns_dht_three_peers_SOURCES = \
91   test_gns_dht_three_peers.c
92 test_gns_dht_three_peers_LDADD = \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   $(top_builddir)/src/namestore/libgnunetnamestore.la \
95   $(top_builddir)/src/gns/libgnunetgns.la \
96   $(top_builddir)/src/testing/libgnunettesting.la \
97   $(top_builddir)/src/testbed/libgnunettestbed.la
98 test_gns_dht_three_peers_DEPENDENCIES = \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(top_builddir)/src/namestore/libgnunetnamestore.la \
101   $(top_builddir)/src/gns/libgnunetgns.la \
102   $(top_builddir)/src/testing/libgnunettesting.la \
103   $(top_builddir)/src/testbed/libgnunettestbed.la
104
105 test_gns_simple_lookup_SOURCES = \
106   test_gns_simple_lookup.c
107 test_gns_simple_lookup_LDADD = \
108   $(top_builddir)/src/util/libgnunetutil.la \
109   $(top_builddir)/src/namestore/libgnunetnamestore.la \
110   $(top_builddir)/src/gns/libgnunetgns.la \
111   $(top_builddir)/src/testing/libgnunettesting.la
112 test_gns_simple_lookup_DEPENDENCIES = \
113   $(top_builddir)/src/util/libgnunetutil.la \
114   $(top_builddir)/src/namestore/libgnunetnamestore.la \
115   $(top_builddir)/src/gns/libgnunetgns.la \
116   $(top_builddir)/src/testing/libgnunettesting.la
117
118 test_gns_simple_delegated_lookup_SOURCES = \
119   test_gns_simple_delegated_lookup.c
120 test_gns_simple_delegated_lookup_LDADD = \
121   $(top_builddir)/src/util/libgnunetutil.la \
122   $(top_builddir)/src/namestore/libgnunetnamestore.la \
123   $(top_builddir)/src/gns/libgnunetgns.la \
124   $(top_builddir)/src/testing/libgnunettesting.la
125 test_gns_simple_delegated_lookup_DEPENDENCIES = \
126   $(top_builddir)/src/util/libgnunetutil.la \
127   $(top_builddir)/src/namestore/libgnunetnamestore.la \
128   $(top_builddir)/src/gns/libgnunetgns.la \
129   $(top_builddir)/src/testing/libgnunettesting.la
130
131 test_gns_simple_mx_lookup_SOURCES = \
132   test_gns_simple_mx_lookup.c
133 test_gns_simple_mx_lookup_LDADD = \
134   $(top_builddir)/src/util/libgnunetutil.la \
135   $(top_builddir)/src/namestore/libgnunetnamestore.la \
136   $(top_builddir)/src/gns/libgnunetgns.la \
137   $(top_builddir)/src/testing/libgnunettesting.la
138 test_gns_simple_mx_lookup_DEPENDENCIES = \
139   $(top_builddir)/src/util/libgnunetutil.la \
140   $(top_builddir)/src/namestore/libgnunetnamestore.la \
141   $(top_builddir)/src/gns/libgnunetgns.la \
142   $(top_builddir)/src/testing/libgnunettesting.la
143
144 test_gns_simple_srv_lookup_SOURCES = \
145   test_gns_simple_srv_lookup.c
146 test_gns_simple_srv_lookup_LDADD = \
147   $(top_builddir)/src/util/libgnunetutil.la \
148   $(top_builddir)/src/namestore/libgnunetnamestore.la \
149   $(top_builddir)/src/gns/libgnunetgns.la \
150   $(top_builddir)/src/testing/libgnunettesting.la
151 test_gns_simple_srv_lookup_DEPENDENCIES = \
152   $(top_builddir)/src/util/libgnunetutil.la \
153   $(top_builddir)/src/namestore/libgnunetnamestore.la \
154   $(top_builddir)/src/gns/libgnunetgns.la \
155   $(top_builddir)/src/testing/libgnunettesting.la
156
157 test_gns_simple_zkey_lookup_SOURCES = \
158   test_gns_simple_zkey_lookup.c
159 test_gns_simple_zkey_lookup_LDADD = \
160   $(top_builddir)/src/util/libgnunetutil.la \
161   $(top_builddir)/src/namestore/libgnunetnamestore.la \
162   $(top_builddir)/src/gns/libgnunetgns.la \
163   $(top_builddir)/src/testing/libgnunettesting.la
164 test_gns_simple_zkey_lookup_DEPENDENCIES = \
165   $(top_builddir)/src/util/libgnunetutil.la \
166   $(top_builddir)/src/namestore/libgnunetnamestore.la \
167   $(top_builddir)/src/gns/libgnunetgns.la \
168   $(top_builddir)/src/testing/libgnunettesting.la
169
170 test_gns_dht_delegated_lookup_SOURCES = \
171   test_gns_dht_delegated_lookup.c
172 test_gns_dht_delegated_lookup_LDADD = \
173   $(top_builddir)/src/util/libgnunetutil.la \
174   $(top_builddir)/src/namestore/libgnunetnamestore.la \
175   $(top_builddir)/src/dht/libgnunetdht.la \
176   $(top_builddir)/src/gns/libgnunetgns.la \
177   $(top_builddir)/src/testing/libgnunettesting.la
178 test_gns_dht_delegated_lookup_DEPENDENCIES = \
179   $(top_builddir)/src/util/libgnunetutil.la \
180   $(top_builddir)/src/namestore/libgnunetnamestore.la \
181   $(top_builddir)/src/dht/libgnunetdht.la \
182   $(top_builddir)/src/gns/libgnunetgns.la \
183   $(top_builddir)/src/testing/libgnunettesting.la
184
185 test_gns_simple_shorten_SOURCES = \
186   test_gns_simple_shorten.c
187 test_gns_simple_shorten_LDADD = \
188   $(top_builddir)/src/util/libgnunetutil.la \
189   $(top_builddir)/src/namestore/libgnunetnamestore.la \
190   $(top_builddir)/src/gns/libgnunetgns.la \
191   $(top_builddir)/src/testing/libgnunettesting.la
192 test_gns_simple_shorten_DEPENDENCIES = \
193   $(top_builddir)/src/util/libgnunetutil.la \
194   $(top_builddir)/src/namestore/libgnunetnamestore.la \
195   $(top_builddir)/src/gns/libgnunetgns.la \
196   $(top_builddir)/src/testing/libgnunettesting.la
197
198 test_gns_simple_get_authority_SOURCES = \
199   test_gns_simple_get_authority.c
200 test_gns_simple_get_authority_LDADD = \
201   $(top_builddir)/src/util/libgnunetutil.la \
202   $(top_builddir)/src/namestore/libgnunetnamestore.la \
203   $(top_builddir)/src/gns/libgnunetgns.la \
204   $(top_builddir)/src/testing/libgnunettesting.la
205 test_gns_simple_get_authority_DEPENDENCIES = \
206   $(top_builddir)/src/util/libgnunetutil.la \
207   $(top_builddir)/src/namestore/libgnunetnamestore.la \
208   $(top_builddir)/src/gns/libgnunetgns.la \
209   $(top_builddir)/src/testing/libgnunettesting.la
210
211
212 test_gns_pseu_shorten_SOURCES = \
213   test_gns_pseu_shorten.c
214 test_gns_pseu_shorten_LDADD = \
215   $(top_builddir)/src/util/libgnunetutil.la \
216   $(top_builddir)/src/namestore/libgnunetnamestore.la \
217   $(top_builddir)/src/dht/libgnunetdht.la \
218   $(top_builddir)/src/gns/libgnunetgns.la \
219   $(top_builddir)/src/testing/libgnunettesting.la
220 test_gns_pseu_shorten_DEPENDENCIES = \
221   $(top_builddir)/src/util/libgnunetutil.la \
222   $(top_builddir)/src/namestore/libgnunetnamestore.la \
223   $(top_builddir)/src/dht/libgnunetdht.la \
224   $(top_builddir)/src/gns/libgnunetgns.la \
225   $(top_builddir)/src/testing/libgnunettesting.la
226
227
228 test_gns_max_queries_SOURCES = \
229   test_gns_max_queries.c
230 test_gns_max_queries_LDADD = \
231   $(top_builddir)/src/util/libgnunetutil.la \
232   $(top_builddir)/src/namestore/libgnunetnamestore.la \
233   $(top_builddir)/src/gns/libgnunetgns.la \
234   $(top_builddir)/src/testing/libgnunettesting.la
235 test_gns_max_queries_DEPENDENCIES = \
236   $(top_builddir)/src/util/libgnunetutil.la \
237   $(top_builddir)/src/namestore/libgnunetnamestore.la \
238   $(top_builddir)/src/gns/libgnunetgns.la \
239   $(top_builddir)/src/testing/libgnunettesting.la
240
241 test_gns_cname_lookup_SOURCES = \
242   test_gns_cname_lookup.c
243 test_gns_cname_lookup_LDADD = \
244   $(top_builddir)/src/util/libgnunetutil.la \
245   $(top_builddir)/src/namestore/libgnunetnamestore.la \
246   $(top_builddir)/src/gns/libgnunetgns.la \
247   $(top_builddir)/src/testing/libgnunettesting.la
248 test_gns_cname_lookup_DEPENDENCIES = \
249   $(top_builddir)/src/util/libgnunetutil.la \
250   $(top_builddir)/src/namestore/libgnunetnamestore.la \
251   $(top_builddir)/src/gns/libgnunetgns.la \
252   $(top_builddir)/src/testing/libgnunettesting.la
253
254
255 test_gns_ns_lookup_SOURCES = \
256   test_gns_ns_lookup.c
257 test_gns_ns_lookup_LDADD = \
258   $(top_builddir)/src/util/libgnunetutil.la \
259   $(top_builddir)/src/namestore/libgnunetnamestore.la \
260   $(top_builddir)/src/gns/libgnunetgns.la \
261   $(top_builddir)/src/testing/libgnunettesting.la
262 test_gns_ns_lookup_DEPENDENCIES = \
263   $(top_builddir)/src/util/libgnunetutil.la \
264   $(top_builddir)/src/namestore/libgnunetnamestore.la \
265   $(top_builddir)/src/gns/libgnunetgns.la \
266   $(top_builddir)/src/testing/libgnunettesting.la
267
268
269 test_gns_revocation_SOURCES = \
270   test_gns_revocation.c
271 test_gns_revocation_LDADD = \
272   $(top_builddir)/src/util/libgnunetutil.la \
273   $(top_builddir)/src/namestore/libgnunetnamestore.la \
274   $(top_builddir)/src/gns/libgnunetgns.la \
275   $(top_builddir)/src/testing/libgnunettesting.la
276 test_gns_revocation_DEPENDENCIES = \
277   $(top_builddir)/src/util/libgnunetutil.la \
278   $(top_builddir)/src/namestore/libgnunetnamestore.la \
279   $(top_builddir)/src/gns/libgnunetgns.la \
280   $(top_builddir)/src/testing/libgnunettesting.la
281
282
283 gnunet_gns_SOURCES = \
284  gnunet-gns.c
285 gnunet_gns_LDADD = \
286   $(top_builddir)/src/gns/libgnunetgns.la \
287   $(top_builddir)/src/util/libgnunetutil.la \
288   $(top_builddir)/src/namestore/libgnunetnamestore.la \
289   $(GN_LIBINTL)
290 gnunet_gns_DEPENDENCIES = \
291   libgnunetgns.la
292
293 gnunet_dns2gns_SOURCES = \
294  gnunet-dns2gns.c
295 gnunet_dns2gns_LDADD = \
296   $(top_builddir)/src/gns/libgnunetgns.la \
297   $(top_builddir)/src/util/libgnunetutil.la \
298   $(top_builddir)/src/namestore/libgnunetnamestore.la \
299   $(top_builddir)/src/dns/libgnunetdnsparser.la \
300         $(top_builddir)/src/dns/libgnunetdnsstub.la \
301   $(GN_LIBINTL)
302 gnunet_dns2gns_DEPENDENCIES = \
303   libgnunetgns.la
304
305 gnunet_gns_proxy_SOURCES = \
306  gnunet-gns-proxy.c gns_proxy_proto.h 
307 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
308   $(top_builddir)/src/gns/libgnunetgns.la \
309   $(top_builddir)/src/util/libgnunetutil.la \
310   $(GN_LIBINTL)
311 gnunet_gns_proxy_DEPENDENCIES = \
312   libgnunetgns.la
313
314 gnunet_gns_helper_service_w32_SOURCES = \
315   gnunet-gns-helper-service-w32.c
316 gnunet_gns_helper_service_w32_LDADD = \
317   $(top_builddir)/src/gns/libgnunetgns.la \
318   $(top_builddir)/src/util/libgnunetutil.la \
319   $(GN_LIBINTL)
320 gnunet_gns_helper_service_w32_DEPENDENCIES = \
321   libgnunetgns.la
322
323 w32nsp_install_SOURCES = \
324   w32nsp-install.c
325 w32nsp_install_LDADD = -lws2_32
326
327 w32nsp_uninstall_SOURCES = \
328   w32nsp-uninstall.c
329 w32nsp_uninstall_LDADD = -lws2_32
330
331 w32nsp_resolve_SOURCES = \
332   w32nsp-resolve.c
333 w32nsp_resolve_LDADD = -lws2_32
334
335 gnunet_service_gns_SOURCES = \
336  gnunet-service-gns.c \
337  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
338  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
339 gnunet_service_gns_LDADD = \
340   -lm \
341   $(top_builddir)/src/statistics/libgnunetstatistics.la \
342   $(top_builddir)/src/util/libgnunetutil.la \
343         $(top_builddir)/src/dns/libgnunetdns.la \
344         $(top_builddir)/src/dns/libgnunetdnsparser.la \
345         $(top_builddir)/src/dht/libgnunetdht.la \
346         $(top_builddir)/src/namestore/libgnunetnamestore.la \
347         $(top_builddir)/src/vpn/libgnunetvpn.la \
348   $(GN_LIBINTL)
349 gnunet_service_gns_DEPENDENCIES = \
350   $(top_builddir)/src/statistics/libgnunetstatistics.la \
351   $(top_builddir)/src/util/libgnunetutil.la \
352         $(top_builddir)/src/dns/libgnunetdns.la \
353         $(top_builddir)/src/dns/libgnunetdnsparser.la \
354         $(top_builddir)/src/dht/libgnunetdht.la \
355         $(top_builddir)/src/namestore/libgnunetnamestore.la \
356         $(top_builddir)/src/vpn/libgnunetvpn.la
357
358
359 gnunet_gns_fcfsd_SOURCES = \
360  gnunet-gns-fcfsd.c 
361 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
362   $(top_builddir)/src/util/libgnunetutil.la \
363   $(top_builddir)/src/namestore/libgnunetnamestore.la \
364   $(GN_LIBINTL)
365 gnunet_gns_fcfsd_DEPENDENCIES = \
366   $(top_builddir)/src/util/libgnunetutil.la \
367   $(top_builddir)/src/namestore/libgnunetnamestore.la
368
369 libw32nsp_la_SOURCES = \
370   w32nsp.c
371 libw32nsp_la_LIBADD = \
372   -lole32 -lws2_32
373 libw32nsp_la_LDFLAGS = \
374   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
375   $(GN_LIB_LDFLAGS)
376
377 libgnunetgns_la_SOURCES = \
378  gns_api.c gns.h
379 libgnunetgns_la_LIBADD = \
380  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
381  $(top_builddir)/src/namestore/libgnunetnamestore.la
382 libgnunetgns_la_LDFLAGS = \
383   $(GN_LIB_LDFLAGS)
384 libgnunetgns_la_DEPENDENCIES = \
385  $(top_builddir)/src/util/libgnunetutil.la \
386  $(top_builddir)/src/namestore/libgnunetnamestore.la
387
388 libgnunet_plugin_block_gns_la_SOURCES = \
389   plugin_block_gns.c
390 libgnunet_plugin_block_gns_la_LIBADD = \
391   $(top_builddir)/src/util/libgnunetutil.la \
392   $(top_builddir)/src/block/libgnunetblock.la \
393   $(top_builddir)/src/namestore/libgnunetnamestore.la
394 libgnunet_plugin_block_gns_la_LDFLAGS = \
395   $(GN_PLUGIN_LDFLAGS)
396 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
397   $(top_builddir)/src/util/libgnunetutil.la \
398   $(top_builddir)/src/block/libgnunetblock.la \
399   $(top_builddir)/src/namestore/libgnunetnamestore.la
400
401 #Build stub api
402 #libgnunetnamestore_la_SOURCES = \
403 # namestore_stub_api.c
404 #libgnunetnamestore_la_LIBADD = \
405 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
406 #libgnunetnamestore_la_LDFLAGS = \
407 #  $(GN_LIB_LDFLAGS)
408 #libgnunetnamestore_la_DEPENDENCIES = \
409 # $(top_builddir)/src/util/libgnunetutil.la
410
411 if ENABLE_TEST_RUN
412 if LINUX
413 TESTS = $(check_PROGRAMS)
414 endif
415 endif
416
417 EXTRA_DIST = \
418   test_gns_defaults.conf \
419   test_gns_simple_lookup.conf \
420   test_gns_dht_default.conf \
421         zonefiles/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey \
422         zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
423         zonefiles/test_zonekey
424