]>
Commit | Line | Data |
---|---|---|
4649d67b | 1 | AM_CPPFLAGS += $(LUA_CFLAGS) $(LIBEDIT_CFLAGS) $(YAHTTP_CFLAGS) $(SANITIZER_FLAGS) -DSYSCONFDIR=\"${sysconfdir}\" |
50bed881 | 2 | |
91487eb9 PL |
3 | ACLOCAL_AMFLAGS = -I m4 |
4 | ||
f8204e9e | 5 | SUBDIRS=ext/yahttp |
bbfefc98 | 6 | |
7 | dnslabeltext.cc: dnslabeltext.rl | |
30bfe7f6 | 8 | $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc |
4676400a | 9 | |
a1f81e3b | 10 | BUILT_SOURCES=htmlfiles.h |
11 | ||
50bed881 | 12 | htmlfiles.h: html/* |
13 | ./incfiles > $@ | |
bbfefc98 | 14 | |
7cc65f8a SH |
15 | SRC_JS_FILES := $(wildcard src_js/*.js) |
16 | MIN_JS_FILES := $(patsubst src_js/%.js,html/js/%.min.js,$(SRC_JS_FILES)) | |
17 | ||
18 | html/js/%.min.js: src_js/%.js | |
19 | uglifyjs $< > $@ | |
20 | ||
21 | min_js: $(MIN_JS_FILES) | |
22 | ||
4ed8dfeb | 23 | if HAVE_RE2 |
24 | AM_CPPFLAGS += $(RE2_CFLAGS) | |
25 | endif | |
26 | ||
27 | ||
994c0ab3 PL |
28 | EXTRA_DIST=dnslabeltext.rl \ |
29 | dnsdistconf.lua \ | |
59c83cf6 | 30 | dnsmessage.proto \ |
994c0ab3 | 31 | README.md \ |
25553371 | 32 | delaypipe.cc delaypipe.hh \ |
994c0ab3 | 33 | html \ |
b8681462 | 34 | dnsdist.1.md \ |
5242cc51 | 35 | .version \ |
b3bcfb63 | 36 | contrib \ |
1caf101b | 37 | build-aux/gen-version \ |
babc4bab SH |
38 | ext/incbin/UNLICENSE \ |
39 | incfiles \ | |
40 | src_js | |
bbfefc98 | 41 | |
ca404e94 RG |
42 | if UNIT_TESTS |
43 | bin_PROGRAMS = dnsdist testrunner | |
44 | else | |
bbfefc98 | 45 | bin_PROGRAMS = dnsdist |
ca404e94 RG |
46 | endif |
47 | ||
bbfefc98 | 48 | dnsdist_SOURCES = \ |
1489accc | 49 | base64.hh \ |
77f8ae1a | 50 | dns.cc dns.hh \ |
11e1e08b | 51 | dnscrypt.cc dnscrypt.hh \ |
bbfefc98 | 52 | dnsdist.cc dnsdist.hh \ |
886e2cf2 | 53 | dnsdist-cache.cc dnsdist-cache.hh \ |
96b092a7 | 54 | dnsdist-carbon.cc \ |
ffb07158 | 55 | dnsdist-console.cc \ |
11e1e08b | 56 | dnsdist-dnscrypt.cc \ |
ca404e94 | 57 | dnsdist-ecs.cc dnsdist-ecs.hh \ |
bbfefc98 | 58 | dnsdist-lua.cc \ |
80a216c9 | 59 | dnsdist-lua2.cc \ |
d8c19b98 | 60 | dnsdist-remotelogger.cc dnsdist-remotelogger.hh \ |
f092a5c7 | 61 | dnsdist-rings.cc \ |
8a5d5053 | 62 | dnsdist-tcp.cc \ |
50bed881 | 63 | dnsdist-web.cc \ |
bbfefc98 | 64 | dnslabeltext.cc \ |
65 | dnsname.cc dnsname.hh \ | |
ca404e94 | 66 | dnsparser.hh dnsparser.cc \ |
0940e4eb | 67 | dnsrulactions.hh \ |
bbfefc98 | 68 | dnswriter.cc dnswriter.hh \ |
69 | dolog.hh \ | |
5c3b5e7f | 70 | ednsoptions.cc ednsoptions.hh \ |
ca404e94 | 71 | ednssubnet.cc ednssubnet.hh \ |
bbfefc98 | 72 | iputils.cc iputils.hh \ |
0e41337b | 73 | lock.hh \ |
bbfefc98 | 74 | misc.cc misc.hh \ |
ed1f29ef | 75 | htmlfiles.h \ |
bbfefc98 | 76 | namespaces.hh \ |
77 | pdnsexception.hh \ | |
78 | qtype.cc qtype.hh \ | |
ecbe9133 | 79 | sholder.hh \ |
bbfefc98 | 80 | sodcrypto.cc sodcrypto.hh \ |
f8204e9e PL |
81 | sstuff.hh \ |
82 | ext/luawrapper/include/LuaContext.hpp \ | |
83 | ext/json11/json11.cpp \ | |
84 | ext/json11/json11.hpp \ | |
6a699049 | 85 | ext/incbin/incbin.h |
bbfefc98 | 86 | |
87 | dnsdist_LDFLAGS = \ | |
88 | $(AM_LDFLAGS) \ | |
bfb7cc84 | 89 | $(PROGRAM_LDFLAGS) \ |
50bed881 | 90 | -pthread |
bbfefc98 | 91 | |
92 | dnsdist_LDADD = \ | |
a6158e7a | 93 | $(LUA_LIBS) \ |
d9de8b61 | 94 | $(LIBEDIT_LIBS) \ |
a6158e7a RK |
95 | $(RT_LIBS) \ |
96 | $(YAHTTP_LIBS) \ | |
e85e4d88 RG |
97 | $(LIBSODIUM_LIBS) \ |
98 | $(SANITIZER_FLAGS) | |
bbfefc98 | 99 | |
4ed8dfeb | 100 | if HAVE_RE2 |
101 | dnsdist_LDADD += $(RE2_LIBS) | |
102 | endif | |
103 | ||
b2eccf5f | 104 | |
105 | dnsmessage.pb.cc: dnsmessage.proto | |
106 | protoc --cpp_out=./ $< | |
107 | ||
d8c19b98 | 108 | if HAVE_PROTOBUF |
b2eccf5f | 109 | BUILT_SOURCES += dnsmessage.pb.cc |
d8c19b98 | 110 | dnsdist_LDADD += $(PROTOBUF_LIBS) |
59c83cf6 | 111 | nodist_dnsdist_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h |
d8c19b98 | 112 | endif |
ca404e94 RG |
113 | |
114 | testrunner_SOURCES = \ | |
11e1e08b RG |
115 | base64.hh \ |
116 | dns.hh \ | |
e27e17c3 | 117 | test-base64_cc.cc \ |
11e1e08b | 118 | test-dnsdist_cc.cc \ |
886e2cf2 | 119 | test-dnsdistpacketcache_cc.cc \ |
11e1e08b RG |
120 | test-dnscrypt_cc.cc \ |
121 | dnsdist.hh \ | |
886e2cf2 | 122 | dnsdist-cache.cc dnsdist-cache.hh \ |
ca404e94 | 123 | dnsdist-ecs.cc dnsdist-ecs.hh \ |
11e1e08b | 124 | dnscrypt.cc dnscrypt.hh \ |
ca404e94 RG |
125 | dnslabeltext.cc \ |
126 | dnsname.cc dnsname.hh \ | |
127 | dnsparser.hh dnsparser.cc \ | |
128 | dnswriter.cc dnswriter.hh \ | |
129 | dolog.hh \ | |
5c3b5e7f | 130 | ednsoptions.cc ednsoptions.hh \ |
ca404e94 RG |
131 | ednssubnet.cc ednssubnet.hh \ |
132 | iputils.cc iputils.hh \ | |
133 | misc.cc misc.hh \ | |
134 | namespaces.hh \ | |
135 | pdnsexception.hh \ | |
136 | qtype.cc qtype.hh \ | |
137 | sholder.hh \ | |
e27e17c3 | 138 | sodcrypto.cc \ |
ca404e94 RG |
139 | sstuff.hh \ |
140 | testrunner.cc | |
141 | ||
142 | testrunner_LDFLAGS = \ | |
143 | $(AM_LDFLAGS) \ | |
144 | $(PROGRAM_LDFLAGS) \ | |
145 | $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \ | |
146 | -pthread | |
147 | ||
148 | testrunner_LDADD = \ | |
149 | $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \ | |
11e1e08b | 150 | $(LIBSODIUM_LIBS) \ |
8d06661a RG |
151 | $(RT_LIBS) \ |
152 | $(SANITIZER_FLAGS) | |
ca404e94 | 153 | |
f68a9074 PL |
154 | MANPAGES=dnsdist.1 |
155 | ||
156 | dist_man_MANS=$(MANPAGES) | |
157 | ||
158 | if HAVE_PANDOC | |
159 | $(MANPAGES): %: %.md | |
160 | $(AM_V_GEN)$(PANDOC) -s -t man $< -o $@ | |
161 | else | |
162 | if HAVE_MANPAGES | |
163 | #nothing | |
164 | else | |
165 | $(MANPAGES): | |
166 | echo "You need pandoc to generate the manpages" | |
167 | exit 1 | |
168 | endif | |
169 | endif |