Commit 51f98378 authored by Jeremy C. Reed's avatar Jeremy C. Reed

[3364] use noinst_ instead of nodist_ and a libtool hack for dhcp hooks tests

Got rid of nodistdir and used noinst_ instead of nodist_
for dhcp hooks tests

Also use -rpath /nowhere as a hack to trigger libtool to not create a
convenience archive, resulting in shared modules.
parent 7f389397
......@@ -58,18 +58,20 @@ if HAVE_GTEST
# to unexpected errors. For this reason, the --enable-static-link option is
# ignored for unit tests built here.
nodistdir=$(abs_top_builddir)/src/bin/dhcp4/tests
nodist_LTLIBRARIES = libco1.la libco2.la
noinst_LTLIBRARIES = libco1.la libco2.la
# -rpath /nowhere is a hack to trigger libtool to not create a
# convenience archive, resulting in shared modules
libco1_la_SOURCES = callout_library_1.cc callout_library_common.h
libco1_la_CXXFLAGS = $(AM_CXXFLAGS)
libco1_la_CPPFLAGS = $(AM_CPPFLAGS)
libco1_la_LDFLAGS = -avoid-version -export-dynamic -module
libco1_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
libco2_la_SOURCES = callout_library_2.cc callout_library_common.h
libco2_la_CXXFLAGS = $(AM_CXXFLAGS)
libco2_la_CPPFLAGS = $(AM_CPPFLAGS)
libco2_la_LDFLAGS = -avoid-version -export-dynamic -module
libco2_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
TESTS += dhcp4_unittests
......
......@@ -54,18 +54,20 @@ if HAVE_GTEST
# to unexpected errors. For this reason, the --enable-static-link option is
# ignored for unit tests built here.
nodistdir=$(abs_top_builddir)/src/bin/dhcp6/tests
nodist_LTLIBRARIES = libco1.la libco2.la
noinst_LTLIBRARIES = libco1.la libco2.la
# -rpath /nowhere is a hack to trigger libtool to not create a
# convenience archive, resulting in shared modules
libco1_la_SOURCES = callout_library_1.cc callout_library_common.h
libco1_la_CXXFLAGS = $(AM_CXXFLAGS)
libco1_la_CPPFLAGS = $(AM_CPPFLAGS)
libco1_la_LDFLAGS = -avoid-version -export-dynamic -module
libco1_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
libco2_la_SOURCES = callout_library_2.cc callout_library_common.h
libco2_la_CXXFLAGS = $(AM_CXXFLAGS)
libco2_la_CPPFLAGS = $(AM_CPPFLAGS)
libco2_la_LDFLAGS = -avoid-version -export-dynamic -module
libco2_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
TESTS += dhcp6_unittests
dhcp6_unittests_SOURCES = dhcp6_unittests.cc
......
......@@ -31,8 +31,7 @@ EXTRA_DIST = libdhcp_user_chk.dox
#CLEANFILES = *.gcno *.gcda user_chk_messages.h user_chk_messages.cc s-messages
CLEANFILES = *.gcno *.gcda
nodistdir=$(abs_top_builddir)/src/hooks/dhcp/user_chk
nodist_LTLIBRARIES = libdhcp_user_chk.la
noinst_LTLIBRARIES = libdhcp_user_chk.la
libdhcp_user_chk_la_SOURCES =
libdhcp_user_chk_la_SOURCES += load_unload.cc
libdhcp_user_chk_la_SOURCES += pkt_receive_co.cc
......@@ -54,6 +53,9 @@ libdhcp_user_chk_la_CXXFLAGS = $(AM_CXXFLAGS)
libdhcp_user_chk_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libdhcp_user_chk_la_LDFLAGS = $(AM_LDFLAGS)
libdhcp_user_chk_la_LDFLAGS += -avoid-version -export-dynamic -module
# -rpath /nowhere is a hack to trigger libtool to not create a
# convenience archive, resulting in shared modules
libdhcp_user_chk_la_LDFLAGS += -rpath /nowhere
libdhcp_user_chk_la_LIBADD =
libdhcp_user_chk_la_LIBADD += $(top_builddir)/src/lib/hooks/libb10-hooks.la
libdhcp_user_chk_la_LIBADD += $(top_builddir)/src/lib/log/libb10-log.la
......
......@@ -33,18 +33,20 @@ if HAVE_GTEST
# to unexpected errors. For this reason, the --enable-static-link option is
# ignored for unit tests built here.
nodistdir=$(abs_top_builddir)/src/lib/dhcpsrv/tests
nodist_LTLIBRARIES = libco1.la libco2.la
noinst_LTLIBRARIES = libco1.la libco2.la
# -rpath /nowhere is a hack to trigger libtool to not create a
# convenience archive, resulting in shared modules
libco1_la_SOURCES = callout_library.cc
libco1_la_CXXFLAGS = $(AM_CXXFLAGS)
libco1_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libco1_la_LDFLAGS = -avoid-version -export-dynamic -module
libco1_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
libco2_la_SOURCES = callout_library.cc
libco2_la_CXXFLAGS = $(AM_CXXFLAGS)
libco2_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libco2_la_LDFLAGS = -avoid-version -export-dynamic -module
libco2_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
TESTS += libdhcpsrv_unittests
......
......@@ -45,40 +45,42 @@ if HAVE_GTEST
# to unexpected errors. For this reason, the --enable-static-link option is
# ignored for unit tests built here.
nodistdir=$(abs_top_builddir)/src/lib/hooks/tests
nodist_LTLIBRARIES = libnvl.la libivl.la libfxl.la libbcl.la liblcl.la \
noinst_LTLIBRARIES = libnvl.la libivl.la libfxl.la libbcl.la liblcl.la \
liblecl.la libucl.la libfcl.la
# -rpath /nowhere is a hack to trigger libtool to not create a
# convenience archive, resulting in shared modules
# No version function
libnvl_la_SOURCES = no_version_library.cc
libnvl_la_CXXFLAGS = $(AM_CXXFLAGS)
libnvl_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libnvl_la_LDFLAGS = -avoid-version -export-dynamic -module
libnvl_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
# Incorrect version function
libivl_la_SOURCES = incorrect_version_library.cc
libivl_la_CXXFLAGS = $(AM_CXXFLAGS)
libivl_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libivl_la_LDFLAGS = -avoid-version -export-dynamic -module
libivl_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
# All framework functions throw an exception
libfxl_la_SOURCES = framework_exception_library.cc
libfxl_la_CXXFLAGS = $(AM_CXXFLAGS)
libfxl_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libfxl_la_LDFLAGS = -avoid-version -export-dynamic -module
libfxl_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
# The basic callout library - contains standard callouts
libbcl_la_SOURCES = basic_callout_library.cc
libbcl_la_CXXFLAGS = $(AM_CXXFLAGS)
libbcl_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libbcl_la_LDFLAGS = -avoid-version -export-dynamic -module
libbcl_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
libbcl_la_LIBADD = $(ALL_LIBS)
# The load callout library - contains a load function
liblcl_la_SOURCES = load_callout_library.cc
liblcl_la_CXXFLAGS = $(AM_CXXFLAGS)
liblcl_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
liblcl_la_LDFLAGS = -avoid-version -export-dynamic -module
liblcl_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
liblcl_la_LIBADD = $(ALL_LIBS)
# The load error callout library - contains a load function that returns
......@@ -86,20 +88,20 @@ liblcl_la_LIBADD = $(ALL_LIBS)
liblecl_la_SOURCES = load_error_callout_library.cc
liblecl_la_CXXFLAGS = $(AM_CXXFLAGS)
liblecl_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
liblecl_la_LDFLAGS = -avoid-version -export-dynamic -module
liblecl_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
# The unload callout library - contains an unload function that
# creates a marker file.
libucl_la_SOURCES = unload_callout_library.cc
libucl_la_CXXFLAGS = $(AM_CXXFLAGS)
libucl_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libucl_la_LDFLAGS = -avoid-version -export-dynamic -module
libucl_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
# The full callout library - contains all three framework functions.
libfcl_la_SOURCES = full_callout_library.cc
libfcl_la_CXXFLAGS = $(AM_CXXFLAGS)
libfcl_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
libfcl_la_LDFLAGS = -avoid-version -export-dynamic -module
libfcl_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
libfcl_la_LIBADD = $(ALL_LIBS)
TESTS += run_unittests
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment