- next 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_threepeer \
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/testing/libgnunettesting.la
89
90 test_gns_dht_threepeer_SOURCES = \
91   test_gns_dht_threepeer.c
92 test_gns_dht_threepeer_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_old/libgnunettesting_old.la
97 test_gns_dht_threepeer_DEPENDENCIES = \
98   $(top_builddir)/src/util/libgnunetutil.la \
99   $(top_builddir)/src/namestore/libgnunetnamestore.la \
100   $(top_builddir)/src/gns/libgnunetgns.la \
101   $(top_builddir)/src/testing_old/libgnunettesting_old.la
102
103 test_gns_simple_lookup_SOURCES = \
104   test_gns_simple_lookup.c
105 test_gns_simple_lookup_LDADD = \
106   $(top_builddir)/src/util/libgnunetutil.la \
107   $(top_builddir)/src/namestore/libgnunetnamestore.la \
108   $(top_builddir)/src/gns/libgnunetgns.la \
109   $(top_builddir)/src/testing/libgnunettesting.la
110 test_gns_simple_lookup_DEPENDENCIES = \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(top_builddir)/src/namestore/libgnunetnamestore.la \
113   $(top_builddir)/src/gns/libgnunetgns.la \
114   $(top_builddir)/src/testing/libgnunettesting.la
115
116 test_gns_simple_delegated_lookup_SOURCES = \
117   test_gns_simple_delegated_lookup.c
118 test_gns_simple_delegated_lookup_LDADD = \
119   $(top_builddir)/src/util/libgnunetutil.la \
120   $(top_builddir)/src/namestore/libgnunetnamestore.la \
121   $(top_builddir)/src/gns/libgnunetgns.la \
122   $(top_builddir)/src/testing/libgnunettesting.la
123 test_gns_simple_delegated_lookup_DEPENDENCIES = \
124   $(top_builddir)/src/util/libgnunetutil.la \
125   $(top_builddir)/src/namestore/libgnunetnamestore.la \
126   $(top_builddir)/src/gns/libgnunetgns.la \
127   $(top_builddir)/src/testing/libgnunettesting.la
128
129 test_gns_simple_mx_lookup_SOURCES = \
130   test_gns_simple_mx_lookup.c
131 test_gns_simple_mx_lookup_LDADD = \
132   $(top_builddir)/src/util/libgnunetutil.la \
133   $(top_builddir)/src/namestore/libgnunetnamestore.la \
134   $(top_builddir)/src/gns/libgnunetgns.la \
135   $(top_builddir)/src/testing/libgnunettesting.la
136 test_gns_simple_mx_lookup_DEPENDENCIES = \
137   $(top_builddir)/src/util/libgnunetutil.la \
138   $(top_builddir)/src/namestore/libgnunetnamestore.la \
139   $(top_builddir)/src/gns/libgnunetgns.la \
140   $(top_builddir)/src/testing/libgnunettesting.la
141
142 test_gns_simple_srv_lookup_SOURCES = \
143   test_gns_simple_srv_lookup.c
144 test_gns_simple_srv_lookup_LDADD = \
145   $(top_builddir)/src/util/libgnunetutil.la \
146   $(top_builddir)/src/namestore/libgnunetnamestore.la \
147   $(top_builddir)/src/gns/libgnunetgns.la \
148   $(top_builddir)/src/testing/libgnunettesting.la
149 test_gns_simple_srv_lookup_DEPENDENCIES = \
150   $(top_builddir)/src/util/libgnunetutil.la \
151   $(top_builddir)/src/namestore/libgnunetnamestore.la \
152   $(top_builddir)/src/gns/libgnunetgns.la \
153   $(top_builddir)/src/testing/libgnunettesting.la
154
155 test_gns_simple_zkey_lookup_SOURCES = \
156   test_gns_simple_zkey_lookup.c
157 test_gns_simple_zkey_lookup_LDADD = \
158   $(top_builddir)/src/util/libgnunetutil.la \
159   $(top_builddir)/src/namestore/libgnunetnamestore.la \
160   $(top_builddir)/src/gns/libgnunetgns.la \
161   $(top_builddir)/src/testing/libgnunettesting.la
162 test_gns_simple_zkey_lookup_DEPENDENCIES = \
163   $(top_builddir)/src/util/libgnunetutil.la \
164   $(top_builddir)/src/namestore/libgnunetnamestore.la \
165   $(top_builddir)/src/gns/libgnunetgns.la \
166   $(top_builddir)/src/testing/libgnunettesting.la
167
168 test_gns_dht_delegated_lookup_SOURCES = \
169   test_gns_dht_delegated_lookup.c
170 test_gns_dht_delegated_lookup_LDADD = \
171   $(top_builddir)/src/util/libgnunetutil.la \
172   $(top_builddir)/src/namestore/libgnunetnamestore.la \
173   $(top_builddir)/src/dht/libgnunetdht.la \
174   $(top_builddir)/src/gns/libgnunetgns.la \
175   $(top_builddir)/src/testing/libgnunettesting.la
176 test_gns_dht_delegated_lookup_DEPENDENCIES = \
177   $(top_builddir)/src/util/libgnunetutil.la \
178   $(top_builddir)/src/namestore/libgnunetnamestore.la \
179   $(top_builddir)/src/dht/libgnunetdht.la \
180   $(top_builddir)/src/gns/libgnunetgns.la \
181   $(top_builddir)/src/testing/libgnunettesting.la
182
183 test_gns_simple_shorten_SOURCES = \
184   test_gns_simple_shorten.c
185 test_gns_simple_shorten_LDADD = \
186   $(top_builddir)/src/util/libgnunetutil.la \
187   $(top_builddir)/src/namestore/libgnunetnamestore.la \
188   $(top_builddir)/src/gns/libgnunetgns.la \
189   $(top_builddir)/src/testing/libgnunettesting.la
190 test_gns_simple_shorten_DEPENDENCIES = \
191   $(top_builddir)/src/util/libgnunetutil.la \
192   $(top_builddir)/src/namestore/libgnunetnamestore.la \
193   $(top_builddir)/src/gns/libgnunetgns.la \
194   $(top_builddir)/src/testing/libgnunettesting.la
195
196 test_gns_simple_get_authority_SOURCES = \
197   test_gns_simple_get_authority.c
198 test_gns_simple_get_authority_LDADD = \
199   $(top_builddir)/src/util/libgnunetutil.la \
200   $(top_builddir)/src/namestore/libgnunetnamestore.la \
201   $(top_builddir)/src/gns/libgnunetgns.la \
202   $(top_builddir)/src/testing/libgnunettesting.la
203 test_gns_simple_get_authority_DEPENDENCIES = \
204   $(top_builddir)/src/util/libgnunetutil.la \
205   $(top_builddir)/src/namestore/libgnunetnamestore.la \
206   $(top_builddir)/src/gns/libgnunetgns.la \
207   $(top_builddir)/src/testing/libgnunettesting.la
208
209
210 test_gns_pseu_shorten_SOURCES = \
211   test_gns_pseu_shorten.c
212 test_gns_pseu_shorten_LDADD = \
213   $(top_builddir)/src/util/libgnunetutil.la \
214   $(top_builddir)/src/namestore/libgnunetnamestore.la \
215   $(top_builddir)/src/dht/libgnunetdht.la \
216   $(top_builddir)/src/gns/libgnunetgns.la \
217   $(top_builddir)/src/testing_old/libgnunettesting_old.la
218 test_gns_pseu_shorten_DEPENDENCIES = \
219   $(top_builddir)/src/util/libgnunetutil.la \
220   $(top_builddir)/src/namestore/libgnunetnamestore.la \
221   $(top_builddir)/src/dht/libgnunetdht.la \
222   $(top_builddir)/src/gns/libgnunetgns.la \
223   $(top_builddir)/src/testing_old/libgnunettesting_old.la
224
225
226 test_gns_max_queries_SOURCES = \
227   test_gns_max_queries.c
228 test_gns_max_queries_LDADD = \
229   $(top_builddir)/src/util/libgnunetutil.la \
230   $(top_builddir)/src/namestore/libgnunetnamestore.la \
231   $(top_builddir)/src/gns/libgnunetgns.la \
232   $(top_builddir)/src/testing_old/libgnunettesting_old.la
233 test_gns_max_queries_DEPENDENCIES = \
234   $(top_builddir)/src/util/libgnunetutil.la \
235   $(top_builddir)/src/namestore/libgnunetnamestore.la \
236   $(top_builddir)/src/gns/libgnunetgns.la \
237   $(top_builddir)/src/testing_old/libgnunettesting_old.la
238
239 test_gns_cname_lookup_SOURCES = \
240   test_gns_cname_lookup.c
241 test_gns_cname_lookup_LDADD = \
242   $(top_builddir)/src/util/libgnunetutil.la \
243   $(top_builddir)/src/namestore/libgnunetnamestore.la \
244   $(top_builddir)/src/gns/libgnunetgns.la \
245   $(top_builddir)/src/testing_old/libgnunettesting_old.la
246 test_gns_cname_lookup_DEPENDENCIES = \
247   $(top_builddir)/src/util/libgnunetutil.la \
248   $(top_builddir)/src/namestore/libgnunetnamestore.la \
249   $(top_builddir)/src/gns/libgnunetgns.la \
250   $(top_builddir)/src/testing_old/libgnunettesting_old.la
251
252
253 test_gns_ns_lookup_SOURCES = \
254   test_gns_ns_lookup.c
255 test_gns_ns_lookup_LDADD = \
256   $(top_builddir)/src/util/libgnunetutil.la \
257   $(top_builddir)/src/namestore/libgnunetnamestore.la \
258   $(top_builddir)/src/gns/libgnunetgns.la \
259   $(top_builddir)/src/testing_old/libgnunettesting_old.la
260 test_gns_ns_lookup_DEPENDENCIES = \
261   $(top_builddir)/src/util/libgnunetutil.la \
262   $(top_builddir)/src/namestore/libgnunetnamestore.la \
263   $(top_builddir)/src/gns/libgnunetgns.la \
264   $(top_builddir)/src/testing_old/libgnunettesting_old.la
265
266
267 test_gns_revocation_SOURCES = \
268   test_gns_revocation.c
269 test_gns_revocation_LDADD = \
270   $(top_builddir)/src/util/libgnunetutil.la \
271   $(top_builddir)/src/namestore/libgnunetnamestore.la \
272   $(top_builddir)/src/gns/libgnunetgns.la \
273   $(top_builddir)/src/testing_old/libgnunettesting_old.la
274 test_gns_revocation_DEPENDENCIES = \
275   $(top_builddir)/src/util/libgnunetutil.la \
276   $(top_builddir)/src/namestore/libgnunetnamestore.la \
277   $(top_builddir)/src/gns/libgnunetgns.la \
278   $(top_builddir)/src/testing_old/libgnunettesting_old.la
279
280
281 gnunet_gns_SOURCES = \
282  gnunet-gns.c
283 gnunet_gns_LDADD = \
284   $(top_builddir)/src/gns/libgnunetgns.la \
285   $(top_builddir)/src/util/libgnunetutil.la \
286   $(top_builddir)/src/namestore/libgnunetnamestore.la \
287   $(GN_LIBINTL)
288 gnunet_gns_DEPENDENCIES = \
289   libgnunetgns.la
290
291 gnunet_dns2gns_SOURCES = \
292  gnunet-dns2gns.c
293 gnunet_dns2gns_LDADD = \
294   $(top_builddir)/src/gns/libgnunetgns.la \
295   $(top_builddir)/src/util/libgnunetutil.la \
296   $(top_builddir)/src/namestore/libgnunetnamestore.la \
297   $(top_builddir)/src/dns/libgnunetdnsparser.la \
298         $(top_builddir)/src/dns/libgnunetdnsstub.la \
299   $(GN_LIBINTL)
300 gnunet_dns2gns_DEPENDENCIES = \
301   libgnunetgns.la
302
303 gnunet_gns_proxy_SOURCES = \
304  gnunet-gns-proxy.c gns_proxy_proto.h 
305 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
306   $(top_builddir)/src/gns/libgnunetgns.la \
307   $(top_builddir)/src/util/libgnunetutil.la \
308   $(GN_LIBINTL)
309 gnunet_gns_proxy_DEPENDENCIES = \
310   libgnunetgns.la
311
312 gnunet_gns_helper_service_w32_SOURCES = \
313   gnunet-gns-helper-service-w32.c
314 gnunet_gns_helper_service_w32_LDADD = \
315   $(top_builddir)/src/gns/libgnunetgns.la \
316   $(top_builddir)/src/util/libgnunetutil.la \
317   $(GN_LIBINTL)
318 gnunet_gns_helper_service_w32_DEPENDENCIES = \
319   libgnunetgns.la
320
321 w32nsp_install_SOURCES = \
322   w32nsp-install.c
323 w32nsp_install_LDADD = -lws2_32
324
325 w32nsp_uninstall_SOURCES = \
326   w32nsp-uninstall.c
327 w32nsp_uninstall_LDADD = -lws2_32
328
329 w32nsp_resolve_SOURCES = \
330   w32nsp-resolve.c
331 w32nsp_resolve_LDADD = -lws2_32
332
333 gnunet_service_gns_SOURCES = \
334  gnunet-service-gns.c \
335  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
336  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
337 gnunet_service_gns_LDADD = \
338   -lm \
339   $(top_builddir)/src/statistics/libgnunetstatistics.la \
340   $(top_builddir)/src/util/libgnunetutil.la \
341         $(top_builddir)/src/dns/libgnunetdns.la \
342         $(top_builddir)/src/dns/libgnunetdnsparser.la \
343         $(top_builddir)/src/dht/libgnunetdht.la \
344         $(top_builddir)/src/namestore/libgnunetnamestore.la \
345         $(top_builddir)/src/vpn/libgnunetvpn.la \
346   $(GN_LIBINTL)
347 gnunet_service_gns_DEPENDENCIES = \
348   $(top_builddir)/src/statistics/libgnunetstatistics.la \
349   $(top_builddir)/src/util/libgnunetutil.la \
350         $(top_builddir)/src/dns/libgnunetdns.la \
351         $(top_builddir)/src/dns/libgnunetdnsparser.la \
352         $(top_builddir)/src/dht/libgnunetdht.la \
353         $(top_builddir)/src/namestore/libgnunetnamestore.la \
354         $(top_builddir)/src/vpn/libgnunetvpn.la
355
356
357 gnunet_gns_fcfsd_SOURCES = \
358  gnunet-gns-fcfsd.c 
359 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
360   $(top_builddir)/src/util/libgnunetutil.la \
361   $(top_builddir)/src/namestore/libgnunetnamestore.la \
362   $(GN_LIBINTL)
363 gnunet_gns_fcfsd_DEPENDENCIES = \
364   $(top_builddir)/src/util/libgnunetutil.la \
365   $(top_builddir)/src/namestore/libgnunetnamestore.la
366
367 libw32nsp_la_SOURCES = \
368   w32nsp.c
369 libw32nsp_la_LIBADD = \
370   -lole32 -lws2_32
371 libw32nsp_la_LDFLAGS = \
372   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
373   $(GN_LIB_LDFLAGS)
374
375 libgnunetgns_la_SOURCES = \
376  gns_api.c gns.h
377 libgnunetgns_la_LIBADD = \
378  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
379  $(top_builddir)/src/namestore/libgnunetnamestore.la
380 libgnunetgns_la_LDFLAGS = \
381   $(GN_LIB_LDFLAGS)
382 libgnunetgns_la_DEPENDENCIES = \
383  $(top_builddir)/src/util/libgnunetutil.la \
384  $(top_builddir)/src/namestore/libgnunetnamestore.la
385
386 libgnunet_plugin_block_gns_la_SOURCES = \
387   plugin_block_gns.c
388 libgnunet_plugin_block_gns_la_LIBADD = \
389   $(top_builddir)/src/util/libgnunetutil.la \
390   $(top_builddir)/src/block/libgnunetblock.la \
391   $(top_builddir)/src/namestore/libgnunetnamestore.la
392 libgnunet_plugin_block_gns_la_LDFLAGS = \
393   $(GN_PLUGIN_LDFLAGS)
394 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
395   $(top_builddir)/src/util/libgnunetutil.la \
396   $(top_builddir)/src/block/libgnunetblock.la \
397   $(top_builddir)/src/namestore/libgnunetnamestore.la
398
399 #Build stub api
400 #libgnunetnamestore_la_SOURCES = \
401 # namestore_stub_api.c
402 #libgnunetnamestore_la_LIBADD = \
403 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
404 #libgnunetnamestore_la_LDFLAGS = \
405 #  $(GN_LIB_LDFLAGS)
406 #libgnunetnamestore_la_DEPENDENCIES = \
407 # $(top_builddir)/src/util/libgnunetutil.la
408
409 if ENABLE_TEST_RUN
410 if LINUX
411 TESTS = $(check_PROGRAMS)
412 endif
413 endif
414
415 EXTRA_DIST = \
416   test_gns_defaults.conf \
417   test_gns_simple_lookup.conf \
418   test_gns_dht_default.conf \
419         zonefiles/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey \
420         zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
421         zonefiles/test_zonekey
422