summaryrefslogtreecommitdiffstats
path: root/src/utils/Makefile.inc
blob: e1fe0e429c56f76738d0b9a22c08660b9668dd31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
bin_PROGRAMS =
sbin_PROGRAMS =

if HAVE_LIBUTILS
noinst_LTLIBRARIES += libknotus.la

libknotus_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAG_VISIBILITY) $(gnutls_CFLAGS) \
                        $(libedit_CFLAGS) $(libidn2_CFLAGS) $(libidn_CFLAGS) \
                        $(libkqueue_CFLAGS) $(libnghttp2_CFLAGS) $(libngtcp2_CFLAGS) \
                        $(lmdb_CFLAGS)
libknotus_la_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAG_EXCLUDE_LIBS)
libknotus_la_LIBADD   = $(libidn2_LIBS) $(libidn_LIBS) $(libnghttp2_LIBS) $(libngtcp2_LIBS)
libknotus_LIBS        = libknotus.la libknot.la libdnssec.la $(libcontrib_LIBS) \
                        $(gnutls_LIBS) $(libedit_LIBS)

if EMBEDDED_LIBNGTCP2
libknotus_la_LIBADD += $(libembngtcp2_LIBS)
endif EMBEDDED_LIBNGTCP2

libknotus_la_SOURCES = \
	utils/common/cert.c			\
	utils/common/cert.h			\
	utils/common/exec.c			\
	utils/common/exec.h			\
	utils/common/hex.c			\
	utils/common/hex.h			\
	utils/common/https.c			\
	utils/common/https.h			\
	utils/common/lookup.c			\
	utils/common/lookup.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/quic.c			\
	utils/common/quic.h			\
	utils/common/resolv.c			\
	utils/common/resolv.h			\
	utils/common/sign.c			\
	utils/common/sign.h			\
	utils/common/tls.c			\
	utils/common/tls.h			\
	utils/common/token.c			\
	utils/common/token.h			\
	utils/common/util_conf.c		\
	utils/common/util_conf.h
endif HAVE_LIBUTILS

if HAVE_UTILS
bin_PROGRAMS += kdig khost knsec3hash knsupdate

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

knsec3hash_SOURCES = \
	utils/knsec3hash/knsec3hash.c

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

kdig_CPPFLAGS          = $(libknotus_la_CPPFLAGS)
kdig_LDADD             = $(libknotus_LIBS)
khost_CPPFLAGS         = $(libknotus_la_CPPFLAGS)
khost_LDADD            = $(libknotus_LIBS)
knsec3hash_CPPFLAGS    = $(libknotus_la_CPPFLAGS)
knsec3hash_LDADD       = libknot.la libdnssec.la $(libcontrib_LIBS)
knsupdate_CPPFLAGS     = $(libknotus_la_CPPFLAGS)
knsupdate_LDADD        = $(libknotus_LIBS) libzscanner.la

if HAVE_DNSTAP
kdig_CPPFLAGS          += $(DNSTAP_CFLAGS)
kdig_LDADD             += $(libdnstap_LIBS)
khost_CPPFLAGS         += $(DNSTAP_CFLAGS)
khost_LDADD            += $(libdnstap_LIBS)
endif HAVE_DNSTAP

if ENABLE_XDP
sbin_PROGRAMS += kxdpgun
kxdpgun_SOURCES = \
	utils/kxdpgun/ip_route.c		\
	utils/kxdpgun/ip_route.h		\
	utils/kxdpgun/load_queries.c		\
	utils/kxdpgun/load_queries.h		\
	utils/kxdpgun/main.c

kxdpgun_CPPFLAGS  = $(libknotus_la_CPPFLAGS) $(libmnl_CFLAGS)
kxdpgun_LDADD     = libknot.la $(libcontrib_LIBS) $(libmnl_LIBS) $(pthread_LIBS)
if ENABLE_QUIC
kxdpgun_CPPFLAGS  += $(gnutls_CFLAGS)
kxdpgun_LDADD     += $(gnutls_LIBS)
endif ENABLE_QUIC
endif ENABLE_XDP
endif HAVE_UTILS

if HAVE_DAEMON
# Create storage and run-time directories
install-data-hook:
	$(INSTALL) -d $(DESTDIR)/@config_dir@
	$(INSTALL) -d $(DESTDIR)/@run_dir@
	$(INSTALL) -d $(DESTDIR)/@storage_dir@

sbin_PROGRAMS += knotc knotd

knotc_SOURCES = \
	utils/knotc/commands.c			\
	utils/knotc/commands.h			\
	utils/knotc/interactive.c		\
	utils/knotc/interactive.h		\
	utils/knotc/process.c			\
	utils/knotc/process.h			\
	utils/knotc/main.c

knotd_SOURCES = \
	utils/knotd/main.c

knotc_CPPFLAGS         = $(libknotus_la_CPPFLAGS)
knotc_LDADD            = $(libknotd_LIBS) $(libknotus_LIBS)
knotc_LDFLAGS          = $(AM_LDFLAGS) -rdynamic
knotd_CPPFLAGS         = $(libknotus_la_CPPFLAGS) $(liburcu_CFLAGS) $(systemd_CFLAGS)
knotd_LDADD            = $(malloc_LIBS) $(libknotd_LIBS) $(cap_ng_LIBS)
knotd_LDFLAGS          = $(AM_LDFLAGS) -rdynamic

if HAVE_UTILS
bin_PROGRAMS += kzonecheck kzonesign
sbin_PROGRAMS += keymgr kjournalprint kcatalogprint

kzonecheck_SOURCES = \
	utils/kzonecheck/main.c			\
	utils/kzonecheck/zone_check.c		\
	utils/kzonecheck/zone_check.h

kzonesign_SOURCES = \
	utils/kzonesign/main.c

keymgr_SOURCES = \
	utils/keymgr/bind_privkey.c		\
	utils/keymgr/bind_privkey.h		\
	utils/keymgr/functions.c		\
	utils/keymgr/functions.h		\
	utils/keymgr/offline_ksk.c		\
	utils/keymgr/offline_ksk.h		\
	utils/keymgr/main.c

kjournalprint_SOURCES = \
	utils/kjournalprint/main.c

kcatalogprint_SOURCES = \
	utils/kcatalogprint/main.c

kzonecheck_CPPFLAGS    = $(libknotus_la_CPPFLAGS)
kzonecheck_LDADD       = $(libknotd_LIBS)
kzonecheck_LDFLAGS     = $(AM_LDFLAGS) -rdynamic
kzonesign_CPPFLAGS     = $(libknotus_la_CPPFLAGS)
kzonesign_LDADD        = $(libknotd_LIBS) $(libknotus_LIBS)
kzonesign_LDFLAGS      = $(AM_LDFLAGS) -rdynamic
keymgr_CPPFLAGS        = $(libknotus_la_CPPFLAGS)
keymgr_LDADD           = $(libknotd_LIBS) $(libknotus_LIBS)
keymgr_LDFLAGS         = $(AM_LDFLAGS) -rdynamic
kjournalprint_CPPFLAGS = $(libknotus_la_CPPFLAGS)
kjournalprint_LDADD    = $(libknotd_LIBS) $(libknotus_LIBS)
kjournalprint_LDFLAGS  = $(AM_LDFLAGS) -rdynamic
kcatalogprint_CPPFLAGS = $(libknotus_la_CPPFLAGS)
kcatalogprint_LDADD    = $(libknotd_LIBS) $(libknotus_LIBS)
kcatalogprint_LDFLAGS  = $(AM_LDFLAGS) -rdynamic
endif HAVE_UTILS
endif HAVE_DAEMON