-add key to makefile
[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 endif
12
13 if USE_COVERAGE
14   AM_CFLAGS = --coverage -O0
15 endif
16
17 pkgcfgdir= $(pkgdatadir)/config.d/
18
19 plugindir = $(libdir)/gnunet
20
21 pkgcfg_DATA = \
22   gns.conf
23
24 lib_LTLIBRARIES = \
25   libgnunetgns.la
26
27 if HAVE_MHD
28  DO_FCFSD=gnunet-gns-fcfsd
29 if HAVE_GNUTLS
30  DO_PROXY=gnunet-gns-proxy
31 endif
32 endif
33
34 bin_PROGRAMS = \
35   gnunet-service-gns \
36   $(DO_FCFSD) \
37         $(DO_PROXY) \
38   gnunet-gns
39
40 bin_SCRIPTS=gnunet-gns-proxy-setup-ca
41
42 check_PROGRAMS = \
43   test_gns_simple_shorten \
44   test_gns_simple_get_authority \
45   test_gns_simple_lookup \
46   test_gns_simple_delegated_lookup \
47   test_gns_simple_mx_lookup \
48         test_gns_simple_srv_lookup \
49   test_gns_simple_zkey_lookup \
50   test_gns_dht_delegated_lookup \
51   test_gns_pseu_shorten \
52   test_gns_max_queries \
53   test_gns_dht_threepeer \
54         test_gns_cname_lookup \
55         test_gns_ns_lookup \
56         test_gns_revocation
57
58
59 #  test_gns_simple_lookup
60 #  test_gns_simple_delegated_lookup
61 #  test_gns_dht_delegated_lookup
62
63
64 plugin_LTLIBRARIES = \
65   libgnunet_plugin_block_gns.la
66
67 test_gns_dht_threepeer_SOURCES = \
68   test_gns_dht_threepeer.c
69 test_gns_dht_threepeer_LDADD = \
70   $(top_builddir)/src/util/libgnunetutil.la \
71   $(top_builddir)/src/namestore/libgnunetnamestore.la \
72   $(top_builddir)/src/gns/libgnunetgns.la \
73   $(top_builddir)/src/testing_old/libgnunettesting_old.la
74 test_gns_dht_threepeer_DEPENDENCIES = \
75   $(top_builddir)/src/util/libgnunetutil.la \
76   $(top_builddir)/src/namestore/libgnunetnamestore.la \
77   $(top_builddir)/src/gns/libgnunetgns.la \
78   $(top_builddir)/src/testing_old/libgnunettesting_old.la
79
80 test_gns_simple_lookup_SOURCES = \
81   test_gns_simple_lookup.c
82 test_gns_simple_lookup_LDADD = \
83   $(top_builddir)/src/util/libgnunetutil.la \
84   $(top_builddir)/src/namestore/libgnunetnamestore.la \
85   $(top_builddir)/src/gns/libgnunetgns.la \
86   $(top_builddir)/src/testing_old/libgnunettesting_old.la
87 test_gns_simple_lookup_DEPENDENCIES = \
88   $(top_builddir)/src/util/libgnunetutil.la \
89   $(top_builddir)/src/namestore/libgnunetnamestore.la \
90   $(top_builddir)/src/gns/libgnunetgns.la \
91   $(top_builddir)/src/testing_old/libgnunettesting_old.la
92
93 test_gns_simple_delegated_lookup_SOURCES = \
94   test_gns_simple_delegated_lookup.c
95 test_gns_simple_delegated_lookup_LDADD = \
96   $(top_builddir)/src/util/libgnunetutil.la \
97   $(top_builddir)/src/namestore/libgnunetnamestore.la \
98   $(top_builddir)/src/gns/libgnunetgns.la \
99   $(top_builddir)/src/testing_old/libgnunettesting_old.la
100 test_gns_simple_delegated_lookup_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_old/libgnunettesting_old.la
105
106 test_gns_simple_mx_lookup_SOURCES = \
107   test_gns_simple_mx_lookup.c
108 test_gns_simple_mx_lookup_LDADD = \
109   $(top_builddir)/src/util/libgnunetutil.la \
110   $(top_builddir)/src/namestore/libgnunetnamestore.la \
111   $(top_builddir)/src/gns/libgnunetgns.la \
112   $(top_builddir)/src/testing_old/libgnunettesting_old.la
113 test_gns_simple_mx_lookup_DEPENDENCIES = \
114   $(top_builddir)/src/util/libgnunetutil.la \
115   $(top_builddir)/src/namestore/libgnunetnamestore.la \
116   $(top_builddir)/src/gns/libgnunetgns.la \
117   $(top_builddir)/src/testing_old/libgnunettesting_old.la
118
119 test_gns_simple_srv_lookup_SOURCES = \
120   test_gns_simple_srv_lookup.c
121 test_gns_simple_srv_lookup_LDADD = \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(top_builddir)/src/namestore/libgnunetnamestore.la \
124   $(top_builddir)/src/gns/libgnunetgns.la \
125   $(top_builddir)/src/testing_old/libgnunettesting_old.la
126 test_gns_simple_srv_lookup_DEPENDENCIES = \
127   $(top_builddir)/src/util/libgnunetutil.la \
128   $(top_builddir)/src/namestore/libgnunetnamestore.la \
129   $(top_builddir)/src/gns/libgnunetgns.la \
130   $(top_builddir)/src/testing_old/libgnunettesting_old.la
131
132 test_gns_simple_zkey_lookup_SOURCES = \
133   test_gns_simple_zkey_lookup.c
134 test_gns_simple_zkey_lookup_LDADD = \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   $(top_builddir)/src/namestore/libgnunetnamestore.la \
137   $(top_builddir)/src/gns/libgnunetgns.la \
138   $(top_builddir)/src/testing_old/libgnunettesting_old.la
139 test_gns_simple_zkey_lookup_DEPENDENCIES = \
140   $(top_builddir)/src/util/libgnunetutil.la \
141   $(top_builddir)/src/namestore/libgnunetnamestore.la \
142   $(top_builddir)/src/gns/libgnunetgns.la \
143   $(top_builddir)/src/testing_old/libgnunettesting_old.la
144
145 test_gns_dht_delegated_lookup_SOURCES = \
146   test_gns_dht_delegated_lookup.c
147 test_gns_dht_delegated_lookup_LDADD = \
148   $(top_builddir)/src/util/libgnunetutil.la \
149   $(top_builddir)/src/namestore/libgnunetnamestore.la \
150   $(top_builddir)/src/dht/libgnunetdht.la \
151   $(top_builddir)/src/gns/libgnunetgns.la \
152   $(top_builddir)/src/testing_old/libgnunettesting_old.la
153 test_gns_dht_delegated_lookup_DEPENDENCIES = \
154   $(top_builddir)/src/util/libgnunetutil.la \
155   $(top_builddir)/src/namestore/libgnunetnamestore.la \
156   $(top_builddir)/src/dht/libgnunetdht.la \
157   $(top_builddir)/src/gns/libgnunetgns.la \
158   $(top_builddir)/src/testing_old/libgnunettesting_old.la
159
160 test_gns_simple_shorten_SOURCES = \
161   test_gns_simple_shorten.c
162 test_gns_simple_shorten_LDADD = \
163   $(top_builddir)/src/util/libgnunetutil.la \
164   $(top_builddir)/src/namestore/libgnunetnamestore.la \
165   $(top_builddir)/src/gns/libgnunetgns.la \
166   $(top_builddir)/src/testing_old/libgnunettesting_old.la
167 test_gns_simple_shorten_DEPENDENCIES = \
168   $(top_builddir)/src/util/libgnunetutil.la \
169   $(top_builddir)/src/namestore/libgnunetnamestore.la \
170   $(top_builddir)/src/gns/libgnunetgns.la \
171   $(top_builddir)/src/testing_old/libgnunettesting_old.la
172
173 test_gns_simple_get_authority_SOURCES = \
174   test_gns_simple_get_authority.c
175 test_gns_simple_get_authority_LDADD = \
176   $(top_builddir)/src/util/libgnunetutil.la \
177   $(top_builddir)/src/namestore/libgnunetnamestore.la \
178   $(top_builddir)/src/gns/libgnunetgns.la \
179   $(top_builddir)/src/testing_old/libgnunettesting_old.la
180 test_gns_simple_get_authority_DEPENDENCIES = \
181   $(top_builddir)/src/util/libgnunetutil.la \
182   $(top_builddir)/src/namestore/libgnunetnamestore.la \
183   $(top_builddir)/src/gns/libgnunetgns.la \
184   $(top_builddir)/src/testing_old/libgnunettesting_old.la
185
186
187 test_gns_pseu_shorten_SOURCES = \
188   test_gns_pseu_shorten.c
189 test_gns_pseu_shorten_LDADD = \
190   $(top_builddir)/src/util/libgnunetutil.la \
191   $(top_builddir)/src/namestore/libgnunetnamestore.la \
192   $(top_builddir)/src/dht/libgnunetdht.la \
193   $(top_builddir)/src/gns/libgnunetgns.la \
194   $(top_builddir)/src/testing_old/libgnunettesting_old.la
195 test_gns_pseu_shorten_DEPENDENCIES = \
196   $(top_builddir)/src/util/libgnunetutil.la \
197   $(top_builddir)/src/namestore/libgnunetnamestore.la \
198   $(top_builddir)/src/dht/libgnunetdht.la \
199   $(top_builddir)/src/gns/libgnunetgns.la \
200   $(top_builddir)/src/testing_old/libgnunettesting_old.la
201
202
203 test_gns_max_queries_SOURCES = \
204   test_gns_max_queries.c
205 test_gns_max_queries_LDADD = \
206   $(top_builddir)/src/util/libgnunetutil.la \
207   $(top_builddir)/src/namestore/libgnunetnamestore.la \
208   $(top_builddir)/src/gns/libgnunetgns.la \
209   $(top_builddir)/src/testing_old/libgnunettesting_old.la
210 test_gns_max_queries_DEPENDENCIES = \
211   $(top_builddir)/src/util/libgnunetutil.la \
212   $(top_builddir)/src/namestore/libgnunetnamestore.la \
213   $(top_builddir)/src/gns/libgnunetgns.la \
214   $(top_builddir)/src/testing_old/libgnunettesting_old.la
215
216 test_gns_cname_lookup_SOURCES = \
217   test_gns_cname_lookup.c
218 test_gns_cname_lookup_LDADD = \
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_old/libgnunettesting_old.la
223 test_gns_cname_lookup_DEPENDENCIES = \
224   $(top_builddir)/src/util/libgnunetutil.la \
225   $(top_builddir)/src/namestore/libgnunetnamestore.la \
226   $(top_builddir)/src/gns/libgnunetgns.la \
227   $(top_builddir)/src/testing_old/libgnunettesting_old.la
228
229
230 test_gns_ns_lookup_SOURCES = \
231   test_gns_ns_lookup.c
232 test_gns_ns_lookup_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_old/libgnunettesting_old.la
237 test_gns_ns_lookup_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_old/libgnunettesting_old.la
242
243
244 test_gns_revocation_SOURCES = \
245   test_gns_revocation.c
246 test_gns_revocation_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_old/libgnunettesting_old.la
251 test_gns_revocation_DEPENDENCIES = \
252   $(top_builddir)/src/util/libgnunetutil.la \
253   $(top_builddir)/src/namestore/libgnunetnamestore.la \
254   $(top_builddir)/src/gns/libgnunetgns.la \
255   $(top_builddir)/src/testing_old/libgnunettesting_old.la
256
257
258 gnunet_gns_SOURCES = \
259  gnunet-gns.c
260 gnunet_gns_LDADD = \
261   $(top_builddir)/src/gns/libgnunetgns.la \
262   $(top_builddir)/src/util/libgnunetutil.la \
263   $(top_builddir)/src/namestore/libgnunetnamestore.la \
264   $(GN_LIBINTL)
265 gnunet_gns_DEPENDENCIES = \
266   libgnunetgns.la
267
268 gnunet_gns_proxy_SOURCES = \
269  gnunet-gns-proxy.c gns_proxy_proto.h 
270 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
271   $(top_builddir)/src/gns/libgnunetgns.la \
272   $(top_builddir)/src/util/libgnunetutil.la \
273   $(GN_LIBINTL)
274 gnunet_gns_proxy_DEPENDENCIES = \
275   libgnunetgns.la
276
277 gnunet_service_gns_SOURCES = \
278  gnunet-service-gns.c \
279  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
280  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
281 gnunet_service_gns_LDADD = \
282   $(top_builddir)/src/statistics/libgnunetstatistics.la \
283   $(top_builddir)/src/util/libgnunetutil.la \
284         $(top_builddir)/src/dns/libgnunetdns.la \
285         $(top_builddir)/src/dns/libgnunetdnsparser.la \
286         $(top_builddir)/src/dht/libgnunetdht.la \
287         $(top_builddir)/src/namestore/libgnunetnamestore.la \
288         $(top_builddir)/src/vpn/libgnunetvpn.la \
289   $(GN_LIBINTL)
290 gnunet_service_gns_DEPENDENCIES = \
291   $(top_builddir)/src/statistics/libgnunetstatistics.la \
292   $(top_builddir)/src/util/libgnunetutil.la \
293         $(top_builddir)/src/dns/libgnunetdns.la \
294         $(top_builddir)/src/dns/libgnunetdnsparser.la \
295         $(top_builddir)/src/dht/libgnunetdht.la \
296         $(top_builddir)/src/namestore/libgnunetnamestore.la \
297         $(top_builddir)/src/vpn/libgnunetvpn.la
298
299
300 gnunet_gns_fcfsd_SOURCES = \
301  gnunet-gns-fcfsd.c 
302 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
303   $(top_builddir)/src/util/libgnunetutil.la \
304   $(top_builddir)/src/namestore/libgnunetnamestore.la \
305   $(GN_LIBINTL)
306 gnunet_gns_fcfsd_DEPENDENCIES = \
307   $(top_builddir)/src/util/libgnunetutil.la \
308   $(top_builddir)/src/namestore/libgnunetnamestore.la
309
310
311 libgnunetgns_la_SOURCES = \
312  gns_api.c gns.h
313 libgnunetgns_la_LIBADD = \
314  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
315  $(top_builddir)/src/namestore/libgnunetnamestore.la
316 libgnunetgns_la_LDFLAGS = \
317   $(GN_LIB_LDFLAGS)
318 libgnunetgns_la_DEPENDENCIES = \
319  $(top_builddir)/src/util/libgnunetutil.la \
320  $(top_builddir)/src/namestore/libgnunetnamestore.la
321
322 libgnunet_plugin_block_gns_la_SOURCES = \
323   plugin_block_gns.c
324 libgnunet_plugin_block_gns_la_LIBADD = \
325   $(top_builddir)/src/util/libgnunetutil.la \
326   $(top_builddir)/src/block/libgnunetblock.la \
327   $(top_builddir)/src/namestore/libgnunetnamestore.la
328 libgnunet_plugin_block_gns_la_LDFLAGS = \
329   $(GN_PLUGIN_LDFLAGS)
330 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
331   $(top_builddir)/src/util/libgnunetutil.la \
332   $(top_builddir)/src/block/libgnunetblock.la \
333   $(top_builddir)/src/namestore/libgnunetnamestore.la
334
335 #Build stub api
336 #libgnunetnamestore_la_SOURCES = \
337 # namestore_stub_api.c
338 #libgnunetnamestore_la_LIBADD = \
339 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
340 #libgnunetnamestore_la_LDFLAGS = \
341 #  $(GN_LIB_LDFLAGS)
342 #libgnunetnamestore_la_DEPENDENCIES = \
343 # $(top_builddir)/src/util/libgnunetutil.la
344
345 if ENABLE_TEST_RUN
346 if LINUX
347 TESTS = $(check_PROGRAMS)
348 endif
349 endif
350
351 EXTRA_DIST = \
352   test_gns_defaults.conf \
353   test_gns_simple_lookup.conf \
354   test_gns_dht_default.conf \
355         zonefiles/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey \
356         zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
357         zonefiles/test_zonekey
358