Makefile.am 13.7 KB
Newer Older
1
2
AUTOMAKE_OPTIONS = subdir-objects

Andrei Pavel's avatar
Andrei Pavel committed
3
SUBDIRS = . testutils tests benchmarks
4

5
dhcp_data_dir = @localstatedir@/@PACKAGE@
6
kea_lfc_location = @prefix@/sbin/kea-lfc
7
8

AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib -DDHCP_DATA_DIR="\"$(dhcp_data_dir)\""
9
AM_CPPFLAGS += -DTOP_BUILDDIR="\"$(top_builddir)\""
10
11
# Set location of the kea-lfc binary.
AM_CPPFLAGS += -DKEA_LFC_EXECUTABLE="\"$(kea_lfc_location)\""
12
13
14
15
AM_CPPFLAGS += $(BOOST_INCLUDES)
if HAVE_MYSQL
AM_CPPFLAGS += $(MYSQL_CPPFLAGS)
endif
16
17
18
if HAVE_PGSQL
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
Tomek Mrugalski's avatar
Tomek Mrugalski committed
19
if HAVE_CQL
20
AM_CPPFLAGS += $(CQL_CPPFLAGS)
21
endif
22

23
24
AM_CXXFLAGS = $(KEA_CXXFLAGS)

25
26
27
28
29
30
31
# The files in the subfolder must be explicitly specified here so
# as they are copied to the distribution. The other option would
# be to specify a whole 'parsers' folder here but that would also
# copy all other files, e.g. gitignore, .git etc.
# Whenever new file is added to the parsers folder, it must be
# added here.
EXTRA_DIST =
32
33
EXTRA_DIST += parsers/client_class_def_parser.cc
EXTRA_DIST += parsers/client_class_def_parser.h
34
35
36
37
EXTRA_DIST += parsers/dbaccess_parser.cc
EXTRA_DIST += parsers/dbaccess_parser.h
EXTRA_DIST += parsers/dhcp_parsers.cc
EXTRA_DIST += parsers/dhcp_parsers.h
38
39
EXTRA_DIST += parsers/expiration_config_parser.cc
EXTRA_DIST += parsers/expiration_config_parser.h
40
41
42
EXTRA_DIST += parsers/host_reservation_parser.cc
EXTRA_DIST += parsers/host_reservation_parser.h
EXTRA_DIST += parsers/host_reservations_list_parser.h
43
44
EXTRA_DIST += parsers/ifaces_config_parser.cc
EXTRA_DIST += parsers/ifaces_config_parser.h
45
EXTRA_DIST += parsers/option_data_parser.h
46
47
48
49
EXTRA_DIST += parsers/simple_parser4.cc
EXTRA_DIST += parsers/simple_parser4.h
EXTRA_DIST += parsers/simple_parser6.cc
EXTRA_DIST += parsers/simple_parser6.h
50

51
52
53
# Devel guide diagrams
EXTRA_DIST += images/pgsql_host_data_source.svg

54
# Define rule to build logging source files from message file
55
56
alloc_engine_messages.h alloc_engine_messages.cc dhcpsrv_messages.h \
dhcpsrv_messages.cc hosts_messages.h hosts_messages.cc: s-messages
57

58
s-messages: alloc_engine_messages.mes dhcpsrv_messages.mes hosts_messages.mes
59
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes
60
	touch $@
61
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
62
	touch $@
63
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes
64
	touch $@
65

66
67
68
69
70
71
72
73
74
# Tell Automake that the {alloc_engine,dhcpsrv,hosts}_messages.{cc,h} source files
# are created in the build process, so it must create these before doing anything
# else. Although they are a dependency of the library (so will be created from the
# message file anyway), there is no guarantee as to exactly _when_ in the build
# they will be created.  As the .h file is included in other sources file (so
# must be present when they are compiled), the safest option is to create it
# first.
BUILT_SOURCES = alloc_engine_messages.h alloc_engine_messages.cc
BUILT_SOURCES += dhcpsrv_messages.h dhcpsrv_messages.cc
75
BUILT_SOURCES += hosts_messages.h hosts_messages.cc
76

77
# Make sure the generated files are deleted in a "clean" operation
78
79
80
CLEANFILES = *.gcno *.gcda
CLEANFILES += alloc_engine_messages.h alloc_engine_messages.cc
CLEANFILES += dhcpsrv_messages.h dhcpsrv_messages.cc
81
CLEANFILES += hosts_messages.h hosts_messages.cc s-messages
82
83
# Remove CSV files created by the CSVLeaseFile6 and CSVLeaseFile4 unit tests.
CLEANFILES += *.csv
84

85
86
87
88
lib_LTLIBRARIES = libkea-dhcpsrv.la
libkea_dhcpsrv_la_SOURCES  =
libkea_dhcpsrv_la_SOURCES += addr_utilities.cc addr_utilities.h
libkea_dhcpsrv_la_SOURCES += alloc_engine.cc alloc_engine.h
89
libkea_dhcpsrv_la_SOURCES += alloc_engine_log.cc alloc_engine_log.h
90
libkea_dhcpsrv_la_SOURCES += assignable_network.h
91
libkea_dhcpsrv_la_SOURCES += base_host_data_source.h
92
libkea_dhcpsrv_la_SOURCES += cache_host_data_source.h
93
libkea_dhcpsrv_la_SOURCES += callout_handle_store.h
94
libkea_dhcpsrv_la_SOURCES += cfg_4o6.cc cfg_4o6.h
95
libkea_dhcpsrv_la_SOURCES += cfg_db_access.cc cfg_db_access.h
96
libkea_dhcpsrv_la_SOURCES += cfg_duid.cc cfg_duid.h
97
libkea_dhcpsrv_la_SOURCES += cfg_hosts.cc cfg_hosts.h
98
libkea_dhcpsrv_la_SOURCES += cfg_hosts_util.cc cfg_hosts_util.h
99
libkea_dhcpsrv_la_SOURCES += cfg_iface.cc cfg_iface.h
100
libkea_dhcpsrv_la_SOURCES += cfg_expiration.cc cfg_expiration.h
101
libkea_dhcpsrv_la_SOURCES += cfg_host_operations.cc cfg_host_operations.h
102
libkea_dhcpsrv_la_SOURCES += cfg_option.cc cfg_option.h
103
libkea_dhcpsrv_la_SOURCES += cfg_option_def.cc cfg_option_def.h
104
libkea_dhcpsrv_la_SOURCES += cfg_rsoo.cc cfg_rsoo.h
105
libkea_dhcpsrv_la_SOURCES += cfg_shared_networks.cc cfg_shared_networks.h
106
libkea_dhcpsrv_la_SOURCES += cfg_subnets4.cc cfg_subnets4.h
107
libkea_dhcpsrv_la_SOURCES += cfg_subnets6.cc cfg_subnets6.h
Tomek Mrugalski's avatar
Tomek Mrugalski committed
108
libkea_dhcpsrv_la_SOURCES += cfg_mac_source.cc cfg_mac_source.h
109
libkea_dhcpsrv_la_SOURCES += cfgmgr.cc cfgmgr.h
110
libkea_dhcpsrv_la_SOURCES += client_class_def.cc client_class_def.h
111
112
113
114
libkea_dhcpsrv_la_SOURCES += csv_lease_file4.cc csv_lease_file4.h
libkea_dhcpsrv_la_SOURCES += csv_lease_file6.cc csv_lease_file6.h
libkea_dhcpsrv_la_SOURCES += d2_client_cfg.cc d2_client_cfg.h
libkea_dhcpsrv_la_SOURCES += d2_client_mgr.cc d2_client_mgr.h
115
libkea_dhcpsrv_la_SOURCES += daemon.cc daemon.h
116
libkea_dhcpsrv_la_SOURCES += database_connection.cc database_connection.h
117
libkea_dhcpsrv_la_SOURCES += db_exceptions.h
118
libkea_dhcpsrv_la_SOURCES += db_log.cc db_log.h
Francis Dupont's avatar
Francis Dupont committed
119
libkea_dhcpsrv_la_SOURCES += db_type.h
120
libkea_dhcpsrv_la_SOURCES += dhcp4o6_ipc.cc dhcp4o6_ipc.h
121
libkea_dhcpsrv_la_SOURCES += dhcpsrv_log.cc dhcpsrv_log.h
122
libkea_dhcpsrv_la_SOURCES += dhcpsrv_db_log.cc dhcpsrv_db_log.h
123
libkea_dhcpsrv_la_SOURCES += host.cc host.h
124
libkea_dhcpsrv_la_SOURCES += host_container.h
125
libkea_dhcpsrv_la_SOURCES += host_data_source_factory.cc host_data_source_factory.h
126
libkea_dhcpsrv_la_SOURCES += host_mgr.cc host_mgr.h
127
libkea_dhcpsrv_la_SOURCES += hosts_log.cc hosts_log.h
128
129
libkea_dhcpsrv_la_SOURCES += key_from_key.h
libkea_dhcpsrv_la_SOURCES += lease.cc lease.h
130
libkea_dhcpsrv_la_SOURCES += lease_file_loader.h
Shawn Routhier's avatar
Shawn Routhier committed
131
libkea_dhcpsrv_la_SOURCES += lease_file_stats.h
132
133
libkea_dhcpsrv_la_SOURCES += lease_mgr.cc lease_mgr.h
libkea_dhcpsrv_la_SOURCES += lease_mgr_factory.cc lease_mgr_factory.h
134
libkea_dhcpsrv_la_SOURCES += logging.cc logging.h
135
libkea_dhcpsrv_la_SOURCES += logging_info.cc logging_info.h
136
libkea_dhcpsrv_la_SOURCES += memfile_lease_mgr.cc memfile_lease_mgr.h
137
libkea_dhcpsrv_la_SOURCES += memfile_lease_storage.h
Andrei Pavel's avatar
Andrei Pavel committed
138
libkea_dhcpsrv_la_SOURCES += sql_common.h
139

140
if HAVE_MYSQL
141
libkea_dhcpsrv_la_SOURCES += mysql_lease_mgr.cc mysql_lease_mgr.h
142
libkea_dhcpsrv_la_SOURCES += mysql_connection.cc mysql_connection.h
143
libkea_dhcpsrv_la_SOURCES += mysql_host_data_source.cc mysql_host_data_source.h
144
endif
145
146

libkea_dhcpsrv_la_SOURCES += ncr_generator.cc ncr_generator.h
147
libkea_dhcpsrv_la_SOURCES += network.cc network.h
148
libkea_dhcpsrv_la_SOURCES += network_state.cc network_state.h
149

150
if HAVE_PGSQL
151
libkea_dhcpsrv_la_SOURCES += pgsql_connection.cc pgsql_connection.h
152
libkea_dhcpsrv_la_SOURCES += pgsql_exchange.cc pgsql_exchange.h
153
libkea_dhcpsrv_la_SOURCES += pgsql_host_data_source.cc pgsql_host_data_source.h
154
libkea_dhcpsrv_la_SOURCES += pgsql_lease_mgr.cc pgsql_lease_mgr.h
155
endif
Andrei Pavel's avatar
Andrei Pavel committed
156

Tomek Mrugalski's avatar
Tomek Mrugalski committed
157
158
if HAVE_CQL
libkea_dhcpsrv_la_SOURCES += cql_connection.cc cql_connection.h
Andrei Pavel's avatar
Andrei Pavel committed
159
libkea_dhcpsrv_la_SOURCES += cql_exchange.cc cql_exchange.h
Andrei Pavel's avatar
Andrei Pavel committed
160
libkea_dhcpsrv_la_SOURCES += cql_host_data_source.cc cql_host_data_source.h
Andrei Pavel's avatar
Andrei Pavel committed
161
libkea_dhcpsrv_la_SOURCES += cql_lease_mgr.cc cql_lease_mgr.h
162
endif
Andrei Pavel's avatar
Andrei Pavel committed
163

164
libkea_dhcpsrv_la_SOURCES += pool.cc pool.h
165
libkea_dhcpsrv_la_SOURCES += shared_network.cc shared_network.h
166
libkea_dhcpsrv_la_SOURCES += srv_config.cc srv_config.h
167
libkea_dhcpsrv_la_SOURCES += subnet.cc subnet.h
168
libkea_dhcpsrv_la_SOURCES += subnet_id.h
169
libkea_dhcpsrv_la_SOURCES += subnet_selector.h
170
libkea_dhcpsrv_la_SOURCES += timer_mgr.cc timer_mgr.h
171
172
libkea_dhcpsrv_la_SOURCES += triplet.h
libkea_dhcpsrv_la_SOURCES += utils.h
173
libkea_dhcpsrv_la_SOURCES += writable_host_data_source.h
174

175
# Configuration parsers
176
177
libkea_dhcpsrv_la_SOURCES += parsers/client_class_def_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/client_class_def_parser.h
178
179
180
181
libkea_dhcpsrv_la_SOURCES += parsers/dbaccess_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/dbaccess_parser.h
libkea_dhcpsrv_la_SOURCES += parsers/dhcp_parsers.cc
libkea_dhcpsrv_la_SOURCES += parsers/dhcp_parsers.h
182
183
libkea_dhcpsrv_la_SOURCES += parsers/duid_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/duid_config_parser.h
184
185
libkea_dhcpsrv_la_SOURCES += parsers/expiration_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/expiration_config_parser.h
186
187
libkea_dhcpsrv_la_SOURCES += parsers/host_reservation_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/host_reservation_parser.h
188
libkea_dhcpsrv_la_SOURCES += parsers/host_reservations_list_parser.h
189
190
libkea_dhcpsrv_la_SOURCES += parsers/ifaces_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/ifaces_config_parser.h
191
192
libkea_dhcpsrv_la_SOURCES += parsers/option_data_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/option_data_parser.h
193
194
195
libkea_dhcpsrv_la_SOURCES += parsers/shared_network_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/shared_network_parser.h
libkea_dhcpsrv_la_SOURCES += parsers/shared_networks_list_parser.h
196
197
198
199
libkea_dhcpsrv_la_SOURCES += parsers/simple_parser4.cc
libkea_dhcpsrv_la_SOURCES += parsers/simple_parser4.h
libkea_dhcpsrv_la_SOURCES += parsers/simple_parser6.cc
libkea_dhcpsrv_la_SOURCES += parsers/simple_parser6.h
200

201
nodist_libkea_dhcpsrv_la_SOURCES = alloc_engine_messages.h
202
203
nodist_libkea_dhcpsrv_la_SOURCES += alloc_engine_messages.cc
nodist_libkea_dhcpsrv_la_SOURCES += dhcpsrv_messages.h dhcpsrv_messages.cc
204
nodist_libkea_dhcpsrv_la_SOURCES += hosts_messages.h hosts_messages.cc
205
206

libkea_dhcpsrv_la_CXXFLAGS = $(AM_CXXFLAGS)
207
libkea_dhcpsrv_la_CPPFLAGS = $(AM_CPPFLAGS)
208
209
libkea_dhcpsrv_la_LIBADD  = $(top_builddir)/src/lib/eval/libkea-eval.la
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
210
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/stats/libkea-stats.la
211
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/config/libkea-cfgclient.la
212
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
213
214
215
216
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/cc/libkea-cc.la
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/dns/libkea-dns++.la
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
217
218
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/hooks/libkea-hooks.la
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/log/libkea-log.la
219
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/util/threads/libkea-threads.la
220
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/util/libkea-util.la
221
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
222
libkea_dhcpsrv_la_LIBADD  += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
223

224
libkea_dhcpsrv_la_LDFLAGS  = -no-undefined -version-info 11:0:0
225
libkea_dhcpsrv_la_LDFLAGS += $(CRYPTO_LDFLAGS)
226
if HAVE_MYSQL
227
libkea_dhcpsrv_la_LDFLAGS += $(MYSQL_LIBS)
228
endif
229
if HAVE_PGSQL
230
libkea_dhcpsrv_la_LDFLAGS += $(PGSQL_LIBS)
231
endif
Tomek Mrugalski's avatar
Tomek Mrugalski committed
232
233
if HAVE_CQL
libkea_dhcpsrv_la_LDFLAGS += $(CQL_LIBS)
234
endif
235

236
# The message file should be in the distribution
237
EXTRA_DIST += alloc_engine_messages.mes
238
EXTRA_DIST += dhcpsrv_messages.mes
239
EXTRA_DIST += hosts_messages.mes
240

241
242
243
# Distribute backend documentation
# Database schema creation script moved to src/bin/admin
EXTRA_DIST += database_backends.dox libdhcpsrv.dox
244

245
# Specify the headers for copying into the installation directory tree.
246
libkea_dhcpsrv_includedir = $(pkgincludedir)/dhcpsrv
247
libkea_dhcpsrv_include_HEADERS = \
248
249
250
251
252
	addr_utilities.h \
	alloc_engine.h \
	alloc_engine_log.h \
	assignable_network.h \
	base_host_data_source.h \
253
	cache_host_data_source.h \
254
255
256
257
	callout_handle_store.h \
	cfg_4o6.h \
	cfg_db_access.h \
	cfg_duid.h \
258
259
	cfg_expiration.h \
	cfg_host_operations.h \
260
261
262
	cfg_hosts.h \
	cfg_hosts_util.h \
	cfg_iface.h \
263
	cfg_mac_source.h \
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
	cfg_option.h \
	cfg_option_def.h \
	cfg_rsoo.h \
	cfg_shared_networks.h \
	cfg_subnets4.h \
	cfg_subnets6.h \
	cfgmgr.h \
	client_class_def.h \
	csv_lease_file4.h \
	csv_lease_file6.h \
	d2_client_cfg.h \
	d2_client_mgr.h \
	daemon.h \
	database_connection.h \
	db_exceptions.h \
279
	db_log.h \
Francis Dupont's avatar
Francis Dupont committed
280
	db_type.h \
281
	dhcp4o6_ipc.h \
282
	dhcpsrv_db_log.h \
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
	dhcpsrv_log.h \
	host.h \
	host_container.h \
	host_data_source_factory.h \
	host_mgr.h \
	hosts_log.h \
	key_from_key.h \
	lease.h \
	lease_file_loader.h \
	lease_file_stats.h \
	lease_mgr.h \
	lease_mgr_factory.h \
	logging.h \
	logging_info.h \
	memfile_lease_mgr.h \
	memfile_lease_storage.h \
	ncr_generator.h \
	network.h \
301
	network_state.h \
302
303
	pool.h \
	shared_network.h \
304
	sql_common.h \
305
306
307
308
309
310
311
312
313
	srv_config.h \
	subnet.h \
	subnet_id.h \
	subnet_selector.h \
	timer_mgr.h \
	triplet.h \
	utils.h \
	writable_host_data_source.h

314
315
316
if HAVE_CQL
libkea_dhcpsrv_include_HEADERS += \
	cql_connection.h \
317
318
	cql_exchange.h \
	cql_host_data_source.h \
319
320
321
	cql_lease_mgr.h
endif

322
323
324
if HAVE_MYSQL
libkea_dhcpsrv_include_HEADERS += \
	mysql_connection.h \
325
326
	mysql_host_data_source.h \
	mysql_lease_mgr.h
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
endif

if HAVE_PGSQL
libkea_dhcpsrv_include_HEADERS += \
	pgsql_connection.h \
	pgsql_exchange.h \
	pgsql_host_data_source.h \
	pgsql_lease_mgr.h
endif

# Specify parsers' headers for copying into installation directory tree.
libkea_dhcpsrv_parsers_includedir = $(pkgincludedir)/dhcpsrv/parsers
libkea_dhcpsrv_parsers_include_HEADERS = \
	parsers/client_class_def_parser.h \
	parsers/dbaccess_parser.h \
	parsers/dhcp_parsers.h \
	parsers/duid_config_parser.h \
	parsers/expiration_config_parser.h \
	parsers/host_reservation_parser.h \
346
	parsers/host_reservations_list_parser.h \
347
348
349
350
351
352
353
	parsers/ifaces_config_parser.h \
	parsers/option_data_parser.h \
	parsers/shared_network_parser.h \
	parsers/shared_networks_list_parser.h \
	parsers/simple_parser4.h \
	parsers/simple_parser6.h

354

355
install-data-local:
356
	$(mkinstalldirs) $(DESTDIR)$(dhcp_data_dir)