[PATCH 1/2] libtracefs: Use LIBTRACEFS_STATIC for utest

Benjamin Drung <[email protected]> Fri, 05 Jun 2026 14:53:21 +0000
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
The top-level Makefile already sets `LIBTRACEFS_STATIC`. To allow
overriding the static libtracefs library using just this variable, use
`LIBTRACEFS_STATIC` in the utest Makefile as well.
---
 utest/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/utest/Makefile b/utest/Makefile
index f10b709..9bd3dea 100644
--- a/utest/Makefile
+++ b/utest/Makefile
@@ -10,9 +10,11 @@ OBJS =
 OBJS += trace-utest.o
 OBJS += tracefs-utest.o
 
+LIBTRACEFS_STATIC ?= $(obj)/lib/libtracefs.a
+
 LIBS += -lcunit				\
 	-ldl				\
-	$(obj)/lib/libtracefs.a
+	$(LIBTRACEFS_STATIC)
 
 OBJS := $(OBJS:%.o=$(bdir)/%.o)
 
@@ -21,7 +23,7 @@ $(bdir):
 
 $(OBJS): | $(bdir)
 
-$(bdir)/trace-utest: $(OBJS) $(obj)/lib/libtracefs.a
+$(bdir)/trace-utest: $(OBJS) $(LIBTRACEFS_STATIC)
 	$(Q)$(do_app_build)
 
 $(bdir)/%.o: %.c
-- 
2.53.0