SUBDIRS = . testutils tests
dhcp_data_dir = @localstatedir@/@PACKAGE@
AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += -DDATA_DIR="\"$(dhcp_data_dir)\""

AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS  = $(KEA_CXXFLAGS)

# Define rule to build logging source files from message file
process_messages.h process_messages.cc: s-messages

s-messages: process_messages.mes
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/process/process_messages.mes
	touch $@

# Tell automake that the message files are built as part of the build process
# (so that they are built before the main library is built).
BUILT_SOURCES = process_messages.h process_messages.cc

# Ensure that the message file is included in the distribution
EXTRA_DIST = process_messages.mes libprocess.dox

# Get rid of generated message files on a clean
CLEANFILES = *.gcno *.gcda process_messages.h process_messages.cc s-messages

# Generated by configure files
DISTCLEANFILES = spec_config.h.pre

lib_LTLIBRARIES = libkea-process.la
libkea_process_la_SOURCES  = config_base.cc config_base.h
libkea_process_la_SOURCES += config_ctl_info.cc config_ctl_info.h
libkea_process_la_SOURCES += config_ctl_parser.cc config_ctl_parser.h
libkea_process_la_SOURCES += d_cfg_mgr.cc d_cfg_mgr.h
libkea_process_la_SOURCES += d_controller.cc d_controller.h
libkea_process_la_SOURCES += d_log.cc d_log.h
libkea_process_la_SOURCES += d_process.h
libkea_process_la_SOURCES += daemon.cc daemon.h
libkea_process_la_SOURCES += io_service_signal.cc io_service_signal.h
libkea_process_la_SOURCES += log_parser.cc log_parser.h
libkea_process_la_SOURCES += logging_info.cc logging_info.h

nodist_libkea_process_la_SOURCES = process_messages.cc process_messages.h

libkea_process_la_CXXFLAGS = $(AM_CXXFLAGS)
libkea_process_la_CPPFLAGS = $(AM_CPPFLAGS)
libkea_process_la_LDFLAGS  = $(AM_LDFLAGS)
libkea_process_la_LDFLAGS += -no-undefined -version-info 3:0:0

libkea_process_la_LIBADD  =
libkea_process_la_LIBADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/database/libkea-database.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/cc/libkea-cc.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
libkea_process_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
libkea_process_la_LIBADD += $(LOG4CPLUS_LIBS) $(BOOST_LIBS)

# Specify the headers for copying into the installation directory tree.
libkea_process_includedir = $(pkgincludedir)/process
libkea_process_include_HEADERS = \
	config_base.h \
	config_ctl_info.h \
	config_ctl_parser.h \
	daemon.h \
	d_cfg_mgr.h \
	d_controller.h \
	d_log.h \
	d_process.h \
	io_service_signal.h \
	logging_info.h \
	log_parser.h
