-skeleton dns2gns
[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   $(GN_LIBINTL)
297
298 gnunet_gns_proxy_SOURCES = \
299  gnunet-gns-proxy.c gns_proxy_proto.h 
300 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
301   $(top_builddir)/src/gns/libgnunetgns.la \
302   $(top_builddir)/src/util/libgnunetutil.la \
303   $(GN_LIBINTL)
304 gnunet_gns_proxy_DEPENDENCIES = \
305   libgnunetgns.la
306
307 gnunet_gns_helper_service_w32_SOURCES = \
308   gnunet-gns-helper-service-w32.c
309 gnunet_gns_helper_service_w32_LDADD = \
310   $(top_builddir)/src/gns/libgnunetgns.la \
311   $(top_builddir)/src/util/libgnunetutil.la \
312   $(GN_LIBINTL)
313 gnunet_gns_helper_service_w32_DEPENDENCIES = \
314   libgnunetgns.la
315
316 w32nsp_install_SOURCES = \
317   w32nsp-install.c
318 w32nsp_install_LDADD = -lws2_32
319
320 w32nsp_uninstall_SOURCES = \
321   w32nsp-uninstall.c
322 w32nsp_uninstall_LDADD = -lws2_32
323
324 w32nsp_resolve_SOURCES = \
325   w32nsp-resolve.c
326 w32nsp_resolve_LDADD = -lws2_32
327
328 gnunet_service_gns_SOURCES = \
329  gnunet-service-gns.c \
330  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
331  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
332 gnunet_service_gns_LDADD = \
333   -lm \
334   $(top_builddir)/src/statistics/libgnunetstatistics.la \
335   $(top_builddir)/src/util/libgnunetutil.la \
336         $(top_builddir)/src/dns/libgnunetdns.la \
337         $(top_builddir)/src/dns/libgnunetdnsparser.la \
338         $(top_builddir)/src/dht/libgnunetdht.la \
339         $(top_builddir)/src/namestore/libgnunetnamestore.la \
340         $(top_builddir)/src/vpn/libgnunetvpn.la \
341   $(GN_LIBINTL)
342 gnunet_service_gns_DEPENDENCIES = \
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
351
352 gnunet_gns_fcfsd_SOURCES = \
353  gnunet-gns-fcfsd.c 
354 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
355   $(top_builddir)/src/util/libgnunetutil.la \
356   $(top_builddir)/src/namestore/libgnunetnamestore.la \
357   $(GN_LIBINTL)
358 gnunet_gns_fcfsd_DEPENDENCIES = \
359   $(top_builddir)/src/util/libgnunetutil.la \
360   $(top_builddir)/src/namestore/libgnunetnamestore.la
361
362 libw32nsp_la_SOURCES = \
363   w32nsp.c
364 libw32nsp_la_LIBADD = \
365   -lole32 -lws2_32
366 libw32nsp_la_LDFLAGS = \
367   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
368   $(GN_LIB_LDFLAGS)
369
370 libgnunetgns_la_SOURCES = \
371  gns_api.c gns.h
372 libgnunetgns_la_LIBADD = \
373  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
374  $(top_builddir)/src/namestore/libgnunetnamestore.la
375 libgnunetgns_la_LDFLAGS = \
376   $(GN_LIB_LDFLAGS)
377 libgnunetgns_la_DEPENDENCIES = \
378  $(top_builddir)/src/util/libgnunetutil.la \
379  $(top_builddir)/src/namestore/libgnunetnamestore.la
380
381 libgnunet_plugin_block_gns_la_SOURCES = \
382   plugin_block_gns.c
383 libgnunet_plugin_block_gns_la_LIBADD = \
384   $(top_builddir)/src/util/libgnunetutil.la \
385   $(top_builddir)/src/block/libgnunetblock.la \
386   $(top_builddir)/src/namestore/libgnunetnamestore.la
387 libgnunet_plugin_block_gns_la_LDFLAGS = \
388   $(GN_PLUGIN_LDFLAGS)
389 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
390   $(top_builddir)/src/util/libgnunetutil.la \
391   $(top_builddir)/src/block/libgnunetblock.la \
392   $(top_builddir)/src/namestore/libgnunetnamestore.la
393
394 #Build stub api
395 #libgnunetnamestore_la_SOURCES = \
396 # namestore_stub_api.c
397 #libgnunetnamestore_la_LIBADD = \
398 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
399 #libgnunetnamestore_la_LDFLAGS = \
400 #  $(GN_LIB_LDFLAGS)
401 #libgnunetnamestore_la_DEPENDENCIES = \
402 # $(top_builddir)/src/util/libgnunetutil.la
403
404 if ENABLE_TEST_RUN
405 if LINUX
406 TESTS = $(check_PROGRAMS)
407 endif
408 endif
409
410 EXTRA_DIST = \
411   test_gns_defaults.conf \
412   test_gns_simple_lookup.conf \
413   test_gns_dht_default.conf \
414         zonefiles/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey \
415         zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
416         zonefiles/test_zonekey
417