Makefile.am 14.8 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@/lib/@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
EXTRA_DIST += parsers/dhcp_parsers.cc
EXTRA_DIST += parsers/dhcp_parsers.h
36
37
EXTRA_DIST += parsers/expiration_config_parser.cc
EXTRA_DIST += parsers/expiration_config_parser.h
38
39
40
EXTRA_DIST += parsers/host_reservation_parser.cc
EXTRA_DIST += parsers/host_reservation_parser.h
EXTRA_DIST += parsers/host_reservations_list_parser.h
41
42
EXTRA_DIST += parsers/ifaces_config_parser.cc
EXTRA_DIST += parsers/ifaces_config_parser.h
43
EXTRA_DIST += parsers/option_data_parser.h
44
45
EXTRA_DIST += parsers/sanity_checks_parser.cc
EXTRA_DIST += parsers/sanity_checks_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
EXTRA_DIST += parsers/dhcp_queue_control_parser.cc
EXTRA_DIST += parsers/dhcp_queue_control_parser.h
52

53
54
55
# Devel guide diagrams
EXTRA_DIST += images/pgsql_host_data_source.svg

56
CLEANFILES = *.gcno *.gcda
57
58
# Remove CSV files created by the CSVLeaseFile6 and CSVLeaseFile4 unit tests.
CLEANFILES += *.csv
59

60
61
62
lib_LTLIBRARIES = libkea-dhcpsrv.la
libkea_dhcpsrv_la_SOURCES  =
libkea_dhcpsrv_la_SOURCES += alloc_engine.cc alloc_engine.h
63
libkea_dhcpsrv_la_SOURCES += alloc_engine_log.cc alloc_engine_log.h
64
libkea_dhcpsrv_la_SOURCES += alloc_engine_messages.h alloc_engine_messages.cc
65
libkea_dhcpsrv_la_SOURCES += base_host_data_source.h
66
libkea_dhcpsrv_la_SOURCES += cache_host_data_source.h
67
libkea_dhcpsrv_la_SOURCES += callout_handle_store.h
68
libkea_dhcpsrv_la_SOURCES += cb_ctl_dhcp.h
69
libkea_dhcpsrv_la_SOURCES += cb_ctl_dhcp4.cc cb_ctl_dhcp4.h
70
libkea_dhcpsrv_la_SOURCES += cb_ctl_dhcp6.cc cb_ctl_dhcp6.h
71
libkea_dhcpsrv_la_SOURCES += cfg_4o6.cc cfg_4o6.h
Tomek Mrugalski's avatar
Tomek Mrugalski committed
72
libkea_dhcpsrv_la_SOURCES += cfg_consistency.cc cfg_consistency.h
73
libkea_dhcpsrv_la_SOURCES += cfg_db_access.cc cfg_db_access.h
74
libkea_dhcpsrv_la_SOURCES += cfg_duid.cc cfg_duid.h
75
libkea_dhcpsrv_la_SOURCES += cfg_hosts.cc cfg_hosts.h
76
libkea_dhcpsrv_la_SOURCES += cfg_hosts_util.cc cfg_hosts_util.h
77
libkea_dhcpsrv_la_SOURCES += cfg_iface.cc cfg_iface.h
78
libkea_dhcpsrv_la_SOURCES += cfg_expiration.cc cfg_expiration.h
79
libkea_dhcpsrv_la_SOURCES += cfg_host_operations.cc cfg_host_operations.h
80
libkea_dhcpsrv_la_SOURCES += cfg_option.cc cfg_option.h
81
libkea_dhcpsrv_la_SOURCES += cfg_option_def.cc cfg_option_def.h
82
libkea_dhcpsrv_la_SOURCES += cfg_rsoo.cc cfg_rsoo.h
83
libkea_dhcpsrv_la_SOURCES += cfg_shared_networks.cc cfg_shared_networks.h
84
libkea_dhcpsrv_la_SOURCES += cfg_subnets4.cc cfg_subnets4.h
85
libkea_dhcpsrv_la_SOURCES += cfg_subnets6.cc cfg_subnets6.h
Tomek Mrugalski's avatar
Tomek Mrugalski committed
86
libkea_dhcpsrv_la_SOURCES += cfg_mac_source.cc cfg_mac_source.h
87
libkea_dhcpsrv_la_SOURCES += cfgmgr.cc cfgmgr.h
88
libkea_dhcpsrv_la_SOURCES += client_class_def.cc client_class_def.h
89
90
libkea_dhcpsrv_la_SOURCES += config_backend_dhcp4.h
libkea_dhcpsrv_la_SOURCES += config_backend_pool_dhcp4.cc config_backend_pool_dhcp4.h
91
libkea_dhcpsrv_la_SOURCES += config_backend_dhcp4_mgr.cc config_backend_dhcp4_mgr.h
92
93
94
libkea_dhcpsrv_la_SOURCES += config_backend_dhcp6.h
libkea_dhcpsrv_la_SOURCES += config_backend_pool_dhcp6.cc config_backend_pool_dhcp6.h
libkea_dhcpsrv_la_SOURCES += config_backend_dhcp6_mgr.cc config_backend_dhcp6_mgr.h
95
96
97
98
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
Francis Dupont's avatar
Francis Dupont committed
99
libkea_dhcpsrv_la_SOURCES += db_type.h
100
libkea_dhcpsrv_la_SOURCES += dhcp4o6_ipc.cc dhcp4o6_ipc.h
101
libkea_dhcpsrv_la_SOURCES += dhcpsrv_exceptions.h
102
libkea_dhcpsrv_la_SOURCES += dhcpsrv_log.cc dhcpsrv_log.h
103
libkea_dhcpsrv_la_SOURCES += dhcpsrv_messages.h dhcpsrv_messages.cc
104
libkea_dhcpsrv_la_SOURCES += host.cc host.h
105
libkea_dhcpsrv_la_SOURCES += host_container.h
106
libkea_dhcpsrv_la_SOURCES += host_data_source_factory.cc host_data_source_factory.h
107
libkea_dhcpsrv_la_SOURCES += host_mgr.cc host_mgr.h
108
libkea_dhcpsrv_la_SOURCES += hosts_log.cc hosts_log.h
109
libkea_dhcpsrv_la_SOURCES += hosts_messages.h hosts_messages.cc
110
111
libkea_dhcpsrv_la_SOURCES += key_from_key.h
libkea_dhcpsrv_la_SOURCES += lease.cc lease.h
112
libkea_dhcpsrv_la_SOURCES += lease_file_loader.h
Shawn Routhier's avatar
Shawn Routhier committed
113
libkea_dhcpsrv_la_SOURCES += lease_file_stats.h
114
115
116
libkea_dhcpsrv_la_SOURCES += lease_mgr.cc lease_mgr.h
libkea_dhcpsrv_la_SOURCES += lease_mgr_factory.cc lease_mgr_factory.h
libkea_dhcpsrv_la_SOURCES += memfile_lease_mgr.cc memfile_lease_mgr.h
117
libkea_dhcpsrv_la_SOURCES += memfile_lease_storage.h
118

119
if HAVE_MYSQL
120
libkea_dhcpsrv_la_SOURCES += mysql_lease_mgr.cc mysql_lease_mgr.h
121
libkea_dhcpsrv_la_SOURCES += mysql_host_data_source.cc mysql_host_data_source.h
122
endif
123
124

libkea_dhcpsrv_la_SOURCES += ncr_generator.cc ncr_generator.h
125
libkea_dhcpsrv_la_SOURCES += network.cc network.h
126
libkea_dhcpsrv_la_SOURCES += network_state.cc network_state.h
127

128
if HAVE_PGSQL
129
libkea_dhcpsrv_la_SOURCES += pgsql_host_data_source.cc pgsql_host_data_source.h
130
libkea_dhcpsrv_la_SOURCES += pgsql_lease_mgr.cc pgsql_lease_mgr.h
131
endif
Andrei Pavel's avatar
Andrei Pavel committed
132

Tomek Mrugalski's avatar
Tomek Mrugalski committed
133
if HAVE_CQL
Andrei Pavel's avatar
Andrei Pavel committed
134
libkea_dhcpsrv_la_SOURCES += cql_host_data_source.cc cql_host_data_source.h
Andrei Pavel's avatar
Andrei Pavel committed
135
libkea_dhcpsrv_la_SOURCES += cql_lease_mgr.cc cql_lease_mgr.h
136
endif
Andrei Pavel's avatar
Andrei Pavel committed
137

138
libkea_dhcpsrv_la_SOURCES += pool.cc pool.h
139
libkea_dhcpsrv_la_SOURCES += sanity_checker.cc sanity_checker.h
140
libkea_dhcpsrv_la_SOURCES += shared_network.cc shared_network.h
141
libkea_dhcpsrv_la_SOURCES += srv_config.cc srv_config.h
142
libkea_dhcpsrv_la_SOURCES += subnet.cc subnet.h
143
libkea_dhcpsrv_la_SOURCES += subnet_id.h
144
libkea_dhcpsrv_la_SOURCES += subnet_selector.h
145
libkea_dhcpsrv_la_SOURCES += timer_mgr.cc timer_mgr.h
146
147
libkea_dhcpsrv_la_SOURCES += triplet.h
libkea_dhcpsrv_la_SOURCES += utils.h
148
libkea_dhcpsrv_la_SOURCES += writable_host_data_source.h
149

150
# Configuration parsers
151
152
libkea_dhcpsrv_la_SOURCES += parsers/base_network_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/base_network_parser.h
153
154
libkea_dhcpsrv_la_SOURCES += parsers/client_class_def_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/client_class_def_parser.h
155
156
libkea_dhcpsrv_la_SOURCES += parsers/dhcp_parsers.cc
libkea_dhcpsrv_la_SOURCES += parsers/dhcp_parsers.h
157
158
libkea_dhcpsrv_la_SOURCES += parsers/duid_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/duid_config_parser.h
159
160
libkea_dhcpsrv_la_SOURCES += parsers/expiration_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/expiration_config_parser.h
161
162
libkea_dhcpsrv_la_SOURCES += parsers/host_reservation_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/host_reservation_parser.h
163
libkea_dhcpsrv_la_SOURCES += parsers/host_reservations_list_parser.h
164
165
libkea_dhcpsrv_la_SOURCES += parsers/ifaces_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/ifaces_config_parser.h
166
167
libkea_dhcpsrv_la_SOURCES += parsers/option_data_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/option_data_parser.h
168
169
libkea_dhcpsrv_la_SOURCES += parsers/dhcp_queue_control_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/dhcp_queue_control_parser.h
170
171
libkea_dhcpsrv_la_SOURCES += parsers/sanity_checks_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/sanity_checks_parser.h
172
173
174
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
175
176
177
178
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
179

180
libkea_dhcpsrv_la_CXXFLAGS = $(AM_CXXFLAGS)
181
libkea_dhcpsrv_la_CPPFLAGS = $(AM_CPPFLAGS)
182
183
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
184
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/process/libkea-process.la
185
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/stats/libkea-stats.la
186
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/config/libkea-cfgclient.la
187
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
188
189
190
191

if HAVE_MYSQL
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/mysql/libkea-mysql.la
endif
192
193
194
if HAVE_PGSQL
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/pgsql/libkea-pgsql.la
endif
195
196
197
if HAVE_CQL
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/cql/libkea-cql.la
endif
198

199
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/database/libkea-database.la
200
201
202
203
204
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
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/hooks/libkea-hooks.la
205
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/log/libkea-log.la
206
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/util/threads/libkea-threads.la
207
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/util/libkea-util.la
208
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
209
libkea_dhcpsrv_la_LIBADD  += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
210

Razvan Becheriu's avatar
Razvan Becheriu committed
211
libkea_dhcpsrv_la_LDFLAGS  = -no-undefined -version-info 15:0:0
212
libkea_dhcpsrv_la_LDFLAGS += $(CRYPTO_LDFLAGS)
213
if HAVE_MYSQL
214
libkea_dhcpsrv_la_LDFLAGS += $(MYSQL_LIBS)
215
endif
216
if HAVE_PGSQL
217
libkea_dhcpsrv_la_LDFLAGS += $(PGSQL_LIBS)
218
endif
Tomek Mrugalski's avatar
Tomek Mrugalski committed
219
220
if HAVE_CQL
libkea_dhcpsrv_la_LDFLAGS += $(CQL_LIBS)
221
endif
222

223
# The message file should be in the distribution
224
EXTRA_DIST += alloc_engine_messages.mes
225
EXTRA_DIST += dhcpsrv_messages.mes
226
EXTRA_DIST += hosts_messages.mes
227

228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# If we want to get rid of all generated messages files, we need to use
# make maintainer-clean. The proper way to introduce custom commands for
# that operation is to define maintainer-clean-local target. However,
# make maintainer-clean also removes Makefile, so running configure script
# is required.  To make it easy to rebuild messages without going through
# reconfigure, a new target messages-clean has been added.
maintainer-clean-local:
	rm -f alloc_engine_messages.h alloc_engine_messages.cc
	rm -f dhcpsrv_messages.h dhcpsrv_messages.cc
	rm -f hosts_messages.h hosts_messages.cc

# To regenerate messages files, one can do:
#
# make messages-clean
# make messages
#
# This is needed only when a .mes file is modified.
messages-clean: maintainer-clean-local

if GENERATE_MESSAGES

# Define rule to build logging source files from message file
messages: alloc_engine_messages.h alloc_engine_messages.cc \
	  dhcpsrv_messages.h dhcpsrv_messages.cc \
	  hosts_messages.h hosts_messages.cc
	@echo Message files regenerated

alloc_engine_messages.h alloc_engine_messages.cc: alloc_engine_messages.mes
256
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
257
258
259
260
261

dhcpsrv_messages.h dhcpsrv_messages.cc: dhcpsrv_messages.mes
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes

hosts_messages.h hosts_messages.cc: hosts_messages.mes
262
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes
263
264
265
266
267
268

else

messages: alloc_engine_messages.h alloc_engine_messages.cc \
	  dhcpsrv_messages.h dhcpsrv_messages.cc \
	  hosts_messages.h hosts_messages.cc
269
	@echo Messages generation disabled. Configure with --enable-generate-messages to enable it.
270
271
272

endif

273
274
275
# Distribute backend documentation
# Database schema creation script moved to src/bin/admin
EXTRA_DIST += database_backends.dox libdhcpsrv.dox
276

277
# Specify the headers for copying into the installation directory tree.
278
libkea_dhcpsrv_includedir = $(pkgincludedir)/dhcpsrv
279
libkea_dhcpsrv_include_HEADERS = \
280
281
	alloc_engine.h \
	alloc_engine_log.h \
282
	alloc_engine_messages.h \
283
	base_host_data_source.h \
284
	cache_host_data_source.h \
285
	callout_handle_store.h \
286
	cb_ctl_dhcp.h \
287
	cb_ctl_dhcp4.h \
288
	cb_ctl_dhcp6.h \
289
	cfg_4o6.h \
290
	cfg_consistency.h \
291
292
	cfg_db_access.h \
	cfg_duid.h \
293
294
	cfg_expiration.h \
	cfg_host_operations.h \
295
296
297
	cfg_hosts.h \
	cfg_hosts_util.h \
	cfg_iface.h \
298
	cfg_mac_source.h \
299
300
301
302
303
304
305
306
	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 \
307
	config_backend_dhcp4.h \
308
	config_backend_dhcp6.h \
309
	config_backend_dhcp4_mgr.h \
310
	config_backend_dhcp6_mgr.h \
311
	config_backend_pool_dhcp4.h \
312
	config_backend_pool_dhcp6.h \
313
314
	csv_lease_file4.h \
	csv_lease_file6.h \
315
	dhcpsrv_exceptions.h \
316
	dhcpsrv_messages.h \
317
318
	d2_client_cfg.h \
	d2_client_mgr.h \
Francis Dupont's avatar
Francis Dupont committed
319
	db_type.h \
320
	dhcp4o6_ipc.h \
321
	dhcpsrv_log.h \
322
323
324
	host.h \
	host_container.h \
	host_data_source_factory.h \
325
	hosts_messages.h \
326
327
328
329
330
331
332
333
334
335
336
337
	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 \
	memfile_lease_mgr.h \
	memfile_lease_storage.h \
	ncr_generator.h \
	network.h \
338
	network_state.h \
339
	pool.h \
340
	sanity_checker.h \
341
342
343
344
345
346
347
348
349
350
	shared_network.h \
	srv_config.h \
	subnet.h \
	subnet_id.h \
	subnet_selector.h \
	timer_mgr.h \
	triplet.h \
	utils.h \
	writable_host_data_source.h

351
352
if HAVE_CQL
libkea_dhcpsrv_include_HEADERS += \
353
	cql_host_data_source.h \
354
355
356
	cql_lease_mgr.h
endif

357
358
if HAVE_MYSQL
libkea_dhcpsrv_include_HEADERS += \
359
360
	mysql_host_data_source.h \
	mysql_lease_mgr.h
361
362
363
364
365
366
367
368
369
370
371
endif

if HAVE_PGSQL
libkea_dhcpsrv_include_HEADERS += \
	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 = \
372
	parsers/base_network_parser.h \
373
374
375
376
377
	parsers/client_class_def_parser.h \
	parsers/dhcp_parsers.h \
	parsers/duid_config_parser.h \
	parsers/expiration_config_parser.h \
	parsers/host_reservation_parser.h \
378
	parsers/host_reservations_list_parser.h \
379
380
	parsers/ifaces_config_parser.h \
	parsers/option_data_parser.h \
381
	parsers/dhcp_queue_control_parser.h \
382
	parsers/sanity_checks_parser.h \
383
384
385
386
387
	parsers/shared_network_parser.h \
	parsers/shared_networks_list_parser.h \
	parsers/simple_parser4.h \
	parsers/simple_parser6.h

388
install-data-local:
389
	$(mkinstalldirs) $(DESTDIR)$(dhcp_data_dir)