]> git.ipfire.org Git - thirdparty/pdns.git/blame - pdns/recursordist/Makefile.am
rec: Log outgoing queries / incoming responses via protobuf
[thirdparty/pdns.git] / pdns / recursordist / Makefile.am
CommitLineData
23448838 1JSON11_LIBS = $(top_srcdir)/ext/json11/libjson11.la
0c6f6275 2
6b6720de 3AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(BOTAN110_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
642339d8 22BUILT_SOURCES=htmlfiles.h
48a44e8b
PL
23CLEANFILES = htmlfiles.h \
24 dnsmessage.pb.cc \
25 dnsmessage.pb.h
642339d8 26
27htmlfiles.h: html/*
28 ./incfiles > $@
29
0c6f6275
PL
30SUBDIRS=ext
31
32if LUA
33AM_CPPFLAGS +=$(LUA_CFLAGS)
34endif
35
36EXTRA_DIST = \
4554ba6e 37 NOTICE \
0c6f6275 38 .version \
0e9cbfc2 39 botan110signers.cc \
10f702ce 40 build-aux/gen-version \
7676c316 41 contrib/* \
0c6f6275
PL
42 devpollmplexer.cc \
43 dnslabeltext.cc \
44 dnslabeltext.rl \
aa7929a3 45 dnsmessage.proto \
0c6f6275
PL
46 effective_tld_names.dat \
47 epollmplexer.cc \
48 kqueuemplexer.cc \
e10b6528 49 lua_hpp.mk \
0c6f6275 50 malloctrace.cc malloctrace.hh \
0c6f6275 51 mtasker.cc \
a7303306 52 mtasker_fcontext.cc mtasker_ucontext.cc \
0c6f6275
PL
53 opensslsigners.hh opensslsigners.cc \
54 pdns_recursor.1.md \
55 portsmplexer.cc \
7496549d 56 rec_control.1.md \
218feb9d 57 rrd/* \
4ff58b75
PL
58 html incfiles \
59 pdns-recursor.service.in
0c6f6275
PL
60
61sbin_PROGRAMS = pdns_recursor
62bin_PROGRAMS = rec_control
63
64pdns_recursor_SOURCES = \
65 arguments.cc \
66 base32.cc base32.hh \
67 base64.cc base64.hh \
68 cachecleaner.hh \
69 comment.hh \
70 dns.hh dns.cc \
71 dns_random.hh dns_random.cc \
72 dnsbackend.hh \
73 dnslabeltext.cc \
74 dnsname.cc dnsname.hh \
75 dnspacket.hh \
76 dnsparser.hh dnsparser.cc \
77 dnsrecords.cc dnsrecords.hh \
78 dnssecinfra.hh dnssecinfra.cc \
79 dnsseckeeper.hh \
80 dnswriter.cc dnswriter.hh \
5c3b5e7f 81 ednsoptions.cc ednsoptions.hh \
0c6f6275
PL
82 ednssubnet.cc ednssubnet.hh \
83 filterpo.cc filterpo.hh \
85c7ca75 84 gettime.cc gettime.hh \
0c6f6275
PL
85 gss_context.cc gss_context.hh \
86 iputils.hh iputils.cc \
87 ixfr.cc ixfr.hh \
88 json.cc json.hh \
5cf909f3 89 lazy_allocator.hh \
0c6f6275
PL
90 lock.hh \
91 logger.hh logger.cc \
92 lua-recursor4.cc lua-recursor4.hh \
93 lwres.cc lwres.hh \
94 misc.hh misc.cc \
95 mplexer.hh \
96 mtasker.hh \
5ab14378 97 mtasker_context.cc mtasker_context.hh \
0c6f6275
PL
98 namespaces.hh \
99 nsecrecords.cc \
04c74848 100 opensslsigners.cc opensslsigners.hh \
0c6f6275
PL
101 pdns_recursor.cc \
102 pdnsexception.hh \
d9d3f9c1 103 protobuf.cc protobuf.hh \
0c6f6275
PL
104 pubsuffix.hh pubsuffix.cc \
105 qtype.hh qtype.cc \
106 randomhelper.cc \
107 rcpgenerator.cc rcpgenerator.hh \
108 rec-carbon.cc \
109 rec-lua-conf.hh rec-lua-conf.cc \
d9d3f9c1 110 rec-protobuf.cc rec-protobuf.hh \
0c6f6275
PL
111 rec_channel.cc rec_channel.hh \
112 rec_channel_rec.cc \
113 recpacketcache.cc recpacketcache.hh \
114 recursor_cache.cc recursor_cache.hh \
115 reczones.cc \
aa7929a3 116 remote_logger.cc remote_logger.hh \
0c6f6275 117 resolver.hh resolver.cc \
4898a348 118 resolve-context.hh \
0c6f6275 119 responsestats.hh responsestats.cc \
10c96475 120 root-addresses.hh \
f2234140 121 root-dnssec.hh \
0c6f6275
PL
122 rpzloader.cc rpzloader.hh \
123 secpoll-recursor.cc \
124 secpoll-recursor.hh \
125 selectmplexer.cc \
126 sholder.hh \
127 sillyrecords.cc \
128 sortlist.cc sortlist.hh \
129 sstuff.hh \
0c6f6275
PL
130 syncres.cc syncres.hh \
131 ueberbackend.hh \
132 unix_utility.cc \
133 utility.hh \
134 validate.cc validate.hh validate-recursor.cc validate-recursor.hh \
135 version.cc version.hh \
136 webserver.cc webserver.hh \
137 ws-api.cc ws-api.hh \
138 ws-recursor.cc ws-recursor.hh \
139 zoneparser-tng.cc zoneparser-tng.hh
140
e10b6528
PL
141if !HAVE_LUA_HPP
142BUILT_SOURCES += lua.hpp
143nodist_pdns_recursor_SOURCES = lua.hpp
144CLEANFILES += lua.hpp
145endif
146
0c6f6275
PL
147pdns_recursor_LDADD = \
148 $(YAHTTP_LIBS) \
04c74848 149 $(JSON11_LIBS) \
74d83458 150 $(LIBCRYPTO_LIBS) \
6b6720de 151 $(BOOST_CONTEXT_LIBS) \
21b338e8
PD
152 $(SYSTEMD_LIBS) \
153 $(RT_LIBS)
0c6f6275 154
04c74848 155pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \
01f097e4 156 $(LIBCRYPTO_LDFLAGS) $(BOOST_CONTEXT_LDFLAGS)
0c6f6275
PL
157
158if BOTAN110
159pdns_recursor_SOURCES += \
0e9cbfc2 160 botan110signers.cc
0c6f6275
PL
161pdns_recursor_LDADD += $(BOTAN110_LIBS)
162endif
163
164if MALLOC_TRACE
165pdns_recursor_SOURCES += \
166 malloctrace.cc \
167 malloctrace.hh
168pdns_recursor_LDFLAGS += -rdynamic
169endif
170
171if LUA
172pdns_recursor_LDADD += $(LUA_LIBS)
173endif
174
175if HAVE_FREEBSD
176pdns_recursor_SOURCES += kqueuemplexer.cc
177endif
178
179if HAVE_LINUX
180pdns_recursor_SOURCES += epollmplexer.cc
181endif
182
183if HAVE_SOLARIS
184pdns_recursor_SOURCES += \
185 devpollmplexer.cc \
186 portsmplexer.cc
187endif
188
48a44e8b
PL
189if HAVE_PROTOBUF
190if HAVE_PROTOC
aa7929a3 191dnsmessage.pb.cc: dnsmessage.proto
48a44e8b 192 $(AM_V_GEN)$(PROTOC) --cpp_out=./ $<
aa7929a3 193
aa7929a3
RG
194BUILT_SOURCES += dnsmessage.pb.cc
195pdns_recursor_LDADD += $(PROTOBUF_LIBS)
196nodist_pdns_recursor_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
48a44e8b
PL
197pdns_recursor.$(OBJEXT): dnsmessage.pb.cc
198endif
aa7929a3
RG
199endif
200
0c6f6275
PL
201rec_control_SOURCES = \
202 arguments.cc arguments.hh \
203 dnsname.hh dnsname.cc \
204 dnslabeltext.cc \
205 logger.cc \
206 misc.cc \
207 qtype.cc \
208 rec_channel.cc rec_channel.hh \
209 rec_control.cc \
0c6f6275
PL
210 unix_utility.cc
211
212dnslabeltext.cc: dnslabeltext.rl
213 $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc
214
215curl_verbose = $(curl_verbose_$(V))
216curl_verbose_ = $(curl_verbose_$(AM_DEFAULT_VERBOSITY))
217curl_verbose_0 = @echo " CURL " $@;
218$(srcdir)/effective_tld_names.dat:
2603a63d 219 $(curl_verbose)if ! curl -s -S https://publicsuffix.org/list/public_suffix_list.dat > $@; then rm -f $@; exit 1; fi
0c6f6275
PL
220
221pubsuffix.cc: $(srcdir)/effective_tld_names.dat
222 $(AM_V_GEN)./mkpubsuffixcc
223
2f0d6d58
PL
224## Config file
225sysconf_DATA = recursor.conf-dist
226
227recursor.conf-dist: pdns_recursor
228 $(AM_V_GEN)./pdns_recursor --config > $@
229
230## Manpages
0c6f6275
PL
231MANPAGES=pdns_recursor.1 \
232 rec_control.1
233
66cc0eec
KM
234if HAVE_PANDOC
235 dist_man_MANS=$(MANPAGES)
236endif
237if HAVE_MANPAGES
238 dist_man_MANS=$(MANPAGES)
239endif
0c6f6275
PL
240
241if HAVE_PANDOC
242$(MANPAGES): %: %.md
243 $(AM_V_GEN)$(PANDOC) -s -t man $< -o $@
244else
0c6f6275
PL
245$(MANPAGES):
246 echo "You need pandoc to generate the manpages"
247 exit 1
248endif
4ff58b75
PL
249
250if HAVE_SYSTEMD
251pdns-recursor.service: pdns-recursor.service.in
252 $(AM_V_GEN)sed -e 's![@]sbindir[@]!$(sbindir)!' < $< > $@
253
a67f98c2
PL
254pdns-recursor@.service: pdns-recursor.service
255 $(AM_V_GEN)sed -e 's!/pdns_recursor!& --config-name=%i!' \
256 -e 's!Recursor!& %i!' \
257 < $< > $@
258
4ff58b75
PL
259systemdsystemunitdir = $(SYSTEMD_DIR)
260
261systemdsystemunit_DATA = \
a67f98c2
PL
262 pdns-recursor.service \
263 pdns-recursor@.service
4ff58b75 264endif
e10b6528
PL
265
266if !HAVE_LUA_HPP
267include lua_hpp.mk
268endif