-fix leaks
[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/util/libgnunetutil.la \
157   $(GN_LIBINTL)
158 gnunet_gns_helper_service_w32_DEPENDENCIES = \
159   $(top_builddir)/src/util/libgnunetutil.la \
160   libgnunetgns.la
161
162 w32nsp_install_SOURCES = \
163   w32nsp-install.c
164 w32nsp_install_LDADD = -lws2_32
165
166 w32nsp_uninstall_SOURCES = \
167   w32nsp-uninstall.c
168 w32nsp_uninstall_LDADD = -lws2_32
169
170 w32nsp_resolve_SOURCES = \
171   w32nsp-resolve.c
172 w32nsp_resolve_LDADD = -lws2_32
173
174 gnunet_service_gns_SOURCES = \
175  gnunet-service-gns.c \
176  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
177  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
178  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
179 gnunet_service_gns_LDADD = \
180   -lm \
181   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
182   $(top_builddir)/src/revocation/libgnunetrevocation.la \
183   $(top_builddir)/src/statistics/libgnunetstatistics.la \
184   $(top_builddir)/src/util/libgnunetutil.la \
185   $(top_builddir)/src/dns/libgnunetdns.la \
186   $(top_builddir)/src/dns/libgnunetdnsparser.la \
187   $(top_builddir)/src/dns/libgnunetdnsstub.la \
188   $(top_builddir)/src/dht/libgnunetdht.la \
189   $(top_builddir)/src/namecache/libgnunetnamecache.la \
190   $(top_builddir)/src/namestore/libgnunetnamestore.la \
191   $(USE_VPN) \
192   $(GN_LIBINTL)
193 gnunet_service_gns_DEPENDENCIES = \
194   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
195   $(top_builddir)/src/revocation/libgnunetrevocation.la \
196   $(top_builddir)/src/statistics/libgnunetstatistics.la \
197   $(top_builddir)/src/util/libgnunetutil.la \
198   $(top_builddir)/src/dns/libgnunetdns.la \
199   $(top_builddir)/src/dns/libgnunetdnsparser.la \
200   $(top_builddir)/src/dht/libgnunetdht.la \
201   $(top_builddir)/src/namestore/libgnunetnamestore.la \
202   $(USE_VPN)
203
204
205
206 libw32nsp_la_SOURCES = \
207   w32nsp.c
208 libw32nsp_la_LIBADD = \
209   -lole32 -lws2_32
210 libw32nsp_la_LDFLAGS = \
211   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
212   $(GN_LIB_LDFLAGS)
213
214 libgnunetgns_la_SOURCES = \
215  gns_api.c gns.h
216 libgnunetgns_la_LIBADD = \
217  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
218  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
219 libgnunetgns_la_LDFLAGS = \
220   $(GN_LIB_LDFLAGS)
221 libgnunetgns_la_DEPENDENCIES = \
222  $(top_builddir)/src/util/libgnunetutil.la \
223  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
224
225
226 libgnunet_plugin_block_gns_la_SOURCES = \
227   plugin_block_gns.c
228 libgnunet_plugin_block_gns_la_LIBADD = \
229   $(top_builddir)/src/util/libgnunetutil.la \
230   $(top_builddir)/src/block/libgnunetblock.la \
231   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
232 libgnunet_plugin_block_gns_la_LDFLAGS = \
233   $(GN_PLUGIN_LDFLAGS)
234 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
235   $(top_builddir)/src/util/libgnunetutil.la \
236   $(top_builddir)/src/block/libgnunetblock.la \
237   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
238
239
240 check_SCRIPTS = \
241   test_gns_lookup.sh \
242   test_gns_ipv6_lookup.sh\
243   test_gns_txt_lookup.sh\
244   test_gns_mx_lookup.sh \
245   test_gns_gns2dns_lookup.sh \
246   test_gns_dht_lookup.sh\
247   test_gns_delegated_lookup.sh \
248   test_gns_nick_shorten.sh\
249   test_gns_plus_lookup.sh\
250   test_gns_zkey_lookup.sh\
251   test_gns_rel_expiration.sh\
252   test_gns_soa_lookup.sh\
253   test_gns_revocation.sh\
254   test_gns_cname_lookup.sh
255
256 if ENABLE_TEST_RUN
257 if HAVE_SQLITE
258  TESTS = $(check_SCRIPTS)
259 endif
260 endif
261