-moving code to new libgnunetgnsrecord in preparation for addressing #3052
[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_LIBCURL
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
73 gnunet_gns_SOURCES = \
74  gnunet-gns.c
75 gnunet_gns_LDADD = \
76   $(top_builddir)/src/gns/libgnunetgns.la \
77   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
78   $(top_builddir)/src/namestore/libgnunetnamestore.la \
79   $(top_builddir)/src/identity/libgnunetidentity.la \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(GN_LIBINTL)
82 gnunet_gns_DEPENDENCIES = \
83   $(top_builddir)/src/namestore/libgnunetnamestore.la \
84   $(top_builddir)/src/identity/libgnunetidentity.la \
85   $(top_builddir)/src/util/libgnunetutil.la \
86   libgnunetgns.la
87
88 gnunet_dns2gns_SOURCES = \
89  gnunet-dns2gns.c
90 gnunet_dns2gns_LDADD = \
91   $(top_builddir)/src/gns/libgnunetgns.la \
92   $(top_builddir)/src/util/libgnunetutil.la \
93   $(top_builddir)/src/identity/libgnunetidentity.la \
94   $(top_builddir)/src/namestore/libgnunetnamestore.la \
95   $(top_builddir)/src/dns/libgnunetdnsparser.la \
96   $(top_builddir)/src/dns/libgnunetdnsstub.la \
97   $(GN_LIBINTL)
98 gnunet_dns2gns_DEPENDENCIES = \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(top_builddir)/src/identity/libgnunetidentity.la \
101   $(top_builddir)/src/namestore/libgnunetnamestore.la \
102   $(top_builddir)/src/dns/libgnunetdnsparser.la \
103   $(top_builddir)/src/dns/libgnunetdnsstub.la \
104   libgnunetgns.la
105
106 gnunet_gns_proxy_SOURCES = \
107  gnunet-gns-proxy.c
108 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
109   $(top_builddir)/src/gns/libgnunetgns.la \
110   $(top_builddir)/src/identity/libgnunetidentity.la \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(GN_LIBINTL)
113 gnunet_gns_proxy_DEPENDENCIES = \
114   $(top_builddir)/src/identity/libgnunetidentity.la \
115   $(top_builddir)/src/util/libgnunetutil.la \
116   libgnunetgns.la
117
118 gnunet_gns_helper_service_w32_SOURCES = \
119   gnunet-gns-helper-service-w32.c
120 gnunet_gns_helper_service_w32_LDADD = \
121   $(top_builddir)/src/gns/libgnunetgns.la \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(GN_LIBINTL)
124 gnunet_gns_helper_service_w32_DEPENDENCIES = \
125   $(top_builddir)/src/util/libgnunetutil.la \
126   libgnunetgns.la
127
128 w32nsp_install_SOURCES = \
129   w32nsp-install.c
130 w32nsp_install_LDADD = -lws2_32
131
132 w32nsp_uninstall_SOURCES = \
133   w32nsp-uninstall.c
134 w32nsp_uninstall_LDADD = -lws2_32
135
136 w32nsp_resolve_SOURCES = \
137   w32nsp-resolve.c
138 w32nsp_resolve_LDADD = -lws2_32
139
140 gnunet_service_gns_SOURCES = \
141  gnunet-service-gns.c \
142  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
143  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
144  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
145 gnunet_service_gns_LDADD = \
146   -lm \
147   $(top_builddir)/src/statistics/libgnunetstatistics.la \
148   $(top_builddir)/src/util/libgnunetutil.la \
149   $(top_builddir)/src/dns/libgnunetdns.la \
150   $(top_builddir)/src/dns/libgnunetdnsparser.la \
151   $(top_builddir)/src/dns/libgnunetdnsstub.la \
152   $(top_builddir)/src/dht/libgnunetdht.la \
153   $(top_builddir)/src/namestore/libgnunetnamestore.la \
154   $(USE_VPN) \
155   $(GN_LIBINTL)
156 gnunet_service_gns_DEPENDENCIES = \
157   $(top_builddir)/src/statistics/libgnunetstatistics.la \
158   $(top_builddir)/src/util/libgnunetutil.la \
159   $(top_builddir)/src/dns/libgnunetdns.la \
160   $(top_builddir)/src/dns/libgnunetdnsparser.la \
161   $(top_builddir)/src/dht/libgnunetdht.la \
162   $(top_builddir)/src/namestore/libgnunetnamestore.la \
163   $(USE_VPN)
164
165
166
167 libw32nsp_la_SOURCES = \
168   w32nsp.c
169 libw32nsp_la_LIBADD = \
170   -lole32 -lws2_32
171 libw32nsp_la_LDFLAGS = \
172   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
173   $(GN_LIB_LDFLAGS)
174
175 libgnunetgns_la_SOURCES = \
176  gns_api.c gns.h
177 libgnunetgns_la_LIBADD = \
178  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
179  $(top_builddir)/src/namestore/libgnunetnamestore.la
180 libgnunetgns_la_LDFLAGS = \
181   $(GN_LIB_LDFLAGS)
182 libgnunetgns_la_DEPENDENCIES = \
183  $(top_builddir)/src/util/libgnunetutil.la \
184  $(top_builddir)/src/namestore/libgnunetnamestore.la
185
186
187 libgnunet_plugin_block_gns_la_SOURCES = \
188   plugin_block_gns.c
189 libgnunet_plugin_block_gns_la_LIBADD = \
190   $(top_builddir)/src/util/libgnunetutil.la \
191   $(top_builddir)/src/block/libgnunetblock.la \
192   $(top_builddir)/src/namestore/libgnunetnamestore.la
193 libgnunet_plugin_block_gns_la_LDFLAGS = \
194   $(GN_PLUGIN_LDFLAGS)
195 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
196   $(top_builddir)/src/util/libgnunetutil.la \
197   $(top_builddir)/src/block/libgnunetblock.la \
198   $(top_builddir)/src/namestore/libgnunetnamestore.la
199
200
201 check_SCRIPTS = \
202   test_gns_delegated_lookup.sh \
203   test_gns_lookup.sh \
204   test_gns_ipv6_lookup.sh\
205   test_gns_txt_lookup.sh\
206   test_gns_mx_lookup.sh \
207   test_gns_ns_lookup.sh \
208   test_gns_dht_lookup.sh\
209   test_gns_pseu_shorten.sh\
210   test_gns_plus_lookup.sh\
211   test_gns_zkey_lookup.sh\
212   test_gns_cname_lookup.sh
213
214 if ENABLE_TEST_RUN
215 if HAVE_SQLITE
216  TESTS = $(check_SCRIPTS)
217 endif
218 endif
219