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

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

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

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

27
CLEANFILES = spec_config.h dhcp6_messages.h dhcp6_messages.cc s-messages
28

29
man_MANS = kea-dhcp6.8
30
DISTCLEANFILES = $(man_MANS)
31
EXTRA_DIST = $(man_MANS) kea-dhcp6.xml dhcp6.spec
32
EXTRA_DIST += dhcp6.dox dhcp6_hooks.dox
33

34
if GENERATE_DOCS
35

36
kea-dhcp6.8: kea-dhcp6.xml
37
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
38
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
39
        $(srcdir)/kea-dhcp6.xml
40 41 42 43

else

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

47
endif
48 49 50 51

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

52 53 54
dhcp6_messages.h dhcp6_messages.cc: s-messages

s-messages: dhcp6_messages.mes
55
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes
56
	touch $@
57 58 59

BUILT_SOURCES = spec_config.h dhcp6_messages.h dhcp6_messages.cc

Francis Dupont's avatar
Francis Dupont committed
60
# convenience archive
61

Francis Dupont's avatar
Francis Dupont committed
62 63 64 65 66 67 68
noinst_LTLIBRARIES = libdhcp6.la

libdhcp6_la_SOURCES  =
libdhcp6_la_SOURCES += dhcp6_log.cc dhcp6_log.h
libdhcp6_la_SOURCES += dhcp6_srv.cc dhcp6_srv.h
libdhcp6_la_SOURCES += ctrl_dhcp6_srv.cc ctrl_dhcp6_srv.h
libdhcp6_la_SOURCES += json_config_parser.cc json_config_parser.h
69
libdhcp6_la_SOURCES += dhcp6to4_ipc.cc dhcp6to4_ipc.h
70

Francis Dupont's avatar
Francis Dupont committed
71
libdhcp6_la_SOURCES += kea_controller.cc
72

Francis Dupont's avatar
Francis Dupont committed
73
nodist_libdhcp6_la_SOURCES = dhcp6_messages.h dhcp6_messages.cc
74
EXTRA_DIST += dhcp6_messages.mes
75

Francis Dupont's avatar
Francis Dupont committed
76 77 78 79 80
sbin_PROGRAMS = kea-dhcp6

kea_dhcp6_SOURCES  = main.cc

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

99
kea_dhcp6_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS)
100 101 102 103 104 105
if HAVE_MYSQL
kea_dhcp6_LDFLAGS += $(MYSQL_LIBS)
endif
if HAVE_PGSQL
kea_dhcp6_LDFLAGS += $(PGSQL_LIBS)
endif
106 107 108
if HAVE_DSCSQL
kea_dhcp6_LDFLAGS += $(DSCSQL_LIBS)
endif
109 110 111

kea_dhcp6dir = $(pkgdatadir)
kea_dhcp6_DATA = dhcp6.spec