tests: Add Makefile to build debug-info test artifacts
[babeltrace.git] / cli / Makefile.am
index f2a180d67f8df4c86db40074738a54d75b43fcf8..ed309d026b2edbae589c175fcbfbc902c8b3278e 100644 (file)
@@ -34,7 +34,7 @@ babeltrace_bin_SOURCES = \
 babeltrace_bin_LDFLAGS = $(LD_NO_AS_NEEDED)
 
 # Add all the convenience libraries used by Babeltrace plugins and the
-# library. They will be used when embedding plugins (BUILT_IN_PLUGINS),
+# library. They will be used when embedding plugins (--enable-built-in-plugins),
 # otherwise we're looking after multiple definitions of the same symbols if
 # a plugin's archive (.a) includes the convenience library because
 # we're using --whole-archive below (needed to make sure the linker does
@@ -45,10 +45,9 @@ babeltrace_bin_LDADD = \
        $(top_builddir)/compat/libcompat.la \
        $(top_builddir)/common/libbabeltrace-common.la \
        $(top_builddir)/logging/libbabeltrace-logging.la \
-       $(top_builddir)/plugins/libctfcopytrace/libctfcopytrace.la \
        $(POPT_LIBS)
 
-if BUILT_IN_PLUGINS
+if ENABLE_BUILT_IN_PLUGINS
 # Takes a plugin name and outputs the needed LDFLAGS to embed it.
 #
 # The --whole-archive option is important here. From the GNU linker's
@@ -63,7 +62,7 @@ if BUILT_IN_PLUGINS
 # binary that are filled by plugin objects. If the linker discards those
 # symbols because the CLI does not use them directly, the CLI reports
 # no plugins found (plugins are effectively not embedded).
-pluginarchive = -Wl,--whole-archive,$(PLUGINS_PATH)/$(1)/.libs/babeltrace-plugin-$(1).a,--no-whole-archive
+pluginarchive = $(LD_WHOLE_ARCHIVE)$(PLUGINS_PATH)/$(1)/.libs/babeltrace-plugin-$(1).a$(LD_NO_WHOLE_ARCHIVE)
 
 # Built-in plugins
 babeltrace_bin_LDFLAGS += $(call pluginarchive,ctf)
@@ -72,6 +71,7 @@ babeltrace_bin_LDFLAGS += $(call pluginarchive,utils)
 
 if ENABLE_DEBUG_INFO
 babeltrace_bin_LDFLAGS += $(call pluginarchive,lttng-utils)
+babeltrace_bin_LDADD += $(ELFUTILS_LIBS)
 endif
 endif
 
@@ -89,6 +89,8 @@ babeltrace_CFLAGS =   $(AM_CFLAGS) -DBT_SET_DEFAULT_IN_TREE_CONFIGURATION
 babeltrace_log_bin_SOURCES = babeltrace-log.c
 babeltrace_log_bin_LDADD = \
        $(top_builddir)/compat/libcompat.la \
+       $(top_builddir)/common/libbabeltrace-common.la \
+       $(top_builddir)/logging/libbabeltrace-logging.la \
        $(POPT_LIBS)
 babeltrace_log_bin_CFLAGS = $(AM_CFLAGS) '-DBT_CLI_PATH="$(abs_top_builddir)/cli/babeltrace$(EXEEXT)"'
 
This page took 0.023806 seconds and 4 git commands to generate.