Commit 2085948e authored by Guilherme Amadio's avatar Guilherme Amadio Committed by Namhyung Kim
Browse files

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: default avatarGuilherme Amadio <amadio@gentoo.org>
Tested-by: default avatarThorsten Leemhuis <linux@leemhuis.info>
Tested-by: default avatarLeo Yan <leo.yan@arm.com>
Acked-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org
Link: https://lore.kernel.org/r/20240717174739.186988-6-amadio@gentoo.org


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent eb545a42
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3,8 +3,9 @@
STOP_ERROR :=

define lib_setup
  $(eval EXTLIBS += -l$(1))
  $(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)"))
  $(eval LDFLAGS += $(shell sh -c "$(PKG_CONFIG) --libs-only-L lib$(1)"))
  $(eval EXTLIBS += $(shell sh -c "$(PKG_CONFIG) --libs-only-l lib$(1)"))
endef

$(call feature_check,libtraceevent)