Makefile.am 3.99 KB
Newer Older
1 2 3 4 5 6 7 8 9
SUBDIRS = . tests

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

# Ensure that the message file is included in the distribution
EXTRA_DIST = http_messages.mes

10
CLEANFILES = *.gcno *.gcda
11 12

lib_LTLIBRARIES = libkea-http.la
13 14
libkea_http_la_SOURCES  = client.cc client.h
libkea_http_la_SOURCES += connection.cc connection.h
15 16
libkea_http_la_SOURCES += connection_pool.cc connection_pool.h
libkea_http_la_SOURCES += date_time.cc date_time.h
17
libkea_http_la_SOURCES += http_log.cc http_log.h
18
libkea_http_la_SOURCES += header_context.h
19
libkea_http_la_SOURCES += http_acceptor.h
20
libkea_http_la_SOURCES += http_header.cc http_header.h
21
libkea_http_la_SOURCES += http_message.cc http_message.h
22
libkea_http_la_SOURCES += http_message_parser_base.cc http_message_parser_base.h
23
libkea_http_la_SOURCES += http_messages.cc http_messages.h
24
libkea_http_la_SOURCES += http_types.h
25
libkea_http_la_SOURCES += listener.cc listener.h
26
libkea_http_la_SOURCES += listener_impl.cc listener_impl.h
27 28 29 30 31
libkea_http_la_SOURCES += post_request.cc post_request.h
libkea_http_la_SOURCES += post_request_json.cc post_request_json.h
libkea_http_la_SOURCES += request.cc request.h
libkea_http_la_SOURCES += request_context.h
libkea_http_la_SOURCES += request_parser.cc request_parser.h
32
libkea_http_la_SOURCES += response.cc response.h
33
libkea_http_la_SOURCES += response_parser.cc response_parser.h
34
libkea_http_la_SOURCES += response_context.h
35
libkea_http_la_SOURCES += response_creator.cc response_creator.h
36
libkea_http_la_SOURCES += response_creator_factory.h
37
libkea_http_la_SOURCES += response_json.cc response_json.h
38
libkea_http_la_SOURCES += url.cc url.h
39

40 41 42
libkea_http_la_CXXFLAGS = $(AM_CXXFLAGS)
libkea_http_la_CPPFLAGS = $(AM_CPPFLAGS)
libkea_http_la_LDFLAGS  = $(AM_LDFLAGS)
43
libkea_http_la_LDFLAGS += -no-undefined -version-info 7:0:0
44 45 46

libkea_http_la_LIBADD  =
libkea_http_la_LIBADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
47
libkea_http_la_LIBADD += $(top_builddir)/src/lib/cc/libkea-cc.la
Francis Dupont's avatar
Francis Dupont committed
48 49
libkea_http_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la
libkea_http_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
50 51 52
libkea_http_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
libkea_http_la_LIBADD += $(LOG4CPLUS_LIBS) $(BOOST_LIBS)

53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
# 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 http_messages.h http_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: http_messages.h http_messages.cc
	@echo Message files regenerated

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

else

messages http_messages.h http_messages.cc:
82
	@echo Messages generation disabled. Configure with --enable-generate-messages to enable it.
83 84 85

endif

86
# Specify the headers for copying into the installation directory tree.
87 88
libkea_http_includedir = $(pkgincludedir)/http
libkea_http_include_HEADERS = \
89
	client.h \
90 91 92 93 94
	connection.h \
	connection_pool.h \
	date_time.h \
	header_context.h \
	http_acceptor.h \
95
	http_header.h \
96
	http_log.h \
97 98
	http_message.h \
	http_message_parser_base.h \
99
	http_messages.h \
100 101
	http_types.h \
	listener.h \
102
	listener_impl.h \
103 104 105 106 107 108
	post_request.h \
	post_request_json.h \
	request.h \
	request_context.h \
	request_parser.h \
	response.h \
109
	response_context.h \
110 111
	response_creator.h \
	response_creator_factory.h \
112 113 114
	response_json.h \
	response_parser.h \
	url.h
115