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