blob: 2d17b4786439e4f1e9ef013af5e9d182e4dc26de [file] [edit]
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
#
# (C) COPYRIGHT 2017-2025 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
# Foundation, and any use by you of this program is subject to the terms
# of such GNU license.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you can access it online at
# http://www.gnu.org/licenses/gpl-2.0.html.
#
#
# make $(src) as absolute path if it is not already, by prefixing $(srctree) or $(srcroot)
# depending on Kernel Version (use srctree for < 6.13). This is to prevent any build issue
# due to wrong path.
ifeq ($(shell expr $(VERSION) \>= 6), 1)
ifeq ($(VERSION), 6)
ifeq ($(shell expr $(PATCHLEVEL) \< 13), 1)
src:=$(if $(patsubst /%,,$(src)),$(srctree)/$(src),$(src))
else
src:=$(if $(patsubst /%,,$(src)),$(realpath $(srcroot))/$(src),$(src))
endif
else
src:=$(if $(patsubst /%,,$(src)),$(realpath $(srcroot))/$(src),$(src))
endif
else
src:=$(if $(patsubst /%,,$(src)),$(srctree)/$(src),$(src))
endif
ccflags-y += -I$(src)/include \
-I$(src)
subdir-ccflags-y += -I$(src)/include \
-I$(src)
obj-$(CONFIG_MALI_KUTF) += kutf/
obj-$(CONFIG_MALI_KUTF_IRQ_TEST) += mali_kutf_irq_test/
obj-$(CONFIG_MALI_KUTF_CLK_RATE_TRACE) += mali_kutf_clk_rate_trace/kernel/
obj-$(CONFIG_MALI_KUTF_MGM_INTEGRATION) += mali_kutf_mgm_integration_test/