Skip to content

Commit 2085948

Browse files
amadionamhyung
authored andcommitted
tools/latency: Use pkg-config in lib_setup of Makefile.config
This allows to build against libtraceevent and libtracefs installed in non-standard locations. Signed-off-by: Guilherme Amadio <[email protected]> Tested-by: Thorsten Leemhuis <[email protected]> Tested-by: Leo Yan <[email protected]> Acked-by: Steven Rostedt (Google) <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent eb545a4 commit 2085948

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/tracing/latency/Makefile.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
STOP_ERROR :=
44

55
define lib_setup
6-
$(eval EXTLIBS += -l$(1))
76
$(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)"))
7+
$(eval LDFLAGS += $(shell sh -c "$(PKG_CONFIG) --libs-only-L lib$(1)"))
8+
$(eval EXTLIBS += $(shell sh -c "$(PKG_CONFIG) --libs-only-l lib$(1)"))
89
endef
910

1011
$(call feature_check,libtraceevent)

0 commit comments

Comments
 (0)