1 JSON11_LIBS = $(top_srcdir)/ext/json11/libjson11.la
2 PROBDS_LIBS = $(top_srcdir)/ext/probds/libprobds.la
4 AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(LIBSODIUM_CFLAGS) $(NET_SNMP_CFLAGS) $(LIBCAP_CFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" $(SYSTEMD_CFLAGS)
7 -I$(top_srcdir)/ext/json11 \
12 -DSYSCONFDIR=\"$(sysconfdir)\" \
13 -DPKGLIBDIR=\"$(pkglibdir)\" \
14 -DLOCALSTATEDIR=\"$(socketdir)\"
18 -DNODCACHEDIR=\"$(nodcachedir)\"
25 ACLOCAL_AMFLAGS = -I m4
27 BUILT_SOURCES=htmlfiles.h \
30 CLEANFILES = htmlfiles.h \
41 AM_CPPFLAGS +=$(LUA_CFLAGS)
51 effective_tld_names.dat \
55 malloctrace.cc malloctrace.hh \
58 mtasker_fcontext.cc mtasker_ucontext.cc \
60 opensslsigners.hh opensslsigners.cc \
65 pdns-recursor.service.in \
67 builder-support/gen-version
70 for file in $$(find $(distdir)/docs -type l); do \
71 t=`stat -c%N $$file | awk '{print $$NF}' | sed "s/'//g"` ; \
72 ln -fs ../$$t $$file; \
75 sbin_PROGRAMS = pdns_recursor
76 bin_PROGRAMS = rec_control
81 noinst_PROGRAMS = testrunner
82 TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message SRCDIR='$(srcdir)'
86 @echo "Unit tests are not enabled"
87 @echo "Run ./configure --enable-unit-tests"
90 pdns_recursor_SOURCES = \
96 capabilities.cc capabilities.hh \
99 dns_random.hh dns_random.cc \
102 dnsname.cc dnsname.hh \
104 dnsparser.hh dnsparser.cc \
105 dnsrecords.cc dnsrecords.hh \
106 dnssecinfra.hh dnssecinfra.cc \
108 dnswriter.cc dnswriter.hh \
109 ednsoptions.cc ednsoptions.hh \
110 ednssubnet.cc ednssubnet.hh \
111 filterpo.cc filterpo.hh \
112 gettime.cc gettime.hh \
113 gss_context.cc gss_context.hh \
114 iputils.hh iputils.cc \
119 logger.hh logger.cc \
120 lua-base4.cc lua-base4.hh \
121 lua-recursor4.cc lua-recursor4.hh \
122 lua-recursor4-ffi.hh \
127 mtasker_context.cc mtasker_context.hh \
129 negcache.hh negcache.cc \
131 opensslsigners.cc opensslsigners.hh \
136 protobuf.cc protobuf.hh \
137 pubsuffix.hh pubsuffix.cc \
140 rcpgenerator.cc rcpgenerator.hh \
142 rec-lua-conf.hh rec-lua-conf.cc \
143 rec-protobuf.cc rec-protobuf.hh \
144 rec-snmp.hh rec-snmp.cc \
145 rec_channel.cc rec_channel.hh \
147 recpacketcache.cc recpacketcache.hh \
148 recursor_cache.cc recursor_cache.hh \
150 remote_logger.cc remote_logger.hh \
151 resolver.hh resolver.cc \
153 responsestats.hh responsestats.cc \
156 rpzloader.cc rpzloader.hh \
157 secpoll-recursor.cc \
158 secpoll-recursor.hh \
161 snmp-agent.hh snmp-agent.cc \
162 sortlist.cc sortlist.hh \
165 syncres.cc syncres.hh \
166 threadname.hh threadname.cc \
167 tsigverifier.cc tsigverifier.hh \
171 uuid-utils.hh uuid-utils.cc \
172 validate.cc validate.hh validate-recursor.cc validate-recursor.hh \
173 version.cc version.hh \
174 webserver.cc webserver.hh \
175 ws-api.cc ws-api.hh \
176 ws-recursor.cc ws-recursor.hh \
178 zoneparser-tng.cc zoneparser-tng.hh
181 BUILT_SOURCES += lua.hpp
182 nodist_pdns_recursor_SOURCES = lua.hpp
183 CLEANFILES += lua.hpp
186 pdns_recursor_LDADD = \
190 $(BOOST_CONTEXT_LIBS) \
194 $(BOOST_SYSTEM_LIBS) \
198 pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \
199 $(LIBCRYPTO_LDFLAGS) $(BOOST_CONTEXT_LDFLAGS) \
200 $(BOOST_SYSTEM_LDFLAGS)
203 pdns_recursor_SOURCES += nod.hh nod.cc
204 pdns_recursor_LDADD += \
205 $(BOOST_FILESYSTEM_LIBS)
206 pdns_recursor_LDFLAGS += \
207 $(BOOST_FILESYSTEM_LDFLAGS)
210 testrunner_SOURCES = \
213 base64.cc base64.hh \
215 dns_random.cc dns_random.hh \
217 dnsname.cc dnsname.hh \
218 dnsparser.hh dnsparser.cc \
222 dnswriter.cc dnswriter.hh \
223 ednscookies.cc ednscookies.hh \
224 ednsoptions.cc ednsoptions.hh \
225 ednssubnet.cc ednssubnet.hh \
226 filterpo.cc filterpo.hh \
227 gettime.cc gettime.hh \
228 gss_context.cc gss_context.hh \
229 iputils.cc iputils.hh \
231 logger.cc logger.hh \
234 negcache.hh negcache.cc \
238 opensslsigners.cc opensslsigners.hh \
240 protobuf.cc protobuf.hh \
243 rec-protobuf.cc rec-protobuf.hh \
244 recpacketcache.cc recpacketcache.hh \
245 recursor_cache.cc recursor_cache.hh \
252 syncres.cc syncres.hh \
253 test-arguments_cc.cc \
257 test-dnsrecordcontent.cc \
258 test-dns_random_hh.cc \
260 test-dnsparser_hh.cc \
261 test-dnsrecords_cc.cc \
262 test-ednsoptions_cc.cc \
263 test-filterpo_cc.cc \
269 test-negcache_cc.cc \
270 test-packetcache_hh.cc \
271 test-rcpgenerator_cc.cc \
272 test-recpacketcache_cc.cc \
273 test-recursorcache_cc.cc \
279 threadname.hh threadname.cc \
280 tsigverifier.cc tsigverifier.hh \
282 validate.cc validate.hh \
283 validate-recursor.cc validate-recursor.hh \
285 zoneparser-tng.cc zoneparser-tng.hh
287 testrunner_LDFLAGS = \
289 $(BOOST_CONTEXT_LDFLAGS) \
290 $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \
291 $(LIBCRYPTO_LDFLAGS) \
292 $(BOOST_SYSTEM_LDFLAGS)
295 $(BOOST_CONTEXT_LIBS) \
296 $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \
299 $(BOOST_SYSTEM_LIBS) \
304 testrunner_SOURCES += nod.hh nod.cc \
307 testrunner_LDADD += \
308 $(BOOST_FILESYSTEM_LIBS)
309 testrunner_LDFLAGS += \
310 $(BOOST_FILESYSTEM_LDFLAGS)
314 pdns_recursor_SOURCES += \
316 pdns_recursor_LDADD += $(LIBSODIUM_LIBS)
317 testrunner_SOURCES += \
319 testrunner_LDADD += $(LIBSODIUM_LIBS)
323 pdns_recursor_SOURCES += \
325 pdns_recursor_LDADD += $(LIBDECAF_LIBS)
329 pdns_recursor_SOURCES += \
332 pdns_recursor_LDFLAGS += -rdynamic
336 pdns_recursor_LDADD += $(LUA_LIBS)
340 pdns_recursor_SOURCES += kqueuemplexer.cc
341 testrunner_SOURCES += kqueuemplexer.cc
345 pdns_recursor_SOURCES += epollmplexer.cc
346 testrunner_SOURCES += epollmplexer.cc
350 pdns_recursor_SOURCES += \
353 testrunner_SOURCES += \
360 dnsmessage.pb.cc: dnsmessage.proto
361 $(AM_V_GEN)$(PROTOC) --cpp_out=./ $<
363 BUILT_SOURCES += dnsmessage.pb.cc
364 pdns_recursor_LDADD += $(PROTOBUF_LIBS)
365 nodist_pdns_recursor_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
366 pdns_recursor.$(OBJEXT): dnsmessage.pb.cc
368 nodist_testrunner_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
369 testrunner_LDADD += $(PROTOBUF_LIBS)
370 testrunner$(OBJEXT): dnsmessage.pb.cc
375 rec_control_SOURCES = \
376 arguments.cc arguments.hh \
377 dnsname.hh dnsname.cc \
382 rec_channel.cc rec_channel.hh \
386 dnslabeltext.cc: dnslabeltext.rl
387 $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc
389 curl_verbose = $(curl_verbose_$(V))
390 curl_verbose_ = $(curl_verbose_$(AM_DEFAULT_VERBOSITY))
391 curl_verbose_0 = @echo " CURL " $@;
392 $(srcdir)/effective_tld_names.dat:
393 $(curl_verbose)if ! curl -s -S https://publicsuffix.org/list/public_suffix_list.dat > $@; then rm -f $@; exit 1; fi
395 pubsuffix.cc: $(srcdir)/effective_tld_names.dat
396 $(AM_V_GEN)./mkpubsuffixcc
399 sysconf_DATA = recursor.conf-dist
401 recursor.conf-dist: pdns_recursor
402 $(AM_V_GEN)./pdns_recursor --config > $@
405 MANPAGES=pdns_recursor.1 \
408 dist_man_MANS=$(MANPAGES)
412 $(MANPAGES): %: docs/manpages/%.rst .venv
413 .venv/bin/python -msphinx -b man docs . $<
414 endif # if !HAVE_MANPAGES
416 .venv: docs/requirements.txt
418 .venv/bin/pip install -U pip setuptools setuptools-git
419 .venv/bin/pip install -r docs/requirements.txt
421 html-docs: docs/** .venv
422 .venv/bin/python -msphinx -b html docs html-docs
424 latex/PowerDNS-Recursor.pdf: docs/** .venv
425 .venv/bin/python -msphinx -M latexpdf docs .
427 PowerDNS-Recursor.pdf: latex/PowerDNS-Recursor.pdf
430 html-docs.tar.bz2: html-docs
433 all-docs: PowerDNS-Recursor.pdf html-docs html-docs.tar.bz2
435 upload-docs: all-docs
436 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./html-docs/ web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
437 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html-docs.tar.bz2 web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
438 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./PowerDNS-Recursor.pdf web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
440 else # if HAVE_VIRTUALENV
442 echo "You need virtualenv to generate the manpages"
445 PowerDNS-Recursor.pdf:
446 echo "You need virtualenv to generate the PDF"
450 echo "You need virtualenv to generate the HTML docs"
455 pdns-recursor.service: pdns-recursor.service.in
456 $(AM_V_GEN)sed -e 's![@]sbindir[@]!$(sbindir)!' < $< > $@
457 if !HAVE_SYSTEMD_LOCK_PERSONALITY
458 $(AM_V_GEN)perl -ni -e 'print unless /^LockPersonality/' $@
460 if !HAVE_SYSTEMD_PRIVATE_DEVICES
461 $(AM_V_GEN)perl -ni -e 'print unless /^PrivateDevices/' $@
463 if !HAVE_SYSTEMD_PRIVATE_TMP
464 $(AM_V_GEN)perl -ni -e 'print unless /^PrivateTmp/' $@
466 if !HAVE_SYSTEMD_PROTECT_CONTROL_GROUPS
467 $(AM_V_GEN)perl -ni -e 'print unless /^ProtectControlGroups/' $@
469 if !HAVE_SYSTEMD_PROTECT_HOME
470 $(AM_V_GEN)perl -ni -e 'print unless /^ProtectHome/' $@
472 if !HAVE_SYSTEMD_PROTECT_KERNEL_MODULES
473 $(AM_V_GEN)perl -ni -e 'print unless /^ProtectKernelModules/' $@
475 if !HAVE_SYSTEMD_PROTECT_KERNEL_TUNABLES
476 $(AM_V_GEN)perl -ni -e 'print unless /^ProtectKernelTunables/' $@
478 if !HAVE_SYSTEMD_PROTECT_SYSTEM
479 $(AM_V_GEN)perl -ni -e 'print unless /^ProtectSystem/' $@
481 if !HAVE_SYSTEMD_RESTRICT_ADDRESS_FAMILIES
482 $(AM_V_GEN)perl -ni -e 'print unless /^RestrictAddressFamilies/' $@
484 if !HAVE_SYSTEMD_RESTRICT_NAMESPACES
485 $(AM_V_GEN)perl -ni -e 'print unless /^RestrictNamespaces/' $@
487 if !HAVE_SYSTEMD_RESTRICT_REALTIME
488 $(AM_V_GEN)perl -ni -e 'print unless /^RestrictRealtime/' $@
490 if !HAVE_SYSTEMD_SYSTEM_CALL_ARCHITECTURES
491 $(AM_V_GEN)perl -ni -e 'print unless /^SystemCallArchitectures/' $@
493 if !HAVE_SYSTEMD_SYSTEM_CALL_FILTER
494 $(AM_V_GEN)perl -ni -e 'print unless /^SystemCallFilter/' $@
497 pdns-recursor@.service: pdns-recursor.service
498 $(AM_V_GEN)sed -e 's!/pdns_recursor!& --config-name=%i!' \
499 -e 's!Recursor!& %i!' \
502 systemdsystemunitdir = $(SYSTEMD_DIR)
504 systemdsystemunit_DATA = \
505 pdns-recursor.service \
506 pdns-recursor@.service
509 pdns-recursor.service \
510 pdns-recursor@.service