GNU Linux-libre 6.9-gnu
[releases.git] / tools / tracing / latency / Makefile.config
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 STOP_ERROR :=
4
5 define lib_setup
6   $(eval EXTLIBS += -l$(1))
7   $(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)"))
8 endef
9
10 $(call feature_check,libtraceevent)
11 ifeq ($(feature-libtraceevent), 1)
12   $(call detected,CONFIG_LIBTRACEEVENT)
13   $(call lib_setup,traceevent)
14 else
15   STOP_ERROR := 1
16   $(info libtraceevent is missing. Please install libtraceevent-dev/libtraceevent-devel)
17 endif
18
19 $(call feature_check,libtracefs)
20 ifeq ($(feature-libtracefs), 1)
21   $(call detected,CONFIG_LIBTRACEFS)
22   $(call lib_setup,tracefs)
23 else
24   STOP_ERROR := 1
25   $(info libtracefs is missing. Please install libtracefs-dev/libtracefs-devel)
26 endif
27
28 ifeq ($(STOP_ERROR),1)
29   $(error Please, check the errors above.)
30 endif