61e52ee98f349e460a99bfb1afae54ca4de216fb
[oweals/gnunet.git] / src / gns / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 if HAVE_GLIBCNSS
4 if INSTALL_NSS
5 NSS_SUBDIR = nss
6 endif
7 endif
8
9 SUBDIRS = . $(NSS_SUBDIR)
10
11 EXTRA_DIST = \
12   test_gns_defaults.conf \
13   test_gns_lookup.conf \
14   test_gns_nick_shorten.conf \
15   test_gns_proxy.conf \
16   test_gns_simple_lookup.conf \
17   gns-helper-service-w32.conf \
18   w32nsp.def \
19   gnunet-gns-proxy-setup-ca \
20   zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey \
21   zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
22   zonefiles/test_zonekey \
23   $(check_SCRIPTS)
24
25 if MINGW
26   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
27   DO_W32_HELPER = gnunet-gns-helper-service-w32
28   DO_W32_NSP = libw32nsp.la
29   DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve
30   DO_W32_HS_CONF = gns-helper-service-w32.conf
31   DO_NONPOSIX_GNSIMPORT = gnunet-gns-import
32 endif
33 USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la
34
35 if USE_COVERAGE
36   AM_CFLAGS = --coverage -O0
37 endif
38
39 pkgcfgdir = $(pkgdatadir)/config.d/
40
41 libexecdir= $(pkglibdir)/libexec/
42
43 plugindir = $(libdir)/gnunet
44
45 pkgcfg_DATA = \
46   gns.conf \
47   $(DO_W32_HS_CONF)
48
49 lib_LTLIBRARIES = \
50   $(DO_W32_NSP) \
51   libgnunetgns.la
52
53
54 if HAVE_MHD
55 if HAVE_GNUTLS
56 if HAVE_LIBGNURL
57   DO_PROXY=gnunet-gns-proxy
58 LIB_GNURL=@LIBGNURL@
59 CPP_GNURL=@LIBGNURL_CPPFLAGS@
60 else
61 if HAVE_LIBCURL
62   DO_PROXY=gnunet-gns-proxy
63 LIB_GNURL=@LIBCURL@
64 CPP_GNURL=@LIBCURL_CPPFLAGS@
65 endif
66 endif
67 endif
68 endif
69
70 libexec_PROGRAMS = \
71   gnunet-service-gns \
72   $(DO_W32_HELPER) \
73   gnunet-dns2gns \
74   $(DO_PROXY)
75
76 bin_PROGRAMS = \
77   $(DO_W32_NSPTOOLS) \
78   $(DO_NONPOSIX_GNSIMPORT) \
79   gnunet-gns
80
81 if HAVE_MHD
82 if LINUX
83 bin_PROGRAMS += gnunet-bcd
84 endif
85 endif
86
87 bin_SCRIPTS = gnunet-gns-proxy-setup-ca
88
89 plugin_LTLIBRARIES = \
90   libgnunet_plugin_block_gns.la \
91   libgnunet_plugin_gnsrecord_gns.la
92
93
94 libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
95   plugin_gnsrecord_gns.c
96 libgnunet_plugin_gnsrecord_gns_la_LIBADD = \
97   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
98   $(top_builddir)/src/dns/libgnunetdnsparser.la \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(LTLIBINTL)
101 libgnunet_plugin_gnsrecord_gns_la_LDFLAGS = \
102  $(GN_PLUGIN_LDFLAGS)
103
104
105 gnunet_gns_SOURCES = \
106  gnunet-gns.c
107 gnunet_gns_LDADD = \
108   $(top_builddir)/src/gns/libgnunetgns.la \
109   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
110   $(top_builddir)/src/namestore/libgnunetnamestore.la \
111   $(top_builddir)/src/identity/libgnunetidentity.la \
112   $(top_builddir)/src/util/libgnunetutil.la \
113   $(GN_LIBINTL)
114 gnunet_gns_DEPENDENCIES = \
115   $(top_builddir)/src/namestore/libgnunetnamestore.la \
116   $(top_builddir)/src/identity/libgnunetidentity.la \
117   $(top_builddir)/src/util/libgnunetutil.la \
118   libgnunetgns.la
119
120
121 gnunet_bcd_SOURCES = \
122  gnunet-bcd.c
123 gnunet_bcd_LDADD = \
124   $(top_builddir)/src/util/libgnunetutil.la \
125   $(GN_LIBINTL) -lmicrohttpd
126 gnunet_bcd_DEPENDENCIES = \
127   $(top_builddir)/src/util/libgnunetutil.la
128
129
130 gnunet_dns2gns_SOURCES = \
131  gnunet-dns2gns.c
132 gnunet_dns2gns_LDADD = \
133   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
134   $(top_builddir)/src/gns/libgnunetgns.la \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   $(top_builddir)/src/identity/libgnunetidentity.la \
137   $(top_builddir)/src/namestore/libgnunetnamestore.la \
138   $(top_builddir)/src/dns/libgnunetdnsparser.la \
139   $(top_builddir)/src/dns/libgnunetdnsstub.la \
140   $(GN_LIBINTL)
141 gnunet_dns2gns_DEPENDENCIES = \
142   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
143   $(top_builddir)/src/util/libgnunetutil.la \
144   $(top_builddir)/src/identity/libgnunetidentity.la \
145   $(top_builddir)/src/namestore/libgnunetnamestore.la \
146   $(top_builddir)/src/dns/libgnunetdnsparser.la \
147   $(top_builddir)/src/dns/libgnunetdnsstub.la \
148   libgnunetgns.la
149
150 gnunet_gns_proxy_SOURCES = \
151  gnunet-gns-proxy.c
152 gnunet_gns_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(CPP_GNURL)
153 gnunet_gns_proxy_LDADD = -lmicrohttpd $(LIB_GNURL) -lgnutls \
154   $(top_builddir)/src/gns/libgnunetgns.la \
155   $(top_builddir)/src/identity/libgnunetidentity.la \
156   $(top_builddir)/src/util/libgnunetutil.la \
157   $(GN_LIBINTL)
158 if HAVE_GNUTLS_DANE
159 gnunet_gns_proxy_LDADD += -lgnutls-dane
160 endif
161 gnunet_gns_proxy_DEPENDENCIES = \
162   $(top_builddir)/src/identity/libgnunetidentity.la \
163   $(top_builddir)/src/util/libgnunetutil.la \
164   libgnunetgns.la
165
166 gnunet_gns_helper_service_w32_SOURCES = \
167   gnunet-gns-helper-service-w32.c
168 gnunet_gns_helper_service_w32_LDADD = \
169   $(top_builddir)/src/gns/libgnunetgns.la \
170   $(top_builddir)/src/identity/libgnunetidentity.la \
171   $(top_builddir)/src/util/libgnunetutil.la \
172   $(GN_LIBINTL)
173 gnunet_gns_helper_service_w32_DEPENDENCIES = \
174   $(top_builddir)/src/util/libgnunetutil.la \
175   $(top_builddir)/src/identity/libgnunetidentity.la \
176   libgnunetgns.la
177
178 gnunet_gns_import_SOURCES = \
179   gnunet-gns-import.c
180 gnunet_gns_import_LDADD = \
181   $(top_builddir)/src/identity/libgnunetidentity.la \
182   $(top_builddir)/src/namestore/libgnunetnamestore.la \
183   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
184   $(top_builddir)/src/util/libgnunetutil.la \
185   $(GN_LIBINTL)
186 gnunet_gns_import_DEPENDENCIES = \
187   $(top_builddir)/src/util/libgnunetutil.la \
188   $(top_builddir)/src/namestore/libgnunetnamestore.la \
189   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
190   $(top_builddir)/src/identity/libgnunetidentity.la
191
192 w32nsp_install_SOURCES = \
193   w32nsp-install.c
194 w32nsp_install_LDADD = -lws2_32
195
196 w32nsp_uninstall_SOURCES = \
197   w32nsp-uninstall.c
198 w32nsp_uninstall_LDADD = -lws2_32
199
200 w32nsp_resolve_SOURCES = \
201   w32nsp-resolve.c
202 w32nsp_resolve_LDADD = -lws2_32
203
204 gnunet_service_gns_SOURCES = \
205  gnunet-service-gns.c \
206  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
207  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
208  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
209 gnunet_service_gns_LDADD = \
210   -lm \
211   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
212   $(top_builddir)/src/revocation/libgnunetrevocation.la \
213   $(top_builddir)/src/statistics/libgnunetstatistics.la \
214   $(top_builddir)/src/util/libgnunetutil.la \
215   $(top_builddir)/src/dns/libgnunetdns.la \
216   $(top_builddir)/src/dns/libgnunetdnsparser.la \
217   $(top_builddir)/src/dns/libgnunetdnsstub.la \
218   $(top_builddir)/src/dht/libgnunetdht.la \
219   $(top_builddir)/src/tun/libgnunettun.la \
220   $(top_builddir)/src/namecache/libgnunetnamecache.la \
221   $(top_builddir)/src/namestore/libgnunetnamestore.la \
222   $(USE_VPN) \
223   $(GN_LIBINTL)
224 gnunet_service_gns_DEPENDENCIES = \
225   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
226   $(top_builddir)/src/revocation/libgnunetrevocation.la \
227   $(top_builddir)/src/statistics/libgnunetstatistics.la \
228   $(top_builddir)/src/util/libgnunetutil.la \
229   $(top_builddir)/src/tun/libgnunettun.la \
230   $(top_builddir)/src/dns/libgnunetdns.la \
231   $(top_builddir)/src/dns/libgnunetdnsparser.la \
232   $(top_builddir)/src/dht/libgnunetdht.la \
233   $(top_builddir)/src/namestore/libgnunetnamestore.la \
234   $(USE_VPN)
235
236
237
238 libw32nsp_la_SOURCES = \
239   w32nsp.c
240 libw32nsp_la_LIBADD = \
241   -lole32 -lws2_32
242 libw32nsp_la_LDFLAGS = \
243   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
244   -no-undefined -static-libgcc
245
246 libgnunetgns_la_SOURCES = \
247  gns_api.c gns.h
248 libgnunetgns_la_LIBADD = \
249  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
250  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
251 libgnunetgns_la_LDFLAGS = \
252   $(GN_LIB_LDFLAGS)
253 libgnunetgns_la_DEPENDENCIES = \
254  $(top_builddir)/src/util/libgnunetutil.la \
255  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
256
257
258 libgnunet_plugin_block_gns_la_SOURCES = \
259   plugin_block_gns.c
260 libgnunet_plugin_block_gns_la_LIBADD = \
261   $(top_builddir)/src/util/libgnunetutil.la \
262   $(top_builddir)/src/block/libgnunetblock.la \
263   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
264 libgnunet_plugin_block_gns_la_LDFLAGS = \
265   $(GN_PLUGIN_LDFLAGS)
266 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
267   $(top_builddir)/src/util/libgnunetutil.la \
268   $(top_builddir)/src/block/libgnunetblock.la \
269   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
270
271
272 check_SCRIPTS = \
273   test_gns_lookup.sh \
274   test_gns_ipv6_lookup.sh\
275   test_gns_txt_lookup.sh\
276   test_gns_mx_lookup.sh \
277   test_gns_gns2dns_lookup.sh \
278   test_gns_dht_lookup.sh\
279   test_gns_delegated_lookup.sh \
280   test_gns_nick_shorten.sh\
281   test_gns_plus_lookup.sh\
282   test_gns_zkey_lookup.sh\
283   test_gns_rel_expiration.sh\
284   test_gns_soa_lookup.sh\
285   test_gns_revocation.sh\
286   test_gns_cname_lookup.sh
287
288 if ENABLE_TEST_RUN
289 if HAVE_SQLITE
290  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
291  TESTS = $(check_SCRIPTS)
292 endif
293 endif
294