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