Makefile.am 11.6 KB
Newer Older
1
ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4
Ondřej Surý's avatar
Ondřej Surý committed
2
SUBDIRS = zscanner dnssec dnstap .
3

4
lib_LTLIBRARIES =				\
5
	libknot.la
6 7 8
noinst_LTLIBRARIES = 				\
	libknot-internal.la			\
	libknot-yparser.la
9

10
AM_CPPFLAGS = \
Daniel Salzman's avatar
Daniel Salzman committed
11 12 13
	-include $(top_builddir)/src/config.h	\
	-DCONFIG_DIR='"${config_dir}"'		\
	-DSTORAGE_DIR='"${storage_dir}"'	\
14
	-DRUN_DIR='"${run_dir}"'		\
Ondřej Surý's avatar
Ondřej Surý committed
15
	-I$(srcdir)/dnssec/lib
16

17 18
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
Ondřej Surý's avatar
Ondřej Surý committed
19

20 21 22
######################
# Knot DNS Libraries #
######################
23

24
# dynamic: libknot headers
25
libknot_ladir = $(includedir)
Jan Včelák's avatar
Jan Včelák committed
26
nobase_libknot_la_HEADERS =			\
27
	libknot/binary.h			\
28
	libknot/consts.h			\
29
	libknot/descriptor.h			\
30
	libknot/dname.h				\
31
	libknot/errcode.h			\
32 33 34
	libknot/libknot.h			\
	libknot/packet/compr.h			\
	libknot/packet/pkt.h			\
35
	libknot/packet/rrset-wire.h		\
36
	libknot/packet/wire.h			\
37
	libknot/processing/layer.h		\
Daniel Salzman's avatar
Daniel Salzman committed
38 39 40 41 42 43
	libknot/processing/overlay.h		\
	libknot/processing/requestor.h		\
	libknot/rdata.h				\
	libknot/rdataset.h			\
	libknot/rrset-dump.h			\
	libknot/rrset.h				\
44
	libknot/rrtype/aaaa.h			\
45
	libknot/rrtype/dnskey.h			\
46 47
	libknot/rrtype/naptr.h			\
	libknot/rrtype/nsec.h			\
48
	libknot/rrtype/nsec3.h			\
Daniel Salzman's avatar
Daniel Salzman committed
49
	libknot/rrtype/nsec3param.h		\
50
	libknot/rrtype/opt.h			\
Daniel Salzman's avatar
Daniel Salzman committed
51
	libknot/rrtype/rdname.h			\
52 53 54
	libknot/rrtype/rrsig.h			\
	libknot/rrtype/soa.h			\
	libknot/rrtype/tsig.h			\
55 56
	libknot/tsig-op.h			\
	libknot/tsig.h
57 58

libknot_internal_ladir = $(includedir)
59
nobase_libknot_internal_la_HEADERS = 		\
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
	libknot/internal/array-sort.h		\
	libknot/internal/base32hex.h		\
	libknot/internal/base64.h		\
	libknot/internal/binsearch.h		\
	libknot/internal/consts.h		\
	libknot/internal/endian.h		\
	libknot/internal/errcode.h		\
	libknot/internal/getline.h		\
	libknot/internal/heap.h			\
	libknot/internal/hhash.h		\
	libknot/internal/lists.h		\
	libknot/internal/macros.h		\
	libknot/internal/mem.h			\
	libknot/internal/mempattern.h		\
	libknot/internal/mempool.h		\
	libknot/internal/namedb/namedb.h	\
	libknot/internal/namedb/namedb_lmdb.h	\
	libknot/internal/namedb/namedb_trie.h	\
	libknot/internal/net.h			\
	libknot/internal/print.h		\
	libknot/internal/sockaddr.h		\
	libknot/internal/strlcat.h		\
	libknot/internal/strlcpy.h		\
	libknot/internal/tolower.h		\
	libknot/internal/trie/hat-trie.h	\
	libknot/internal/trie/murmurhash3.h	\
	libknot/internal/utils.h
87

Jan Včelák's avatar
Jan Včelák committed
88
# dynamic: libknot sources
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
libknot_la_SOURCES =				\
	libknot/binary.c			\
	libknot/consts.c			\
	libknot/descriptor.c			\
	libknot/dname.c				\
	libknot/errcode.c			\
	libknot/packet/compr.c			\
	libknot/packet/pkt.c			\
	libknot/packet/rrset-wire.c		\
	libknot/processing/layer.c		\
	libknot/processing/overlay.c		\
	libknot/processing/requestor.c		\
	libknot/rdata.c				\
	libknot/rdataset.c			\
	libknot/rrset-dump.c			\
	libknot/rrset.c				\
	libknot/rrtype/nsec3.c			\
	libknot/rrtype/nsec3param.c		\
	libknot/rrtype/opt.c			\
	libknot/rrtype/tsig.c			\
109
	libknot/tsig-op.c			\
110
	libknot/tsig.c				\
111 112 113
	$(nobase_libknot_la_HEADERS)

libknot_yparser_la_SOURCES = 			\
114 115 116 117 118
	libknot/yparser/yparser.c		\
	libknot/yparser/ypbody.c		\
	libknot/yparser/ypformat.c		\
	libknot/yparser/ypscheme.c		\
	libknot/yparser/yptrafo.c		\
119 120 121 122
	libknot/yparser/yparser.h		\
	libknot/yparser/ypformat.h		\
	libknot/yparser/ypscheme.h		\
	libknot/yparser/yptrafo.h
123 124

libknot_internal_la_SOURCES = 			\
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
	libknot/internal/base32hex.c		\
	libknot/internal/base64.c		\
	libknot/internal/errcode.c		\
	libknot/internal/getline.c		\
	libknot/internal/heap.c			\
	libknot/internal/hhash.c		\
	libknot/internal/lists.c		\
	libknot/internal/mem.c			\
	libknot/internal/mempattern.c		\
	libknot/internal/mempool.c		\
	libknot/internal/namedb/namedb_lmdb.c	\
	libknot/internal/namedb/namedb_trie.c	\
	libknot/internal/net.c			\
	libknot/internal/print.c		\
	libknot/internal/sockaddr.c		\
	libknot/internal/strlcat.c		\
	libknot/internal/strlcpy.c		\
	libknot/internal/tolower.c		\
	libknot/internal/trie/hat-trie.c	\
	libknot/internal/trie/murmurhash3.c	\
	libknot/internal/utils.c		\
146
	$(nobase_libknot_internal_la_HEADERS)
147

148
libknot_internal_la_CPPFLAGS = $(AM_CPPFLAGS) $(lmdb_CFLAGS)
149
libknot_internal_la_CFLAGS = $(AM_CFLAGS)
150

151
libknot_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAG_VISIBILITY) $(lmdb_CFLAGS)
152
libknot_la_CFLAGS = $(AM_CFLAGS)
153
libknot_la_LDFLAGS = $(AM_LDFLAGS) $(libknot_VERSION_INFO) $(lmdb_LIBS)
154
libknot_la_LIBADD  = dnssec/libdnssec.la libknot-internal.la
155

156
# pkg-config
157
pkgconfig_DATA = libknot.pc
158 159

if !HAVE_LMDB
160
libknot_internal_la_SOURCES +=			\
161 162 163
	libknot/internal/namedb/mdb.c		\
	libknot/internal/namedb/midl.c		\
	libknot/internal/namedb/lmdb.h		\
164
	libknot/internal/namedb/midl.h
165
libknot_internal_la_CPPFLAGS +=			\
166 167 168 169 170 171 172
	-I$(srcdir)/libknot/internal/namedb/
endif

###################
# Knot DNS Daemon #
###################

173 174
if HAVE_DAEMON

175
sbin_PROGRAMS = knotc knotd
176
libexec_PROGRAMS = knot1to2
177 178 179 180 181 182 183 184
noinst_LTLIBRARIES += libknotd.la

knotc_SOURCES =					\
	knot/ctl/knotc_main.c

knotd_SOURCES =					\
	knot/main.c

185 186 187 188 189 190 191 192 193 194 195
knot1to2_SOURCES =				\
	utils/knot1to2/cf-lex.c			\
	utils/knot1to2/cf-parse.tab.c		\
	utils/knot1to2/cf-parse.tab.h		\
	utils/knot1to2/extra.c			\
	utils/knot1to2/extra.h			\
	utils/knot1to2/includes.c		\
	utils/knot1to2/includes.h		\
	utils/knot1to2/main.c			\
	utils/knot1to2/scheme.h

196
# static: server shared
197
libknotd_la_SOURCES =				\
198 199
	knot/conf/base.c			\
	knot/conf/base.h			\
200 201 202 203 204 205 206 207
	knot/conf/conf.c			\
	knot/conf/conf.h			\
	knot/conf/confdb.c			\
	knot/conf/confdb.h			\
	knot/conf/scheme.c			\
	knot/conf/scheme.h			\
	knot/conf/tools.c			\
	knot/conf/tools.h			\
208 209
	knot/ctl/estimator.c			\
	knot/ctl/estimator.h			\
210 211 212 213
	knot/ctl/process.c			\
	knot/ctl/process.h			\
	knot/ctl/remote.c			\
	knot/ctl/remote.h			\
214 215
	knot/dnssec/context.c			\
	knot/dnssec/context.h			\
216 217 218 219
	knot/dnssec/nsec-chain.c		\
	knot/dnssec/nsec-chain.h		\
	knot/dnssec/nsec3-chain.c		\
	knot/dnssec/nsec3-chain.h		\
220 221
	knot/dnssec/policy.c			\
	knot/dnssec/policy.h			\
222 223
	knot/dnssec/rrset-sign.c		\
	knot/dnssec/rrset-sign.h		\
224 225 226 227 228 229 230 231
	knot/dnssec/zone-events.c		\
	knot/dnssec/zone-events.h		\
	knot/dnssec/zone-keys.c			\
	knot/dnssec/zone-keys.h			\
	knot/dnssec/zone-nsec.c			\
	knot/dnssec/zone-nsec.h			\
	knot/dnssec/zone-sign.c			\
	knot/dnssec/zone-sign.h			\
Daniel Salzman's avatar
Daniel Salzman committed
232 233
	knot/modules/synth_record.c		\
	knot/modules/synth_record.h		\
Jan Včelák's avatar
Jan Včelák committed
234 235
	knot/modules/dnsproxy.c			\
	knot/modules/dnsproxy.h			\
236 237
	knot/nameserver/axfr.c			\
	knot/nameserver/axfr.h			\
238 239
	knot/nameserver/capture.c		\
	knot/nameserver/capture.h		\
Daniel Salzman's avatar
Daniel Salzman committed
240 241
	knot/nameserver/chaos.c			\
	knot/nameserver/chaos.h			\
242 243 244 245
	knot/nameserver/internet.c		\
	knot/nameserver/internet.h		\
	knot/nameserver/ixfr.c			\
	knot/nameserver/ixfr.h			\
Daniel Salzman's avatar
Daniel Salzman committed
246 247
	knot/nameserver/notify.c		\
	knot/nameserver/notify.h		\
248 249
	knot/nameserver/nsec_proofs.c		\
	knot/nameserver/nsec_proofs.h		\
Lubos Slovak's avatar
Lubos Slovak committed
250 251
	knot/nameserver/process_answer.c	\
	knot/nameserver/process_answer.h	\
Daniel Salzman's avatar
Daniel Salzman committed
252 253
	knot/nameserver/process_query.c		\
	knot/nameserver/process_query.h		\
254 255
	knot/nameserver/query_module.c		\
	knot/nameserver/query_module.h		\
256 257
	knot/nameserver/tsig_ctx.c		\
	knot/nameserver/tsig_ctx.h		\
Daniel Salzman's avatar
Daniel Salzman committed
258 259
	knot/nameserver/update.c		\
	knot/nameserver/update.h		\
260 261 262 263 264
	knot/common/debug.h			\
	knot/common/evsched.c			\
	knot/common/evsched.h			\
	knot/common/fdset.c			\
	knot/common/fdset.h			\
265 266
	knot/common/log.c			\
	knot/common/log.h			\
267 268
	knot/common/ref.c			\
	knot/common/ref.h			\
Daniel Salzman's avatar
Daniel Salzman committed
269
	knot/common/time.h			\
270
	knot/common/trim.h			\
271
	knot/server/dthreads.c			\
272
	knot/server/dthreads.h			\
Jan Kadlec's avatar
Jan Kadlec committed
273
	knot/server/journal.c			\
274 275 276
	knot/server/journal.h			\
	knot/server/rrl.c			\
	knot/server/rrl.h			\
Daniel Salzman's avatar
Daniel Salzman committed
277 278
	knot/server/serialization.c		\
	knot/server/serialization.h		\
279
	knot/server/server.c			\
280 281
	knot/server/server.h			\
	knot/server/tcp-handler.c		\
282
	knot/server/tcp-handler.h		\
283 284
	knot/server/udp-handler.c		\
	knot/server/udp-handler.h		\
285 286
	knot/updates/acl.c			\
	knot/updates/acl.h			\
Daniel Salzman's avatar
Daniel Salzman committed
287 288
	knot/updates/apply.c			\
	knot/updates/apply.h			\
289
	knot/updates/changesets.c		\
290
	knot/updates/changesets.h		\
291
	knot/updates/ddns.c			\
292
	knot/updates/ddns.h			\
293 294
	knot/updates/zone-update.c		\
	knot/updates/zone-update.h		\
295 296 297 298
	knot/worker/pool.c			\
	knot/worker/pool.h			\
	knot/worker/queue.c			\
	knot/worker/queue.h			\
299 300
	knot/zone/contents.c			\
	knot/zone/contents.h			\
301 302
	knot/zone/events/events.c		\
	knot/zone/events/events.h		\
Jan Kadlec's avatar
Jan Kadlec committed
303 304 305 306
	knot/zone/events/handlers.c		\
	knot/zone/events/handlers.h		\
	knot/zone/events/replan.c		\
	knot/zone/events/replan.h		\
307 308
	knot/zone/node.c			\
	knot/zone/node.h			\
309 310
	knot/zone/semantic-check.c		\
	knot/zone/semantic-check.h		\
311 312
	knot/zone/serial.c			\
	knot/zone/serial.h			\
313 314
	knot/zone/timers.c			\
	knot/zone/timers.h			\
315 316
	knot/zone/zone-diff.c			\
	knot/zone/zone-diff.h			\
317 318
	knot/zone/zone-dump.c			\
	knot/zone/zone-dump.h			\
Daniel Salzman's avatar
Daniel Salzman committed
319 320
	knot/zone/zone-load.c			\
	knot/zone/zone-load.h			\
321 322
	knot/zone/zone-tree.c			\
	knot/zone/zone-tree.h			\
323 324
	knot/zone/zone.c			\
	knot/zone/zone.h			\
325 326
	knot/zone/zonedb-load.c			\
	knot/zone/zonedb-load.h			\
Daniel Salzman's avatar
Daniel Salzman committed
327 328
	knot/zone/zonedb.c			\
	knot/zone/zonedb.h			\
329 330
	knot/zone/zonefile.c			\
	knot/zone/zonefile.h
331

332 333
libknotd_la_CPPFLAGS  = $(AM_CPPFLAGS) $(systemd_CFLAGS) $(liburcu_CFLAGS)
libknotd_la_LDFLAGS = $(AM_LDFLAGS) $(systemd_LIBS) $(liburcu_LIBS)
334
libknotd_la_LIBADD = libknot.la libknot-yparser.la zscanner/libzscanner.la $(liburcu_LIBS)
Jan Včelák's avatar
Jan Včelák committed
335

336
knotd_CPPFLAGS = $(AM_CPPFLAGS) $(liburcu_CFLAGS)
337 338 339
knotd_LDADD = libknotd.la $(liburcu_LIBS)
knotc_LDADD = libknotd.la
knot1to2_LDADD = libknotd.la
340

341 342 343
####################################
# Optional Knot DNS Daemon modules #
####################################
344

345
if HAVE_DNSTAP
346 347 348
libknotd_la_SOURCES +=				\
	knot/modules/dnstap.c			\
	knot/modules/dnstap.h
349 350
libknotd_la_CPPFLAGS += $(DNSTAP_CFLAGS)
libknotd_la_LIBADD += $(DNSTAP_LIBS) dnstap/libdnstap.la
351
endif # HAVE_DNSTAP
352

353
if HAVE_ROSEDB
354
libknotd_la_SOURCES +=				\
355
	knot/modules/rosedb.c			\
Marek Vavruša's avatar
Marek Vavruša committed
356
	knot/modules/rosedb.h
357
endif # HAVE_ROSEDB
358

359 360
# Create storage and run-time directories
install-data-hook:
361
	$(INSTALL) -d $(DESTDIR)/@config_dir@
362 363
	$(INSTALL) -d $(DESTDIR)/@run_dir@
	$(INSTALL) -d $(DESTDIR)/@storage_dir@
364

365
endif # HAVE_DAEMON
366 367 368 369 370 371 372

######################
# Knot DNS Utilities #
######################

if HAVE_UTILS

373
bin_PROGRAMS = kdig khost knsupdate
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
noinst_LTLIBRARIES += libknotus.la

kdig_SOURCES =					\
	utils/kdig/kdig_exec.c			\
	utils/kdig/kdig_exec.h			\
	utils/kdig/kdig_main.c			\
	utils/kdig/kdig_params.c		\
	utils/kdig/kdig_params.h

khost_SOURCES =					\
	utils/kdig/kdig_exec.c			\
	utils/kdig/kdig_exec.h			\
	utils/kdig/kdig_params.c		\
	utils/kdig/kdig_params.h		\
	utils/khost/khost_main.c		\
	utils/khost/khost_params.c		\
	utils/khost/khost_params.h

knsupdate_SOURCES =				\
	utils/knsupdate/knsupdate_exec.c	\
	utils/knsupdate/knsupdate_exec.h	\
	utils/knsupdate/knsupdate_main.c	\
	utils/knsupdate/knsupdate_params.c	\
	utils/knsupdate/knsupdate_params.h

# static: utilities shared
libknotus_la_SOURCES =				\
	utils/common/exec.c			\
	utils/common/exec.h			\
	utils/common/hex.c			\
	utils/common/hex.h			\
	utils/common/msg.c			\
	utils/common/msg.h			\
	utils/common/netio.c			\
	utils/common/netio.h			\
	utils/common/params.c			\
	utils/common/params.h			\
	utils/common/resolv.c			\
	utils/common/resolv.h			\
413 414
	utils/common/sign.c			\
	utils/common/sign.h			\
415 416 417 418 419 420
	utils/common/strtonum.h			\
	utils/common/token.c			\
	utils/common/token.h

libknotus_la_CPPFLAGS = $(AM_CPPFLAGS) $(libidn_CFLAGS)
libknotus_la_LDFLAGS = $(AM_LDFLAGS) $(libidn_LIBS)
421
libknotus_la_LIBADD = libknot.la
422 423 424 425 426 427 428 429 430 431 432

# bin programs
kdig_LDADD       = $(libidn_LIBS) libknotus.la
khost_LDADD      = $(libidn_LIBS) libknotus.la
knsupdate_LDADD  = zscanner/libzscanner.la libknotus.la

#######################################
# Optional Knot DNS Utilities modules #
#######################################

if HAVE_DNSTAP
433 434
kdig_LDADD         += $(DNSTAP_LIBS) dnstap/libdnstap.la
khost_LDADD        += $(DNSTAP_LIBS) dnstap/libdnstap.la
435 436 437 438 439
endif # HAVE_DNSTAP

if HAVE_ROSEDB
bin_PROGRAMS += rosedb_tool
rosedb_tool_SOURCES = knot/modules/rosedb_tool.c
440
rosedb_tool_LDADD = libknotd.la
441 442 443
endif # HAVE_ROSEDB

endif # HAVE_UTILS