10177996e473e9a46cdf35c984407c354320ad78
[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_interceptor.c gnunet-service-gns_interceptor.h 
133 gnunet_service_gns_LDADD = \
134   -lm \
135   $(top_builddir)/src/statistics/libgnunetstatistics.la \
136   $(top_builddir)/src/util/libgnunetutil.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   $(top_builddir)/src/dns/libgnunetdns.la \
148   $(top_builddir)/src/dns/libgnunetdnsparser.la \
149   $(top_builddir)/src/dht/libgnunetdht.la \
150   $(top_builddir)/src/namestore/libgnunetnamestore.la \
151   $(USE_VPN)
152
153
154
155 libw32nsp_la_SOURCES = \
156   w32nsp.c
157 libw32nsp_la_LIBADD = \
158   -lole32 -lws2_32
159 libw32nsp_la_LDFLAGS = \
160   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
161   $(GN_LIB_LDFLAGS)
162
163 libgnunetgns_la_SOURCES = \
164  gns_api.c gns.h
165 libgnunetgns_la_LIBADD = \
166  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
167  $(top_builddir)/src/namestore/libgnunetnamestore.la
168 libgnunetgns_la_LDFLAGS = \
169   $(GN_LIB_LDFLAGS)
170 libgnunetgns_la_DEPENDENCIES = \
171  $(top_builddir)/src/util/libgnunetutil.la \
172  $(top_builddir)/src/namestore/libgnunetnamestore.la
173
174
175 libgnunet_plugin_block_gns_la_SOURCES = \
176   plugin_block_gns.c
177 libgnunet_plugin_block_gns_la_LIBADD = \
178   $(top_builddir)/src/util/libgnunetutil.la \
179   $(top_builddir)/src/block/libgnunetblock.la \
180   $(top_builddir)/src/namestore/libgnunetnamestore.la
181 libgnunet_plugin_block_gns_la_LDFLAGS = \
182   $(GN_PLUGIN_LDFLAGS)
183 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
184   $(top_builddir)/src/util/libgnunetutil.la \
185   $(top_builddir)/src/block/libgnunetblock.la \
186   $(top_builddir)/src/namestore/libgnunetnamestore.la
187
188 if HAVE_TESTING
189 check_PROGRAMS = \
190   test_gns_simple_shorten \
191   test_gns_simple_lookup \
192   test_gns_simple_delegated_lookup \
193   test_gns_simple_mx_lookup \
194   test_gns_simple_srv_lookup \
195   test_gns_simple_zkey_lookup \
196   test_gns_dht_delegated_lookup \
197   test_gns_pseu_shorten \
198   test_gns_max_queries \
199   test_gns_cname_lookup \
200   test_gns_ns_lookup \
201   test_gns_revocation \
202   test_gns_dht_three_peers
203  #test_gns_proxy
204 endif
205
206 if ENABLE_TEST_RUN
207 if LINUX
208 if HAVE_SQLITE
209 TESTS = $(check_PROGRAMS)
210 endif
211 endif
212 endif
213
214
215 #test_gns_proxy_SOURCES = \
216 #  test_gns_proxy.c
217 #test_gns_proxy_LDADD = -lmicrohttpd @LIBCURL@ \
218 #  $(top_builddir)/src/util/libgnunetutil.la \
219 #  $(top_builddir)/src/namestore/libgnunetnamestore.la \
220 #  $(top_builddir)/src/gns/libgnunetgns.la \
221 #  $(top_builddir)/src/testing/libgnunettesting.la
222 #test_gns_proxy_DEPENDENCIES = \
223 #  $(top_builddir)/src/util/libgnunetutil.la \
224 #  $(top_builddir)/src/namestore/libgnunetnamestore.la \
225 #  libgnunetgns.la \
226 #  $(top_builddir)/src/testing/libgnunettesting.la
227
228 test_gns_dht_three_peers_SOURCES = \
229   test_gns_dht_three_peers.c
230 test_gns_dht_three_peers_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   $(top_builddir)/src/testbed/libgnunettestbed.la
236 test_gns_dht_three_peers_DEPENDENCIES = \
237   $(top_builddir)/src/util/libgnunetutil.la \
238   $(top_builddir)/src/namestore/libgnunetnamestore.la \
239   libgnunetgns.la \
240   $(top_builddir)/src/testing/libgnunettesting.la \
241   $(top_builddir)/src/testbed/libgnunettestbed.la
242
243 test_gns_simple_lookup_SOURCES = \
244   test_gns_simple_lookup.c
245 test_gns_simple_lookup_LDADD = \
246   $(top_builddir)/src/util/libgnunetutil.la \
247   $(top_builddir)/src/namestore/libgnunetnamestore.la \
248   $(top_builddir)/src/gns/libgnunetgns.la \
249   $(top_builddir)/src/testing/libgnunettesting.la
250 test_gns_simple_lookup_DEPENDENCIES = \
251   $(top_builddir)/src/util/libgnunetutil.la \
252   $(top_builddir)/src/namestore/libgnunetnamestore.la \
253   libgnunetgns.la \
254   $(top_builddir)/src/testing/libgnunettesting.la
255
256 test_gns_simple_delegated_lookup_SOURCES = \
257   test_gns_simple_delegated_lookup.c
258 test_gns_simple_delegated_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_delegated_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_mx_lookup_SOURCES = \
270   test_gns_simple_mx_lookup.c
271 test_gns_simple_mx_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_mx_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_srv_lookup_SOURCES = \
283   test_gns_simple_srv_lookup.c
284 test_gns_simple_srv_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_srv_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_zkey_lookup_SOURCES = \
296   test_gns_simple_zkey_lookup.c
297 test_gns_simple_zkey_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_zkey_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_dht_delegated_lookup_SOURCES = \
309   test_gns_dht_delegated_lookup.c
310 test_gns_dht_delegated_lookup_LDADD = \
311   $(top_builddir)/src/util/libgnunetutil.la \
312   $(top_builddir)/src/namestore/libgnunetnamestore.la \
313   $(top_builddir)/src/dht/libgnunetdht.la \
314   $(top_builddir)/src/gns/libgnunetgns.la \
315   $(top_builddir)/src/testing/libgnunettesting.la
316 test_gns_dht_delegated_lookup_DEPENDENCIES = \
317   $(top_builddir)/src/util/libgnunetutil.la \
318   $(top_builddir)/src/namestore/libgnunetnamestore.la \
319   $(top_builddir)/src/dht/libgnunetdht.la \
320   libgnunetgns.la \
321   $(top_builddir)/src/testing/libgnunettesting.la
322
323 test_gns_simple_shorten_SOURCES = \
324   test_gns_simple_shorten.c
325 test_gns_simple_shorten_LDADD = \
326   $(top_builddir)/src/util/libgnunetutil.la \
327   $(top_builddir)/src/namestore/libgnunetnamestore.la \
328   $(top_builddir)/src/gns/libgnunetgns.la \
329   $(top_builddir)/src/testing/libgnunettesting.la
330 test_gns_simple_shorten_DEPENDENCIES = \
331   $(top_builddir)/src/util/libgnunetutil.la \
332   $(top_builddir)/src/namestore/libgnunetnamestore.la \
333   libgnunetgns.la \
334   $(top_builddir)/src/testing/libgnunettesting.la
335
336
337 test_gns_pseu_shorten_SOURCES = \
338   test_gns_pseu_shorten.c
339 test_gns_pseu_shorten_LDADD = \
340   $(top_builddir)/src/util/libgnunetutil.la \
341   $(top_builddir)/src/namestore/libgnunetnamestore.la \
342   $(top_builddir)/src/dht/libgnunetdht.la \
343   $(top_builddir)/src/gns/libgnunetgns.la \
344   $(top_builddir)/src/testing/libgnunettesting.la
345 test_gns_pseu_shorten_DEPENDENCIES = \
346   $(top_builddir)/src/util/libgnunetutil.la \
347   $(top_builddir)/src/namestore/libgnunetnamestore.la \
348   $(top_builddir)/src/dht/libgnunetdht.la \
349   libgnunetgns.la \
350   $(top_builddir)/src/testing/libgnunettesting.la
351
352
353 test_gns_max_queries_SOURCES = \
354   test_gns_max_queries.c
355 test_gns_max_queries_LDADD = \
356   $(top_builddir)/src/util/libgnunetutil.la \
357   $(top_builddir)/src/namestore/libgnunetnamestore.la \
358   $(top_builddir)/src/gns/libgnunetgns.la \
359   $(top_builddir)/src/testing/libgnunettesting.la
360 test_gns_max_queries_DEPENDENCIES = \
361   $(top_builddir)/src/util/libgnunetutil.la \
362   $(top_builddir)/src/namestore/libgnunetnamestore.la \
363   libgnunetgns.la \
364   $(top_builddir)/src/testing/libgnunettesting.la
365
366 test_gns_cname_lookup_SOURCES = \
367   test_gns_cname_lookup.c
368 test_gns_cname_lookup_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_cname_lookup_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
380 test_gns_ns_lookup_SOURCES = \
381   test_gns_ns_lookup.c
382 test_gns_ns_lookup_LDADD = \
383   $(top_builddir)/src/util/libgnunetutil.la \
384   $(top_builddir)/src/namestore/libgnunetnamestore.la \
385   $(top_builddir)/src/gns/libgnunetgns.la \
386   $(top_builddir)/src/testing/libgnunettesting.la
387 test_gns_ns_lookup_DEPENDENCIES = \
388   $(top_builddir)/src/util/libgnunetutil.la \
389   $(top_builddir)/src/namestore/libgnunetnamestore.la \
390   libgnunetgns.la \
391   $(top_builddir)/src/testing/libgnunettesting.la
392
393
394 test_gns_revocation_SOURCES = \
395   test_gns_revocation.c
396 test_gns_revocation_LDADD = \
397   $(top_builddir)/src/util/libgnunetutil.la \
398   $(top_builddir)/src/namestore/libgnunetnamestore.la \
399   $(top_builddir)/src/gns/libgnunetgns.la \
400   $(top_builddir)/src/testing/libgnunettesting.la
401 test_gns_revocation_DEPENDENCIES = \
402   $(top_builddir)/src/util/libgnunetutil.la \
403   $(top_builddir)/src/namestore/libgnunetnamestore.la \
404   libgnunetgns.la \
405   $(top_builddir)/src/testing/libgnunettesting.la
406
407
408
409 #Build stub api
410 #libgnunetnamestore_la_SOURCES = \
411 # namestore_stub_api.c
412 #libgnunetnamestore_la_LIBADD = \
413 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
414 #libgnunetnamestore_la_LDFLAGS = \
415 #  $(GN_LIB_LDFLAGS)
416 #libgnunetnamestore_la_DEPENDENCIES = \
417 # $(top_builddir)/src/util/libgnunetutil.la
418
419
420