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