Debian Codegraph @

tools/tracing/latency/Makefile.config

raw
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 include $(srctree)/tools/scripts/utilities.mak
4
5 STOP_ERROR :=
6
7 ifndef ($(NO_LIBTRACEEVENT),1)
8 ifeq ($(call get-executable,$(PKG_CONFIG)),)
9 $(error Error: $(PKG_CONFIG) needed by libtraceevent/libtracefs is missing on this system, please install it)
10 endif
11 endif
12
13 define lib_setup
14 $(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)"))
15 $(eval LDFLAGS += $(shell sh -c "$(PKG_CONFIG) --libs-only-L lib$(1)"))
16 $(eval EXTLIBS += $(shell sh -c "$(PKG_CONFIG) --libs-only-l lib$(1)"))
17 endef
18
19 $(call feature_check,libtraceevent)
20 ifeq ($(feature-libtraceevent), 1)
21 $(call detected,CONFIG_LIBTRACEEVENT)
22 $(call lib_setup,traceevent)
23 else
24 STOP_ERROR := 1
25 $(info libtraceevent is missing. Please install libtraceevent-dev/libtraceevent-devel)
26 endif
27
28 $(call feature_check,libtracefs)
29 ifeq ($(feature-libtracefs), 1)
30 $(call detected,CONFIG_LIBTRACEFS)
31 $(call lib_setup,tracefs)
32 else
33 STOP_ERROR := 1
34 $(info libtracefs is missing. Please install libtracefs-dev/libtracefs-devel)
35 endif
36
37 ifeq ($(STOP_ERROR),1)
38 $(error Please, check the errors above.)
39 endif