diff mbox series

[04/12] trace-cmd: Use the LIBTRACE{EVENT,FS}_LIBS for building libtracecmd.so

Message ID 20201216044213.537553785@goodmis.org (mailing list archive)
State Accepted
Commit cc0b2c8c7298f565e64c830ed1d130f26d736073
Headers show
Series trace-cmd: Updates to the Makefile | expand

Commit Message

Steven Rostedt Dec. 16, 2020, 4:41 a.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Currently the path of the libtraceevent library is hardcoded when building
libtracecmd.so, and libtracefs is not even specified. In order to use
libtracecmd.so without needing to add -ltraceevent or -ltracefs, use the
defined LIBTRACEVENT_LIBS and LIBTRACEFS_LIBS for the LIBS macro to build
libtracecmd.so.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 lib/trace-cmd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile
index 838a59ddf332..75e4fea4e3e0 100644
--- a/lib/trace-cmd/Makefile
+++ b/lib/trace-cmd/Makefile
@@ -38,7 +38,7 @@  $(DEPS): | $(bdir)
 $(LIBTRACECMD_STATIC): $(OBJS)
 	$(Q)$(call do_build_static_lib)
 
-LIBS = -L$(obj)/lib/traceevent -ltraceevent
+LIBS = $(LIBTRACEEVENT_LDLAGS) $(LIBTRACEFS_LDLAGS)
 
 $(LIBTRACECMD_SHARED_VERSION): $(LIBTRACECMD_SHARED)
 	@ln -sf $(<F) $@