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