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

3
SUBDIRS = . testutils tests
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 20
if HAVE_CQL
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 34
EXTRA_DIST += parsers/client_class_def_parser.cc
EXTRA_DIST += parsers/client_class_def_parser.h
EXTRA_DIST += parsers/dhcp_config_parser.h
35 36 37 38
EXTRA_DIST += parsers/dbaccess_parser.cc
EXTRA_DIST += parsers/dbaccess_parser.h
EXTRA_DIST += parsers/dhcp_parsers.cc
EXTRA_DIST += parsers/dhcp_parsers.h
39 40
EXTRA_DIST += parsers/expiration_config_parser.cc
EXTRA_DIST += parsers/expiration_config_parser.h
41 42 43
EXTRA_DIST += parsers/host_reservation_parser.cc
EXTRA_DIST += parsers/host_reservation_parser.h
EXTRA_DIST += parsers/host_reservations_list_parser.h
44 45
EXTRA_DIST += parsers/ifaces_config_parser.cc
EXTRA_DIST += parsers/ifaces_config_parser.h
46

47 48 49
# Devel guide diagrams
EXTRA_DIST += images/pgsql_host_data_source.svg

50
# Define rule to build logging source files from message file
51 52
alloc_engine_messages.h alloc_engine_messages.cc dhcpsrv_messages.h \
dhcpsrv_messages.cc hosts_messages.h hosts_messages.cc: s-messages
53

54
s-messages: alloc_engine_messages.mes dhcpsrv_messages.mes hosts_messages.mes
55
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes
56
	touch $@
57
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
58
	touch $@
59
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes
60
	touch $@
61

62 63 64 65 66 67 68 69 70
# 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
71
BUILT_SOURCES += hosts_messages.h hosts_messages.cc
72

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

81 82 83 84
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
85
libkea_dhcpsrv_la_SOURCES += alloc_engine_log.cc alloc_engine_log.h
86
libkea_dhcpsrv_la_SOURCES += base_host_data_source.h
87
libkea_dhcpsrv_la_SOURCES += callout_handle_store.h
88
libkea_dhcpsrv_la_SOURCES += cfg_4o6.cc cfg_4o6.h
89
libkea_dhcpsrv_la_SOURCES += cfg_db_access.cc cfg_db_access.h
90
libkea_dhcpsrv_la_SOURCES += cfg_duid.cc cfg_duid.h
91
libkea_dhcpsrv_la_SOURCES += cfg_hosts.cc cfg_hosts.h
92
libkea_dhcpsrv_la_SOURCES += cfg_hosts_util.cc cfg_hosts_util.h
93
libkea_dhcpsrv_la_SOURCES += cfg_iface.cc cfg_iface.h
94
libkea_dhcpsrv_la_SOURCES += cfg_expiration.cc cfg_expiration.h
95
libkea_dhcpsrv_la_SOURCES += cfg_host_operations.cc cfg_host_operations.h
96
libkea_dhcpsrv_la_SOURCES += cfg_option.cc cfg_option.h
97
libkea_dhcpsrv_la_SOURCES += cfg_option_def.cc cfg_option_def.h
98
libkea_dhcpsrv_la_SOURCES += cfg_rsoo.cc cfg_rsoo.h
99
libkea_dhcpsrv_la_SOURCES += cfg_subnets4.cc cfg_subnets4.h
100
libkea_dhcpsrv_la_SOURCES += cfg_subnets6.cc cfg_subnets6.h
Tomek Mrugalski's avatar
Tomek Mrugalski committed
101
libkea_dhcpsrv_la_SOURCES += cfg_mac_source.cc cfg_mac_source.h
102
libkea_dhcpsrv_la_SOURCES += cfgmgr.cc cfgmgr.h
103
libkea_dhcpsrv_la_SOURCES += client_class_def.cc client_class_def.h
104 105 106 107
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
108
libkea_dhcpsrv_la_SOURCES += daemon.cc daemon.h
109
libkea_dhcpsrv_la_SOURCES += database_connection.cc database_connection.h
110
libkea_dhcpsrv_la_SOURCES += db_exceptions.h
111
libkea_dhcpsrv_la_SOURCES += dhcp4o6_ipc.cc dhcp4o6_ipc.h
112
libkea_dhcpsrv_la_SOURCES += dhcpsrv_log.cc dhcpsrv_log.h
113
libkea_dhcpsrv_la_SOURCES += host.cc host.h
114
libkea_dhcpsrv_la_SOURCES += host_container.h
115
libkea_dhcpsrv_la_SOURCES += host_data_source_factory.cc host_data_source_factory.h
116
libkea_dhcpsrv_la_SOURCES += host_mgr.cc host_mgr.h
117
libkea_dhcpsrv_la_SOURCES += hosts_log.cc hosts_log.h
118 119
libkea_dhcpsrv_la_SOURCES += key_from_key.h
libkea_dhcpsrv_la_SOURCES += lease.cc lease.h
120
libkea_dhcpsrv_la_SOURCES += lease_file_loader.h
Shawn Routhier's avatar
Shawn Routhier committed
121
libkea_dhcpsrv_la_SOURCES += lease_file_stats.h
122 123
libkea_dhcpsrv_la_SOURCES += lease_mgr.cc lease_mgr.h
libkea_dhcpsrv_la_SOURCES += lease_mgr_factory.cc lease_mgr_factory.h
124
libkea_dhcpsrv_la_SOURCES += logging.cc logging.h
125
libkea_dhcpsrv_la_SOURCES += logging_info.cc logging_info.h
126
libkea_dhcpsrv_la_SOURCES += memfile_lease_mgr.cc memfile_lease_mgr.h
127
libkea_dhcpsrv_la_SOURCES += memfile_lease_storage.h
128

129
if HAVE_MYSQL
130
libkea_dhcpsrv_la_SOURCES += mysql_lease_mgr.cc mysql_lease_mgr.h
131
libkea_dhcpsrv_la_SOURCES += mysql_connection.cc mysql_connection.h
132
libkea_dhcpsrv_la_SOURCES += mysql_host_data_source.cc mysql_host_data_source.h
133
endif
134 135 136

libkea_dhcpsrv_la_SOURCES += ncr_generator.cc ncr_generator.h

137
if HAVE_PGSQL
138
libkea_dhcpsrv_la_SOURCES += pgsql_connection.cc pgsql_connection.h
139
libkea_dhcpsrv_la_SOURCES += pgsql_exchange.cc pgsql_exchange.h
140
libkea_dhcpsrv_la_SOURCES += pgsql_host_data_source.cc pgsql_host_data_source.h
141
libkea_dhcpsrv_la_SOURCES += pgsql_lease_mgr.cc pgsql_lease_mgr.h
142
endif
Tomek Mrugalski's avatar
Tomek Mrugalski committed
143 144 145
if HAVE_CQL
libkea_dhcpsrv_la_SOURCES += cql_lease_mgr.cc cql_lease_mgr.h
libkea_dhcpsrv_la_SOURCES += cql_connection.cc cql_connection.h
146
endif
147
libkea_dhcpsrv_la_SOURCES += pool.cc pool.h
148
libkea_dhcpsrv_la_SOURCES += srv_config.cc srv_config.h
149
libkea_dhcpsrv_la_SOURCES += subnet.cc subnet.h
150
libkea_dhcpsrv_la_SOURCES += subnet_id.h
151
libkea_dhcpsrv_la_SOURCES += subnet_selector.h
152
libkea_dhcpsrv_la_SOURCES += timer_mgr.cc timer_mgr.h
153 154
libkea_dhcpsrv_la_SOURCES += triplet.h
libkea_dhcpsrv_la_SOURCES += utils.h
155
libkea_dhcpsrv_la_SOURCES += writable_host_data_source.h
156

157
# Configuration parsers
158 159
libkea_dhcpsrv_la_SOURCES += parsers/client_class_def_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/client_class_def_parser.h
160 161 162 163 164
libkea_dhcpsrv_la_SOURCES += parsers/dhcp_config_parser.h
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
165 166
libkea_dhcpsrv_la_SOURCES += parsers/duid_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/duid_config_parser.h
167 168
libkea_dhcpsrv_la_SOURCES += parsers/expiration_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/expiration_config_parser.h
169 170
libkea_dhcpsrv_la_SOURCES += parsers/host_reservation_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/host_reservation_parser.h
171
libkea_dhcpsrv_la_SOURCES += parsers/host_reservations_list_parser.h
172 173
libkea_dhcpsrv_la_SOURCES += parsers/ifaces_config_parser.cc
libkea_dhcpsrv_la_SOURCES += parsers/ifaces_config_parser.h
174

175 176 177
nodist_libkea_dhcpsrv_la_SOURCES = alloc_engine__messages.h
nodist_libkea_dhcpsrv_la_SOURCES += alloc_engine_messages.cc
nodist_libkea_dhcpsrv_la_SOURCES += dhcpsrv_messages.h dhcpsrv_messages.cc
178
nodist_libkea_dhcpsrv_la_SOURCES += hosts_messages.h hosts_messages.cc
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/stats/libkea-stats.la
185
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/config/libkea-cfgclient.la
186
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
187 188 189 190
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
191 192
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/hooks/libkea-hooks.la
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/log/libkea-log.la
193
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/util/threads/libkea-threads.la
194
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/util/libkea-util.la
195
libkea_dhcpsrv_la_LIBADD  += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
196
libkea_dhcpsrv_la_LIBADD  += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS)
197

198
libkea_dhcpsrv_la_LDFLAGS  = -no-undefined -version-info 6:0:0
199
libkea_dhcpsrv_la_LDFLAGS += $(CRYPTO_LDFLAGS)
200
if HAVE_MYSQL
201
libkea_dhcpsrv_la_LDFLAGS += $(MYSQL_LIBS)
202
endif
203
if HAVE_PGSQL
204
libkea_dhcpsrv_la_LDFLAGS += $(PGSQL_LIBS)
205
endif
Tomek Mrugalski's avatar
Tomek Mrugalski committed
206 207
if HAVE_CQL
libkea_dhcpsrv_la_LDFLAGS += $(CQL_LIBS)
208
endif
209

210
# The message file should be in the distribution
211
EXTRA_DIST += alloc_engine_messages.mes
212
EXTRA_DIST += dhcpsrv_messages.mes
213
EXTRA_DIST += hosts_messages.mes
214

215 216 217
# Distribute backend documentation
# Database schema creation script moved to src/bin/admin
EXTRA_DIST += database_backends.dox libdhcpsrv.dox
218

219 220 221
# Specification file
EXTRA_DIST += logging.spec

222 223
# Specify the headers for copying into the installation directory tree. The
# following headers are anticipated to be useful for the user libraries.
224
libkea_dhcpsrv_includedir = $(pkgincludedir)/dhcpsrv
225 226 227 228 229 230 231 232 233 234 235
libkea_dhcpsrv_include_HEADERS = \
    cfg_option.h \
    cfg_4o6.h \
    d2_client_cfg.h \
    d2_client_mgr.h \
    key_from_key.h \
    lease.h \
    ncr_generator.h \
    pool.h \
    subnet.h \
    subnet_id.h \
236
    triplet.h
237

238
install-data-local:
239
	$(mkinstalldirs) $(DESTDIR)$(dhcp_data_dir)
240 241