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