remove support for reverse lookup and shortening from GNS (#4849)
[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_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 if HAVE_MHD
95 if HAVE_JSON
96 plugin_LTLIBRARIES += libgnunet_plugin_rest_gns.la
97 endif
98 endif
99
100 libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
101   plugin_gnsrecord_gns.c
102 libgnunet_plugin_gnsrecord_gns_la_LIBADD = \
103   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
104   $(top_builddir)/src/dns/libgnunetdnsparser.la \
105   $(top_builddir)/src/util/libgnunetutil.la \
106   $(LTLIBINTL)
107 libgnunet_plugin_gnsrecord_gns_la_LDFLAGS = \
108  $(GN_PLUGIN_LDFLAGS)
109
110
111 gnunet_gns_SOURCES = \
112  gnunet-gns.c
113 gnunet_gns_LDADD = \
114   libgnunetgns.la \
115   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
116   $(top_builddir)/src/namestore/libgnunetnamestore.la \
117   $(top_builddir)/src/identity/libgnunetidentity.la \
118   $(top_builddir)/src/util/libgnunetutil.la \
119   $(GN_LIBINTL)
120
121
122 gnunet_bcd_SOURCES = \
123  gnunet-bcd.c
124 gnunet_bcd_LDADD = \
125   $(top_builddir)/src/util/libgnunetutil.la \
126   $(GN_LIBINTL) -lmicrohttpd
127
128
129 gnunet_dns2gns_SOURCES = \
130  gnunet-dns2gns.c
131 gnunet_dns2gns_LDADD = \
132   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
133   libgnunetgns.la \
134   $(top_builddir)/src/util/libgnunetutil.la \
135   $(top_builddir)/src/identity/libgnunetidentity.la \
136   $(top_builddir)/src/namestore/libgnunetnamestore.la \
137   $(top_builddir)/src/dns/libgnunetdnsparser.la \
138   $(top_builddir)/src/dns/libgnunetdnsstub.la \
139   $(GN_LIBINTL)
140
141 gnunet_gns_proxy_SOURCES = \
142  gnunet-gns-proxy.c
143 gnunet_gns_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(CPP_GNURL)
144 gnunet_gns_proxy_LDADD = -lmicrohttpd $(LIB_GNURL) -lgnutls \
145   libgnunetgns.la \
146   $(top_builddir)/src/identity/libgnunetidentity.la \
147   $(top_builddir)/src/util/libgnunetutil.la \
148   $(GN_LIBINTL)
149 if HAVE_GNUTLS_DANE
150 gnunet_gns_proxy_LDADD += -lgnutls-dane
151 endif
152
153 gnunet_gns_helper_service_w32_SOURCES = \
154   gnunet-gns-helper-service-w32.c
155 gnunet_gns_helper_service_w32_LDADD = \
156   libgnunetgns.la \
157   $(top_builddir)/src/identity/libgnunetidentity.la \
158   $(top_builddir)/src/util/libgnunetutil.la \
159   $(GN_LIBINTL)
160
161 gnunet_gns_import_SOURCES = \
162   gnunet-gns-import.c
163 gnunet_gns_import_LDADD = \
164   $(top_builddir)/src/identity/libgnunetidentity.la \
165   $(top_builddir)/src/namestore/libgnunetnamestore.la \
166   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
167   $(top_builddir)/src/util/libgnunetutil.la \
168   $(GN_LIBINTL)
169
170
171 w32nsp_install_SOURCES = \
172   w32nsp-install.c
173 w32nsp_install_LDADD = -lws2_32
174
175 w32nsp_uninstall_SOURCES = \
176   w32nsp-uninstall.c
177 w32nsp_uninstall_LDADD = -lws2_32
178
179 w32nsp_resolve_SOURCES = \
180   w32nsp-resolve.c
181 w32nsp_resolve_LDADD = -lws2_32
182
183 gnunet_service_gns_SOURCES = \
184  gnunet-service-gns.c \
185  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
186  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
187 gnunet_service_gns_LDADD = \
188   -lm \
189   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
190   $(top_builddir)/src/identity/libgnunetidentity.la \
191   $(top_builddir)/src/revocation/libgnunetrevocation.la \
192   $(top_builddir)/src/statistics/libgnunetstatistics.la \
193   $(top_builddir)/src/util/libgnunetutil.la \
194   $(top_builddir)/src/dns/libgnunetdns.la \
195   $(top_builddir)/src/dns/libgnunetdnsparser.la \
196   $(top_builddir)/src/dns/libgnunetdnsstub.la \
197   $(top_builddir)/src/dht/libgnunetdht.la \
198   $(top_builddir)/src/tun/libgnunettun.la \
199   $(top_builddir)/src/namecache/libgnunetnamecache.la \
200   $(top_builddir)/src/namestore/libgnunetnamestore.la \
201   $(USE_VPN) \
202   $(GN_LIBINTL)
203
204
205 libw32nsp_la_SOURCES = \
206   w32nsp.c
207 libw32nsp_la_LIBADD = \
208   -lole32 -lws2_32
209 libw32nsp_la_LDFLAGS = \
210   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
211   -no-undefined -static-libgcc
212
213 libgnunetgns_la_SOURCES = \
214  gns_api.c gns.h
215 libgnunetgns_la_LIBADD = \
216  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
217  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
218 libgnunetgns_la_LDFLAGS = \
219   $(GN_LIB_LDFLAGS)
220
221
222 libgnunet_plugin_block_gns_la_SOURCES = \
223   plugin_block_gns.c
224 libgnunet_plugin_block_gns_la_LIBADD = \
225   $(top_builddir)/src/util/libgnunetutil.la \
226   $(top_builddir)/src/block/libgnunetblock.la \
227   $(top_builddir)/src/block/libgnunetblockgroup.la \
228   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
229 libgnunet_plugin_block_gns_la_LDFLAGS = \
230   $(GN_PLUGIN_LDFLAGS)
231
232 libgnunet_plugin_rest_gns_la_SOURCES = \
233   plugin_rest_gns.c
234 libgnunet_plugin_rest_gns_la_LIBADD = \
235   libgnunetgns.la \
236         $(top_builddir)/src/rest/libgnunetrest.la \
237   $(top_builddir)/src/identity/libgnunetidentity.la \
238         $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \
239   $(top_builddir)/src/jsonapi/libgnunetjsonapiutils.la \
240   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
241   $(LTLIBINTL) -ljansson -lmicrohttpd
242 libgnunet_plugin_rest_gns_la_LDFLAGS = \
243  $(GN_PLUGIN_LDFLAGS)
244
245
246 check_SCRIPTS = \
247   test_gns_lookup.sh \
248   test_gns_ipv6_lookup.sh\
249   test_gns_txt_lookup.sh\
250   test_gns_mx_lookup.sh \
251   test_gns_gns2dns_lookup.sh \
252   test_gns_dht_lookup.sh\
253   test_gns_delegated_lookup.sh \
254   test_gns_plus_lookup.sh\
255   test_gns_zkey_lookup.sh\
256   test_gns_rel_expiration.sh\
257   test_gns_soa_lookup.sh\
258   test_gns_revocation.sh\
259   test_gns_cname_lookup.sh
260
261 if ENABLE_TEST_RUN
262 if HAVE_SQLITE
263  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
264  TESTS = $(check_SCRIPTS)
265 endif
266 endif