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