1
0
mirror of https://github.com/physwizz/a155-U-u1.git synced 2025-04-09 17:14:25 +00:00
Files
physwizz 99537be4e2 first
2024-03-11 06:53:12 +11:00

44 lines
1.2 KiB
Makefile

MET_ROOT_DIR := $(if $(filter /%,$(src)),,$(srctree)/)$(src)
MET_COMMON_DIR := $(wildcard $(MET_ROOT_DIR)/common)
MET_API_DIR := $(wildcard $(MET_ROOT_DIR)/met_api)
MET_BUILD_DEFAULT := n
ifeq ($(CONFIG_MODULES),y)
ifeq ($(CONFIG_FTRACE),y)
ifeq ($(CONFIG_TRACING),y)
FTRACE_READY := y
endif
endif
ifeq ($(CONFIG_MTK_MET),m)
MET_BUILD_KO := y
endif
$(info ******** Start to build met_drv ********)
ifneq (,$(filter $(CONFIG_MTK_MET),y m))
ifeq ($(FTRACE_READY),y)
ifeq ($(MET_BUILD_KO),y)
include $(MET_COMMON_DIR)/Kbuild
else
$(warning Not building met.ko due to CONFIG_MTK_MET is not set to m, build met default)
MET_BUILD_DEFAULT = y
endif
else
$(warning Not building met.ko due to CONFIG_FTRACE/CONFIG_TRACING is not set, build met default)
MET_BUILD_DEFAULT = y
endif
else
$(warning not support CONFIG_MTK_MET="$(CONFIG_MTK_MET)", build met default)
MET_BUILD_DEFAULT = y
endif
else #CONFIG_MODULES = n
$(warning Not building met.ko due to CONFIG_MODULES is not set, build met default)
MET_BUILD_DEFAULT := y
endif
ifeq ($(MET_BUILD_DEFAULT),y)
MET_DEF_DIR := $(MET_ROOT_DIR)/default
include $(MET_DEF_DIR)/Kbuild
endif