73210f6cf6cbe3190d399dd68c5282f209043563
[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_simple_lookup.conf \
14   test_gns_nick_shorten.conf \
15   test_gns_dht_default.conf \
16   gns-helper-service-w32.conf \
17   gnunet-gns-proxy-setup-ca \
18   zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey \
19   zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
20   zonefiles/test_zonekey \
21   $(check_SCRIPTS)
22
23 if MINGW
24   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
25   DO_W32_HELPER = gnunet-gns-helper-service-w32
26   DO_W32_NSP = libw32nsp.la
27   DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve
28   DO_W32_HS_CONF = gns-helper-service-w32.conf
29 endif
30 USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la
31
32 if USE_COVERAGE
33   AM_CFLAGS = --coverage -O0
34 endif
35
36 pkgcfgdir = $(pkgdatadir)/config.d/
37
38 libexecdir= $(pkglibdir)/libexec/
39
40 plugindir = $(libdir)/gnunet
41
42 pkgcfg_DATA = \
43   gns.conf \
44   $(DO_W32_HS_CONF)
45
46 lib_LTLIBRARIES = \
47   $(DO_W32_NSP) \
48   libgnunetgns.la
49
50
51 if HAVE_MHD
52 if HAVE_GNUTLS
53 if HAVE_LIBGNURL
54   DO_PROXY=gnunet-gns-proxy
55 endif
56 endif
57 endif
58
59 libexec_PROGRAMS = \
60   gnunet-service-gns \
61   $(DO_W32_HELPER) \
62   gnunet-dns2gns \
63   $(DO_PROXY)
64
65 bin_PROGRAMS = \
66   $(DO_W32_NSPTOOLS) \
67   gnunet-gns
68
69 if HAVE_MHD
70 if LINUX
71 bin_PROGRAMS += gnunet-bcd
72 endif
73 endif
74
75 bin_SCRIPTS = gnunet-gns-proxy-setup-ca
76
77 plugin_LTLIBRARIES = \
78   libgnunet_plugin_block_gns.la \
79   libgnunet_plugin_gnsrecord_gns.la
80
81
82 libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
83   plugin_gnsrecord_gns.c
84 libgnunet_plugin_gnsrecord_gns_la_LIBADD = \
85   $(top_builddir)/src/dns/libgnunetdnsparser.la \
86   $(top_builddir)/src/util/libgnunetutil.la \
87   $(LTLIBINTL)
88 libgnunet_plugin_gnsrecord_gns_la_LDFLAGS = \
89  $(GN_PLUGIN_LDFLAGS)
90
91
92 gnunet_gns_SOURCES = \
93  gnunet-gns.c
94 gnunet_gns_LDADD = \
95   $(top_builddir)/src/gns/libgnunetgns.la \
96   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
97   $(top_builddir)/src/namestore/libgnunetnamestore.la \
98   $(top_builddir)/src/identity/libgnunetidentity.la \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(GN_LIBINTL)
101 gnunet_gns_DEPENDENCIES = \
102   $(top_builddir)/src/namestore/libgnunetnamestore.la \
103   $(top_builddir)/src/identity/libgnunetidentity.la \
104   $(top_builddir)/src/util/libgnunetutil.la \
105   libgnunetgns.la
106
107
108 gnunet_bcd_SOURCES = \
109  gnunet-bcd.c
110 gnunet_bcd_LDADD = \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(GN_LIBINTL) -lmicrohttpd
113 gnunet_bcd_DEPENDENCIES = \
114   $(top_builddir)/src/util/libgnunetutil.la
115
116
117 gnunet_dns2gns_SOURCES = \
118  gnunet-dns2gns.c
119 gnunet_dns2gns_LDADD = \
120   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
121   $(top_builddir)/src/gns/libgnunetgns.la \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(top_builddir)/src/identity/libgnunetidentity.la \
124   $(top_builddir)/src/namestore/libgnunetnamestore.la \
125   $(top_builddir)/src/dns/libgnunetdnsparser.la \
126   $(top_builddir)/src/dns/libgnunetdnsstub.la \
127   $(GN_LIBINTL)
128 gnunet_dns2gns_DEPENDENCIES = \
129   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
130   $(top_builddir)/src/util/libgnunetutil.la \
131   $(top_builddir)/src/identity/libgnunetidentity.la \
132   $(top_builddir)/src/namestore/libgnunetnamestore.la \
133   $(top_builddir)/src/dns/libgnunetdnsparser.la \
134   $(top_builddir)/src/dns/libgnunetdnsstub.la \
135   libgnunetgns.la
136
137 gnunet_gns_proxy_SOURCES = \
138  gnunet-gns-proxy.c
139 gnunet_gns_proxy_LDADD = -lmicrohttpd -lgnurl -lgnutls \
140   $(top_builddir)/src/gns/libgnunetgns.la \
141   $(top_builddir)/src/identity/libgnunetidentity.la \
142   $(top_builddir)/src/util/libgnunetutil.la \
143   $(GN_LIBINTL)
144 if HAVE_GNUTLS_DANE
145 gnunet_gns_proxy_LDADD += -lgnutls-dane
146 endif
147 gnunet_gns_proxy_DEPENDENCIES = \
148   $(top_builddir)/src/identity/libgnunetidentity.la \
149   $(top_builddir)/src/util/libgnunetutil.la \
150   libgnunetgns.la
151
152 gnunet_gns_helper_service_w32_SOURCES = \
153   gnunet-gns-helper-service-w32.c
154 gnunet_gns_helper_service_w32_LDADD = \
155   $(top_builddir)/src/gns/libgnunetgns.la \
156   $(top_builddir)/src/identity/libgnunetidentity.la \
157   $(top_builddir)/src/util/libgnunetutil.la \
158   $(GN_LIBINTL)
159 gnunet_gns_helper_service_w32_DEPENDENCIES = \
160   $(top_builddir)/src/util/libgnunetutil.la \
161   $(top_builddir)/src/identity/libgnunetidentity.la \
162   libgnunetgns.la
163
164 w32nsp_install_SOURCES = \
165   w32nsp-install.c
166 w32nsp_install_LDADD = -lws2_32
167
168 w32nsp_uninstall_SOURCES = \
169   w32nsp-uninstall.c
170 w32nsp_uninstall_LDADD = -lws2_32
171
172 w32nsp_resolve_SOURCES = \
173   w32nsp-resolve.c
174 w32nsp_resolve_LDADD = -lws2_32
175
176 gnunet_service_gns_SOURCES = \
177  gnunet-service-gns.c \
178  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
179  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
180  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
181 gnunet_service_gns_LDADD = \
182   -lm \
183   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
184   $(top_builddir)/src/revocation/libgnunetrevocation.la \
185   $(top_builddir)/src/statistics/libgnunetstatistics.la \
186   $(top_builddir)/src/util/libgnunetutil.la \
187   $(top_builddir)/src/dns/libgnunetdns.la \
188   $(top_builddir)/src/dns/libgnunetdnsparser.la \
189   $(top_builddir)/src/dns/libgnunetdnsstub.la \
190   $(top_builddir)/src/dht/libgnunetdht.la \
191   $(top_builddir)/src/namecache/libgnunetnamecache.la \
192   $(top_builddir)/src/namestore/libgnunetnamestore.la \
193   $(USE_VPN) \
194   $(GN_LIBINTL)
195 gnunet_service_gns_DEPENDENCIES = \
196   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
197   $(top_builddir)/src/revocation/libgnunetrevocation.la \
198   $(top_builddir)/src/statistics/libgnunetstatistics.la \
199   $(top_builddir)/src/util/libgnunetutil.la \
200   $(top_builddir)/src/dns/libgnunetdns.la \
201   $(top_builddir)/src/dns/libgnunetdnsparser.la \
202   $(top_builddir)/src/dht/libgnunetdht.la \
203   $(top_builddir)/src/namestore/libgnunetnamestore.la \
204   $(USE_VPN)
205
206
207
208 libw32nsp_la_SOURCES = \
209   w32nsp.c
210 libw32nsp_la_LIBADD = \
211   -lole32 -lws2_32
212 libw32nsp_la_LDFLAGS = \
213   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
214   $(GN_LIB_LDFLAGS)
215
216 libgnunetgns_la_SOURCES = \
217  gns_api.c gns.h
218 libgnunetgns_la_LIBADD = \
219  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
220  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
221 libgnunetgns_la_LDFLAGS = \
222   $(GN_LIB_LDFLAGS)
223 libgnunetgns_la_DEPENDENCIES = \
224  $(top_builddir)/src/util/libgnunetutil.la \
225  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
226
227
228 libgnunet_plugin_block_gns_la_SOURCES = \
229   plugin_block_gns.c
230 libgnunet_plugin_block_gns_la_LIBADD = \
231   $(top_builddir)/src/util/libgnunetutil.la \
232   $(top_builddir)/src/block/libgnunetblock.la \
233   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
234 libgnunet_plugin_block_gns_la_LDFLAGS = \
235   $(GN_PLUGIN_LDFLAGS)
236 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
237   $(top_builddir)/src/util/libgnunetutil.la \
238   $(top_builddir)/src/block/libgnunetblock.la \
239   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
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  TESTS = $(check_SCRIPTS)
261 endif
262 endif
263