Makefile.am 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. SUBDIRS = . tests
  2. AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
  3. AM_CPPFLAGS += $(BOOST_INCLUDES)
  4. if HAVE_MYSQL
  5. AM_CPPFLAGS += $(MYSQL_CPPFLAGS)
  6. endif
  7. AM_CXXFLAGS = $(B10_CXXFLAGS)
  8. # Define rule to build logging source files from message file
  9. dhcpsrv_messages.h dhcpsrv_messages.cc: dhcpsrv_messages.mes
  10. $(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
  11. # Tell Automake that the dhcpsrv_messages.{cc,h} source files are created in the
  12. # build process, so it must create these before doing anything else. Although
  13. # they are a dependency of the library (so will be created from the message file
  14. # anyway), there is no guarantee as to exactly _when_ in the build they will be
  15. # created. As the .h file is included in other sources file (so must be
  16. # present when they are compiled), the safest option is to create it first.
  17. BUILT_SOURCES = dhcpsrv_messages.h dhcpsrv_messages.cc
  18. # Some versions of GCC warn about some versions of Boost regarding
  19. # missing initializer for members in its posix_time.
  20. # https://svn.boost.org/trac/boost/ticket/3477
  21. # But older GCC compilers don't have the flag.
  22. AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
  23. # Make sure the generated files are deleted in a "clean" operation
  24. CLEANFILES = *.gcno *.gcda dhcpsrv_messages.h dhcpsrv_messages.cc
  25. lib_LTLIBRARIES = libb10-dhcpsrv.la
  26. libb10_dhcpsrv_la_SOURCES =
  27. libb10_dhcpsrv_la_SOURCES += addr_utilities.cc addr_utilities.h
  28. libb10_dhcpsrv_la_SOURCES += alloc_engine.cc alloc_engine.h
  29. libb10_dhcpsrv_la_SOURCES += dhcpsrv_log.cc dhcpsrv_log.h
  30. libb10_dhcpsrv_la_SOURCES += cfgmgr.cc cfgmgr.h
  31. libb10_dhcpsrv_la_SOURCES += dhcp_config_parser.h
  32. libb10_dhcpsrv_la_SOURCES += hwaddr.cc hwaddr.h
  33. libb10_dhcpsrv_la_SOURCES += lease_mgr.cc lease_mgr.h
  34. libb10_dhcpsrv_la_SOURCES += lease_mgr_factory.cc lease_mgr_factory.h
  35. libb10_dhcpsrv_la_SOURCES += memfile_lease_mgr.cc memfile_lease_mgr.h
  36. if HAVE_MYSQL
  37. libb10_dhcpsrv_la_SOURCES += mysql_lease_mgr.cc mysql_lease_mgr.h
  38. endif
  39. libb10_dhcpsrv_la_SOURCES += option_space.cc option_space.h
  40. libb10_dhcpsrv_la_SOURCES += pool.cc pool.h
  41. libb10_dhcpsrv_la_SOURCES += subnet.cc subnet.h
  42. libb10_dhcpsrv_la_SOURCES += triplet.h
  43. nodist_libb10_dhcpsrv_la_SOURCES = dhcpsrv_messages.h dhcpsrv_messages.cc
  44. libb10_dhcpsrv_la_CXXFLAGS = $(AM_CXXFLAGS)
  45. libb10_dhcpsrv_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
  46. libb10_dhcpsrv_la_LIBADD = $(top_builddir)/src/lib/asiolink/libb10-asiolink.la
  47. libb10_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la
  48. libb10_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/util/libb10-util.la
  49. libb10_dhcpsrv_la_LDFLAGS = -no-undefined -version-info 3:0:0
  50. if HAVE_MYSQL
  51. libb10_dhcpsrv_la_LDFLAGS += $(MYSQL_LIBS)
  52. endif
  53. if USE_CLANGPP
  54. # Disable unused parameter warning caused by some of the
  55. # Boost headers when compiling with clang.
  56. libb10_dhcpsrv_la_CXXFLAGS += -Wno-unused-parameter
  57. endif
  58. # The message file should be in the distribution
  59. EXTRA_DIST = dhcpsrv_messages.mes
  60. # Distribute MySQL schema creation script and backend documentation
  61. EXTRA_DIST += dhcpdb_create.mysql database_backends.dox libdhcpsrv.dox
  62. dist_pkgdata_DATA = dhcpdb_create.mysql