Makefile.am 3.27 KB
Newer Older
1 2 3 4 5
SUBDIRS = . tests

AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += $(BOOST_INCLUDES)
6 7 8 9 10 11
if HAVE_MYSQL
AM_CPPFLAGS += $(MYSQL_CPPFLAGS)
endif
if HAVE_PGSQL
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
12

13
AM_CXXFLAGS = $(KEA_CXXFLAGS)
14 15 16 17
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
18 19 20 21 22

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

23
CLEANFILES  = *.gcno *.gcda spec_config.h dhcp4_messages.h dhcp4_messages.cc s-messages
24

25
man_MANS = kea-dhcp4.8
26
DISTCLEANFILES = $(man_MANS)
27
EXTRA_DIST = $(man_MANS) kea-dhcp4.xml dhcp4.spec
28
EXTRA_DIST += dhcp4.dox dhcp4_hooks.dox
29

30
if GENERATE_DOCS
31
kea-dhcp4.8: kea-dhcp4.xml
32
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
33
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
34
	$(srcdir)/kea-dhcp4.xml
35 36 37 38

else

$(man_MANS):
39
	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
40
	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild Kea > $@
41

42 43 44 45 46
endif

spec_config.h: spec_config.h.pre
	$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@

47 48 49
dhcp4_messages.h dhcp4_messages.cc: s-messages

s-messages: dhcp4_messages.mes
50
	$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes
51
	touch $@
52 53 54

BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc

Francis Dupont's avatar
Francis Dupont committed
55
# convenience archive
56

Francis Dupont's avatar
Francis Dupont committed
57 58 59 60 61 62 63
noinst_LTLIBRARIES = libdhcp4.la

libdhcp4_la_SOURCES  =
libdhcp4_la_SOURCES += ctrl_dhcp4_srv.cc ctrl_dhcp4_srv.h
libdhcp4_la_SOURCES += json_config_parser.cc json_config_parser.h
libdhcp4_la_SOURCES += dhcp4_log.cc dhcp4_log.h
libdhcp4_la_SOURCES += dhcp4_srv.cc dhcp4_srv.h
64

Francis Dupont's avatar
Francis Dupont committed
65
libdhcp4_la_SOURCES += kea_controller.cc
66

Francis Dupont's avatar
Francis Dupont committed
67
nodist_libdhcp4_la_SOURCES = dhcp4_messages.h dhcp4_messages.cc
68
EXTRA_DIST += dhcp4_messages.mes
69

Francis Dupont's avatar
Francis Dupont committed
70 71 72 73 74
sbin_PROGRAMS = kea-dhcp4

kea_dhcp4_SOURCES  = main.cc

kea_dhcp4_LDADD  = libdhcp4.la
75
kea_dhcp4_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
76
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
77 78
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
79
kea_dhcp4_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
80 81
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
82
kea_dhcp4_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
83
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
84
kea_dhcp4_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
85 86 87 88 89 90 91 92 93 94 95 96 97 98
kea_dhcp4_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
kea_dhcp4_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS)

kea_dhcp4_LDFLAGS = $(CRYPTO_LDFLAGS)
if HAVE_MYSQL
kea_dhcp4_LDFLAGS += $(MYSQL_LIBS)
endif
if HAVE_PGSQL
kea_dhcp4_LDFLAGS += $(PGSQL_LIBS)
endif
99 100 101

kea_dhcp4dir = $(pkgdatadir)
kea_dhcp4_DATA = dhcp4.spec