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