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