Makefile.am 2.74 KB
Newer Older
1
SUBDIRS = . testutils tests
2 3 4 5 6 7

AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)

AM_CXXFLAGS = $(KEA_CXXFLAGS)

8 9 10
# Ensure that the message file is included in the distribution
EXTRA_DIST = db_messages.mes

11
CLEANFILES = *.gcno *.gcda
12

13
lib_LTLIBRARIES = libkea-database.la
14 15
libkea_database_la_SOURCES  = audit_entry.cc audit_entry.h
libkea_database_la_SOURCES += backend_selector.cc backend_selector.h
16
libkea_database_la_SOURCES += database_connection.cc database_connection.h
17
libkea_database_la_SOURCES += dbaccess_parser.h dbaccess_parser.cc
18 19
libkea_database_la_SOURCES += db_exceptions.h
libkea_database_la_SOURCES += db_log.cc db_log.h
20
libkea_database_la_SOURCES += db_messages.cc db_messages.h
21
libkea_database_la_SOURCES += server_selector.h
22

23 24 25
libkea_database_la_LIBADD  = $(top_builddir)/src/lib/cc/libkea-cc.la
libkea_database_la_LIBADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
libkea_database_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la
26 27 28 29 30
libkea_database_la_LIBADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
libkea_database_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
libkea_database_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
libkea_database_la_LIBADD += $(LOG4CPLUS_LIBS) $(BOOST_LIBS)

Razvan Becheriu's avatar
Razvan Becheriu committed
31
libkea_database_la_LDFLAGS = -no-undefined -version-info 2:0:0
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
# 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 db_messages.h db_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: db_messages.h db_messages.cc
	@echo Message files regenerated

db_messages.h db_messages.cc: db_messages.mes
57
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/database/db_messages.mes
58 59 60 61

else

messages db_messages.h db_messages.cc:
62
	@echo Messages generation disabled. Configure with --enable-generate-messages to enable it.
63 64 65

endif

66
# Specify the headers for copying into the installation directory tree.
67 68
libkea_database_includedir = $(pkgincludedir)/database
libkea_database_include_HEADERS = \
69
	audit_entry.h \
70
	backend_selector.h \
71
	database_connection.h \
72
	dbaccess_parser.h \
73
	db_exceptions.h \
74
	db_log.h \
75
	db_messages.h \
76
	server_selector.h