1 # SPDX-License-Identifier: GPL-2.0-only 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 STOP_ERROR := 3 STOP_ERROR := 4 4 5 define lib_setup 5 define lib_setup >> 6 $(eval EXTLIBS += -l$(1)) 6 $(eval LIB_INCLUDES += $(shell sh -c "$(PKG_ 7 $(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)")) 7 $(eval LDFLAGS += $(shell sh -c "$(PKG_CONFI << 8 $(eval EXTLIBS += $(shell sh -c "$(PKG_CONFI << 9 endef 8 endef 10 9 11 $(call feature_check,libtraceevent) 10 $(call feature_check,libtraceevent) 12 ifeq ($(feature-libtraceevent), 1) 11 ifeq ($(feature-libtraceevent), 1) 13 $(call detected,CONFIG_LIBTRACEEVENT) 12 $(call detected,CONFIG_LIBTRACEEVENT) 14 $(call lib_setup,traceevent) 13 $(call lib_setup,traceevent) 15 else 14 else 16 STOP_ERROR := 1 15 STOP_ERROR := 1 17 $(info libtraceevent is missing. Please inst 16 $(info libtraceevent is missing. Please install libtraceevent-dev/libtraceevent-devel) 18 endif 17 endif 19 18 20 $(call feature_check,libtracefs) 19 $(call feature_check,libtracefs) 21 ifeq ($(feature-libtracefs), 1) 20 ifeq ($(feature-libtracefs), 1) 22 $(call detected,CONFIG_LIBTRACEFS) 21 $(call detected,CONFIG_LIBTRACEFS) 23 $(call lib_setup,tracefs) 22 $(call lib_setup,tracefs) 24 else 23 else 25 STOP_ERROR := 1 24 STOP_ERROR := 1 26 $(info libtracefs is missing. Please install 25 $(info libtracefs is missing. Please install libtracefs-dev/libtracefs-devel) 27 endif 26 endif 28 27 29 ifeq ($(STOP_ERROR),1) 28 ifeq ($(STOP_ERROR),1) 30 $(error Please, check the errors above.) 29 $(error Please, check the errors above.) 31 endif 30 endif
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.