]> git.ipfire.org Git - thirdparty/pdns.git/blame - pdns/recursordist/Makefile.am
rec: Implement the negative cache as a class
[thirdparty/pdns.git] / pdns / recursordist / Makefile.am
CommitLineData
23448838 1JSON11_LIBS = $(top_srcdir)/ext/json11/libjson11.la
0c6f6275 2
d705aad9 3AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(BOTAN110_CFLAGS) $(NET_SNMP_CFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" $(SYSTEMD_CFLAGS)
0c6f6275
PL
4
5AM_CPPFLAGS += \
6 -I$(top_srcdir)/ext/json11 \
7 -I$(top_srcdir)/ext/rapidjson/include \
aac75773 8 $(YAHTTP_CFLAGS) \
74d83458 9 $(LIBCRYPTO_INCLUDES)
0c6f6275
PL
10
11AM_CXXFLAGS = \
12 -DSYSCONFDIR=\"$(sysconfdir)\" \
13 -DPKGLIBDIR=\"$(pkglibdir)\" \
14 -DLOCALSTATEDIR=\"$(socketdir)\"
15
16AM_LDFLAGS = \
17 $(PROGRAM_LDFLAGS) \
18 $(THREADFLAGS)
19
20ACLOCAL_AMFLAGS = -I m4
21
56872c22
PL
22BUILT_SOURCES=htmlfiles.h \
23 dnslabeltext.cc
24
48a44e8b
PL
25CLEANFILES = htmlfiles.h \
26 dnsmessage.pb.cc \
27 dnsmessage.pb.h
642339d8 28
29htmlfiles.h: html/*
30 ./incfiles > $@
31
0c6f6275
PL
32SUBDIRS=ext
33
34if LUA
35AM_CPPFLAGS +=$(LUA_CFLAGS)
36endif
37
38EXTRA_DIST = \
4554ba6e 39 NOTICE \
0c6f6275 40 .version \
0e9cbfc2 41 botan110signers.cc \
10f702ce 42 build-aux/gen-version \
7676c316 43 contrib/* \
0c6f6275
PL
44 devpollmplexer.cc \
45 dnslabeltext.cc \
46 dnslabeltext.rl \
aa7929a3 47 dnsmessage.proto \
0c6f6275
PL
48 effective_tld_names.dat \
49 epollmplexer.cc \
50 kqueuemplexer.cc \
e10b6528 51 lua_hpp.mk \
0c6f6275 52 malloctrace.cc malloctrace.hh \
265ff1c3 53 mkpubsuffixcc \
0c6f6275 54 mtasker.cc \
a7303306 55 mtasker_fcontext.cc mtasker_ucontext.cc \
0c6f6275
PL
56 opensslsigners.hh opensslsigners.cc \
57 pdns_recursor.1.md \
58 portsmplexer.cc \
7496549d 59 rec_control.1.md \
218feb9d 60 rrd/* \
4ff58b75
PL
61 html incfiles \
62 pdns-recursor.service.in
0c6f6275
PL
63
64sbin_PROGRAMS = pdns_recursor
65bin_PROGRAMS = rec_control
66
35d883a8
RG
67if UNIT_TESTS
68noinst_PROGRAMS = testrunner
69TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message SRCDIR='$(srcdir)'
70TESTS=testrunner
71else
72check-local:
73 @echo "Unit tests are not enabled"
74 @echo "Run ./configure --enable-unit-tests"
75endif
76
0c6f6275
PL
77pdns_recursor_SOURCES = \
78 arguments.cc \
79 base32.cc base32.hh \
80 base64.cc base64.hh \
81 cachecleaner.hh \
82 comment.hh \
83 dns.hh dns.cc \
84 dns_random.hh dns_random.cc \
85 dnsbackend.hh \
86 dnslabeltext.cc \
87 dnsname.cc dnsname.hh \
88 dnspacket.hh \
89 dnsparser.hh dnsparser.cc \
90 dnsrecords.cc dnsrecords.hh \
91 dnssecinfra.hh dnssecinfra.cc \
92 dnsseckeeper.hh \
93 dnswriter.cc dnswriter.hh \
35695d18 94 ecs.cc \
5c3b5e7f 95 ednsoptions.cc ednsoptions.hh \
0c6f6275
PL
96 ednssubnet.cc ednssubnet.hh \
97 filterpo.cc filterpo.hh \
85c7ca75 98 gettime.cc gettime.hh \
0c6f6275
PL
99 gss_context.cc gss_context.hh \
100 iputils.hh iputils.cc \
101 ixfr.cc ixfr.hh \
102 json.cc json.hh \
5cf909f3 103 lazy_allocator.hh \
0c6f6275
PL
104 lock.hh \
105 logger.hh logger.cc \
106 lua-recursor4.cc lua-recursor4.hh \
107 lwres.cc lwres.hh \
108 misc.hh misc.cc \
109 mplexer.hh \
110 mtasker.hh \
5ab14378 111 mtasker_context.cc mtasker_context.hh \
0c6f6275 112 namespaces.hh \
39ce10b2 113 negcache.hh negcache.cc \
0c6f6275 114 nsecrecords.cc \
04c74848 115 opensslsigners.cc opensslsigners.hh \
bf269e28 116 packetcache.hh \
0c6f6275
PL
117 pdns_recursor.cc \
118 pdnsexception.hh \
d9d3f9c1 119 protobuf.cc protobuf.hh \
0c6f6275
PL
120 pubsuffix.hh pubsuffix.cc \
121 qtype.hh qtype.cc \
122 randomhelper.cc \
123 rcpgenerator.cc rcpgenerator.hh \
124 rec-carbon.cc \
125 rec-lua-conf.hh rec-lua-conf.cc \
d9d3f9c1 126 rec-protobuf.cc rec-protobuf.hh \
d705aad9 127 rec-snmp.hh rec-snmp.cc \
0c6f6275
PL
128 rec_channel.cc rec_channel.hh \
129 rec_channel_rec.cc \
130 recpacketcache.cc recpacketcache.hh \
131 recursor_cache.cc recursor_cache.hh \
132 reczones.cc \
aa7929a3 133 remote_logger.cc remote_logger.hh \
0c6f6275 134 resolver.hh resolver.cc \
4898a348 135 resolve-context.hh \
0c6f6275 136 responsestats.hh responsestats.cc \
10c96475 137 root-addresses.hh \
f2234140 138 root-dnssec.hh \
0c6f6275
PL
139 rpzloader.cc rpzloader.hh \
140 secpoll-recursor.cc \
141 secpoll-recursor.hh \
142 selectmplexer.cc \
143 sholder.hh \
144 sillyrecords.cc \
d705aad9 145 snmp-agent.hh snmp-agent.cc \
0c6f6275
PL
146 sortlist.cc sortlist.hh \
147 sstuff.hh \
0c6f6275 148 syncres.cc syncres.hh \
60a1c204 149 tsigverifier.cc tsigverifier.hh \
0c6f6275
PL
150 ueberbackend.hh \
151 unix_utility.cc \
152 utility.hh \
153 validate.cc validate.hh validate-recursor.cc validate-recursor.hh \
154 version.cc version.hh \
155 webserver.cc webserver.hh \
156 ws-api.cc ws-api.hh \
157 ws-recursor.cc ws-recursor.hh \
158 zoneparser-tng.cc zoneparser-tng.hh
159
e10b6528
PL
160if !HAVE_LUA_HPP
161BUILT_SOURCES += lua.hpp
162nodist_pdns_recursor_SOURCES = lua.hpp
163CLEANFILES += lua.hpp
164endif
165
0c6f6275
PL
166pdns_recursor_LDADD = \
167 $(YAHTTP_LIBS) \
04c74848 168 $(JSON11_LIBS) \
74d83458 169 $(LIBCRYPTO_LIBS) \
6b6720de 170 $(BOOST_CONTEXT_LIBS) \
d705aad9 171 $(NET_SNMP_LIBS) \
21b338e8
PD
172 $(SYSTEMD_LIBS) \
173 $(RT_LIBS)
0c6f6275 174
04c74848 175pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \
01f097e4 176 $(LIBCRYPTO_LDFLAGS) $(BOOST_CONTEXT_LDFLAGS)
0c6f6275 177
35d883a8
RG
178testrunner_SOURCES = \
179 arguments.cc \
180 base32.cc \
181 base64.cc base64.hh \
182 dns.cc dns.hh \
30ee601a 183 dns_random.cc dns_random.hh \
35d883a8
RG
184 dnslabeltext.cc \
185 dnsname.cc dnsname.hh \
186 dnsparser.hh dnsparser.cc \
187 dnsrecords.cc \
188 dnssecinfra.cc \
189 dnswriter.cc dnswriter.hh \
00b8cadc 190 ednscookies.cc ednscookies.hh \
30ee601a 191 ecs.cc \
35d883a8
RG
192 ednsoptions.cc ednsoptions.hh \
193 ednssubnet.cc ednssubnet.hh \
30ee601a 194 filterpo.cc filterpo.hh \
35d883a8
RG
195 gettime.cc gettime.hh \
196 gss_context.cc gss_context.hh \
197 iputils.cc iputils.hh \
198 logger.cc logger.hh \
199 misc.cc misc.hh \
39ce10b2 200 negcache.hh negcache.cc \
35d883a8
RG
201 namespaces.hh \
202 nsecrecords.cc \
203 pdnsexception.hh \
204 protobuf.cc protobuf.hh \
205 qtype.cc qtype.hh \
30ee601a 206 randomhelper.cc \
35d883a8 207 rcpgenerator.cc \
35d883a8 208 rec-protobuf.cc rec-protobuf.hh \
30ee601a
RG
209 recpacketcache.cc recpacketcache.hh \
210 recursor_cache.cc recursor_cache.hh \
35d883a8 211 responsestats.cc \
30ee601a 212 root-dnssec.hh \
35d883a8
RG
213 sillyrecords.cc \
214 sholder.hh \
215 sstuff.hh \
30ee601a 216 syncres.cc syncres.hh \
35d883a8
RG
217 test-arguments_cc.cc \
218 test-base32_cc.cc \
219 test-base64_cc.cc \
220 test-dnsrecordcontent.cc \
221 test-dns_random_hh.cc \
222 test-dnsname_cc.cc \
223 test-dnsparser_hh.cc \
224 test-dnsrecords_cc.cc \
00b8cadc 225 test-ednsoptions_cc.cc \
35d883a8
RG
226 test-iputils_hh.cc \
227 test-misc_hh.cc \
228 test-nmtree.cc \
229 test-rcpgenerator_cc.cc \
230 test-recpacketcache_cc.cc \
30ee601a 231 test-syncres_cc.cc \
35d883a8
RG
232 test-tsig.cc \
233 testrunner.cc \
234 unix_utility.cc \
30ee601a
RG
235 validate.cc validate.hh \
236 validate-recursor.cc validate-recursor.hh \
35d883a8
RG
237 zoneparser-tng.cc zoneparser-tng.hh
238
239testrunner_LDFLAGS = \
240 $(AM_LDFLAGS) \
241 $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \
242 $(LIBCRYPTO_LDFLAGS)
243
244testrunner_LDADD = \
245 $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \
246 $(LIBCRYPTO_LIBS) \
247 $(RT_LIBS)
248
0c6f6275
PL
249if BOTAN110
250pdns_recursor_SOURCES += \
0e9cbfc2 251 botan110signers.cc
0c6f6275
PL
252pdns_recursor_LDADD += $(BOTAN110_LIBS)
253endif
254
d1b28475
KM
255if LIBSODIUM
256pdns_recursor_SOURCES += \
257 sodiumsigners.cc
258pdns_recursor_LDADD += $(LIBSODIUM_LIBS)
259endif
260
0c6f6275
PL
261if MALLOC_TRACE
262pdns_recursor_SOURCES += \
263 malloctrace.cc \
264 malloctrace.hh
265pdns_recursor_LDFLAGS += -rdynamic
266endif
267
268if LUA
269pdns_recursor_LDADD += $(LUA_LIBS)
270endif
271
272if HAVE_FREEBSD
273pdns_recursor_SOURCES += kqueuemplexer.cc
274endif
275
276if HAVE_LINUX
277pdns_recursor_SOURCES += epollmplexer.cc
278endif
279
280if HAVE_SOLARIS
281pdns_recursor_SOURCES += \
282 devpollmplexer.cc \
283 portsmplexer.cc
284endif
285
48a44e8b
PL
286if HAVE_PROTOBUF
287if HAVE_PROTOC
aa7929a3 288dnsmessage.pb.cc: dnsmessage.proto
48a44e8b 289 $(AM_V_GEN)$(PROTOC) --cpp_out=./ $<
aa7929a3 290
aa7929a3
RG
291BUILT_SOURCES += dnsmessage.pb.cc
292pdns_recursor_LDADD += $(PROTOBUF_LIBS)
293nodist_pdns_recursor_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
48a44e8b 294pdns_recursor.$(OBJEXT): dnsmessage.pb.cc
35d883a8
RG
295
296nodist_testrunner_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
297testrunner_LDADD += $(PROTOBUF_LIBS)
298testrunner$(OBJEXT): dnsmessage.pb.cc
299
48a44e8b 300endif
aa7929a3
RG
301endif
302
0c6f6275
PL
303rec_control_SOURCES = \
304 arguments.cc arguments.hh \
305 dnsname.hh dnsname.cc \
306 dnslabeltext.cc \
307 logger.cc \
308 misc.cc \
309 qtype.cc \
310 rec_channel.cc rec_channel.hh \
311 rec_control.cc \
0c6f6275
PL
312 unix_utility.cc
313
314dnslabeltext.cc: dnslabeltext.rl
315 $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc
316
317curl_verbose = $(curl_verbose_$(V))
318curl_verbose_ = $(curl_verbose_$(AM_DEFAULT_VERBOSITY))
319curl_verbose_0 = @echo " CURL " $@;
320$(srcdir)/effective_tld_names.dat:
2603a63d 321 $(curl_verbose)if ! curl -s -S https://publicsuffix.org/list/public_suffix_list.dat > $@; then rm -f $@; exit 1; fi
0c6f6275
PL
322
323pubsuffix.cc: $(srcdir)/effective_tld_names.dat
324 $(AM_V_GEN)./mkpubsuffixcc
325
2f0d6d58
PL
326## Config file
327sysconf_DATA = recursor.conf-dist
328
329recursor.conf-dist: pdns_recursor
330 $(AM_V_GEN)./pdns_recursor --config > $@
331
332## Manpages
0c6f6275
PL
333MANPAGES=pdns_recursor.1 \
334 rec_control.1
335
66cc0eec
KM
336if HAVE_PANDOC
337 dist_man_MANS=$(MANPAGES)
338endif
339if HAVE_MANPAGES
340 dist_man_MANS=$(MANPAGES)
341endif
0c6f6275
PL
342
343if HAVE_PANDOC
344$(MANPAGES): %: %.md
345 $(AM_V_GEN)$(PANDOC) -s -t man $< -o $@
346else
0c6f6275
PL
347$(MANPAGES):
348 echo "You need pandoc to generate the manpages"
349 exit 1
350endif
4ff58b75
PL
351
352if HAVE_SYSTEMD
353pdns-recursor.service: pdns-recursor.service.in
354 $(AM_V_GEN)sed -e 's![@]sbindir[@]!$(sbindir)!' < $< > $@
355
a67f98c2
PL
356pdns-recursor@.service: pdns-recursor.service
357 $(AM_V_GEN)sed -e 's!/pdns_recursor!& --config-name=%i!' \
358 -e 's!Recursor!& %i!' \
359 < $< > $@
360
4ff58b75
PL
361systemdsystemunitdir = $(SYSTEMD_DIR)
362
363systemdsystemunit_DATA = \
a67f98c2
PL
364 pdns-recursor.service \
365 pdns-recursor@.service
4ff58b75 366endif
e10b6528
PL
367
368if !HAVE_LUA_HPP
369include lua_hpp.mk
370endif