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