]> git.ipfire.org Git - thirdparty/pdns.git/blob - pdns/recursordist/Makefile.am
Protobuf refactoring
[thirdparty/pdns.git] / pdns / recursordist / Makefile.am
1 JSON11_LIBS = $(top_srcdir)/ext/json11/libjson11.la
2
3 AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(BOTAN110_CFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" $(SYSTEMD_CFLAGS)
4
5 AM_CPPFLAGS += \
6 -I$(top_srcdir)/ext/json11 \
7 -I$(top_srcdir)/ext/rapidjson/include \
8 $(YAHTTP_CFLAGS) \
9 $(OPENSSL_INCLUDES)
10
11 AM_CXXFLAGS = \
12 -DSYSCONFDIR=\"$(sysconfdir)\" \
13 -DPKGLIBDIR=\"$(pkglibdir)\" \
14 -DLOCALSTATEDIR=\"$(socketdir)\"
15
16 AM_LDFLAGS = \
17 $(PROGRAM_LDFLAGS) \
18 $(THREADFLAGS)
19
20 ACLOCAL_AMFLAGS = -I m4
21
22 BUILT_SOURCES=htmlfiles.h
23 CLEANFILES = htmlfiles.h \
24 dnsmessage.pb.cc \
25 dnsmessage.pb.h
26
27 htmlfiles.h: html/*
28 ./incfiles > $@
29
30 SUBDIRS=ext
31
32 if LUA
33 AM_CPPFLAGS +=$(LUA_CFLAGS)
34 endif
35
36 EXTRA_DIST = \
37 NOTICE \
38 .version \
39 botan110signers.cc \
40 build-aux/gen-version \
41 contrib/* \
42 devpollmplexer.cc \
43 dnslabeltext.cc \
44 dnslabeltext.rl \
45 dnsmessage.proto \
46 effective_tld_names.dat \
47 epollmplexer.cc \
48 kqueuemplexer.cc \
49 lua_hpp.mk \
50 malloctrace.cc malloctrace.hh \
51 mtasker.cc \
52 mtasker_fcontext.cc mtasker_ucontext.cc \
53 opensslsigners.hh opensslsigners.cc \
54 pdns_recursor.1.md \
55 portsmplexer.cc \
56 rec_control.1.md \
57 rrd/* \
58 html incfiles \
59 pdns-recursor.service.in
60
61 sbin_PROGRAMS = pdns_recursor
62 bin_PROGRAMS = rec_control
63
64 pdns_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 \
81 ednsoptions.cc ednsoptions.hh \
82 ednssubnet.cc ednssubnet.hh \
83 filterpo.cc filterpo.hh \
84 gettime.cc gettime.hh \
85 gss_context.cc gss_context.hh \
86 iputils.hh iputils.cc \
87 ixfr.cc ixfr.hh \
88 json.cc json.hh \
89 lazy_allocator.hh \
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 \
97 mtasker_context.cc mtasker_context.hh \
98 namespaces.hh \
99 nsecrecords.cc \
100 opensslsigners.cc opensslsigners.hh \
101 pdns_recursor.cc \
102 pdnsexception.hh \
103 protobuf.cc protobuf.hh \
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 \
110 rec-protobuf.cc rec-protobuf.hh \
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 \
116 remote_logger.cc remote_logger.hh \
117 resolver.hh resolver.cc \
118 responsestats.hh responsestats.cc \
119 root-addresses.hh \
120 rpzloader.cc rpzloader.hh \
121 secpoll-recursor.cc \
122 secpoll-recursor.hh \
123 selectmplexer.cc \
124 sholder.hh \
125 sillyrecords.cc \
126 sortlist.cc sortlist.hh \
127 sstuff.hh \
128 syncres.cc syncres.hh \
129 ueberbackend.hh \
130 unix_utility.cc \
131 utility.hh \
132 validate.cc validate.hh validate-recursor.cc validate-recursor.hh \
133 version.cc version.hh \
134 webserver.cc webserver.hh \
135 ws-api.cc ws-api.hh \
136 ws-recursor.cc ws-recursor.hh \
137 zoneparser-tng.cc zoneparser-tng.hh
138
139 if !HAVE_LUA_HPP
140 BUILT_SOURCES += lua.hpp
141 nodist_pdns_recursor_SOURCES = lua.hpp
142 CLEANFILES += lua.hpp
143 endif
144
145 pdns_recursor_LDADD = \
146 $(YAHTTP_LIBS) \
147 $(JSON11_LIBS) \
148 $(OPENSSL_LIBS) \
149 $(BOOST_CONTEXT_LIBS) \
150 $(SYSTEMD_LIBS) \
151 $(RT_LIBS)
152
153 pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \
154 $(OPENSSL_LDFLAGS)
155
156 if BOTAN110
157 pdns_recursor_SOURCES += \
158 botan110signers.cc
159 pdns_recursor_LDADD += $(BOTAN110_LIBS)
160 endif
161
162 if MALLOC_TRACE
163 pdns_recursor_SOURCES += \
164 malloctrace.cc \
165 malloctrace.hh
166 pdns_recursor_LDFLAGS += -rdynamic
167 endif
168
169 if LUA
170 pdns_recursor_LDADD += $(LUA_LIBS)
171 endif
172
173 if HAVE_FREEBSD
174 pdns_recursor_SOURCES += kqueuemplexer.cc
175 endif
176
177 if HAVE_LINUX
178 pdns_recursor_SOURCES += epollmplexer.cc
179 endif
180
181 if HAVE_SOLARIS
182 pdns_recursor_SOURCES += \
183 devpollmplexer.cc \
184 portsmplexer.cc
185 endif
186
187 if HAVE_PROTOBUF
188 if HAVE_PROTOC
189 dnsmessage.pb.cc: dnsmessage.proto
190 $(AM_V_GEN)$(PROTOC) --cpp_out=./ $<
191
192 BUILT_SOURCES += dnsmessage.pb.cc
193 pdns_recursor_LDADD += $(PROTOBUF_LIBS)
194 nodist_pdns_recursor_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
195 pdns_recursor.$(OBJEXT): dnsmessage.pb.cc
196 endif
197 endif
198
199 rec_control_SOURCES = \
200 arguments.cc arguments.hh \
201 dnsname.hh dnsname.cc \
202 dnslabeltext.cc \
203 logger.cc \
204 misc.cc \
205 qtype.cc \
206 rec_channel.cc rec_channel.hh \
207 rec_control.cc \
208 unix_utility.cc
209
210 dnslabeltext.cc: dnslabeltext.rl
211 $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc
212
213 curl_verbose = $(curl_verbose_$(V))
214 curl_verbose_ = $(curl_verbose_$(AM_DEFAULT_VERBOSITY))
215 curl_verbose_0 = @echo " CURL " $@;
216 $(srcdir)/effective_tld_names.dat:
217 $(curl_verbose)if ! curl -s -S https://publicsuffix.org/list/public_suffix_list.dat > $@; then rm -f $@; exit 1; fi
218
219 pubsuffix.cc: $(srcdir)/effective_tld_names.dat
220 $(AM_V_GEN)./mkpubsuffixcc
221
222 ## Config file
223 sysconf_DATA = recursor.conf-dist
224
225 recursor.conf-dist: pdns_recursor
226 $(AM_V_GEN)./pdns_recursor --config > $@
227
228 ## Manpages
229 MANPAGES=pdns_recursor.1 \
230 rec_control.1
231
232 dist_man_MANS=$(MANPAGES)
233
234 if HAVE_PANDOC
235 $(MANPAGES): %: %.md
236 $(AM_V_GEN)$(PANDOC) -s -t man $< -o $@
237 else
238 if HAVE_MANPAGES
239 #nothing
240 else
241 $(MANPAGES):
242 echo "You need pandoc to generate the manpages"
243 exit 1
244 endif
245 endif
246
247 if HAVE_SYSTEMD
248 pdns-recursor.service: pdns-recursor.service.in
249 $(AM_V_GEN)sed -e 's![@]sbindir[@]!$(sbindir)!' < $< > $@
250
251 pdns-recursor@.service: pdns-recursor.service
252 $(AM_V_GEN)sed -e 's!/pdns_recursor!& --config-name=%i!' \
253 -e 's!Recursor!& %i!' \
254 < $< > $@
255
256 systemdsystemunitdir = $(SYSTEMD_DIR)
257
258 systemdsystemunit_DATA = \
259 pdns-recursor.service \
260 pdns-recursor@.service
261 endif
262
263 if !HAVE_LUA_HPP
264 include lua_hpp.mk
265 endif