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