1
0
mirror of https://github.com/physwizz/a155-U-u1.git synced 2025-08-15 06:35:18 +00:00
Files
physwizz 99537be4e2 first
2024-03-11 06:53:12 +11:00

120 lines
4.5 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
#
# Copyright (C) 2018 MediaTek Inc.
#
ifeq ($(CONFIG_MTK_GCOV_KERNEL),y)
GCOV_PROFILE := y
endif
# Modules Feature Options
include $(srctree)/drivers/misc/mediatek/trusted_mem/Makefile.configs
# Force strictly compiler check
ccflags-y += -Werror
#==========================================================================
# Trusted Memory Subsystem Driver
#==========================================================================
# Ensure module is built only when option is enabled
obj-$(CONFIG_MTK_TRUSTED_MEMORY_SUBSYSTEM) = trusted_mem.o
trusted_mem-y += dev_mgr.o
trusted_mem-y += entry.o
trusted_mem-y += region_mgr.o
trusted_mem-y += ssmr_mgr.o
trusted_mem-y += peer_mgr.o
trusted_mem-y += proc.o
trusted_mem-y += ssheap_proc.o
trusted_mem-y += alloc_api.o
trusted_mem-y += ssmr/memory_ssmr.o
trusted_mem-y += ssheap/ssheap_lib.o
ifeq ($(TCORE_PROFILING_SUPPORT),y)
trusted_mem-y += profiler.o
ccflags-y += -DTCORE_PROFILING_SUPPORT
ifeq ($(TCORE_PROFILING_AUTO_DUMP),y)
ccflags-y += -DTCORE_PROFILING_AUTO_DUMP
endif # !TCORE_PROFILING_AUTO_DUMP
endif # !TCORE_PROFILING_SUPPORT
ifeq ($(TCORE_MEMORY_LEAK_DETECTION_SUPPORT),y)
trusted_mem-y += mld_helper.o
ccflags-y += -DTCORE_MEMORY_LEAK_DETECTION_SUPPORT
endif # !TCORE_KERN_MEMORY_LEAK_DETECTION_SUPPORT
ifeq ($(CONFIG_TEST_MTK_TRUSTED_MEMORY),m)
trusted_mem-y += tests/ut_common.o
trusted_mem-y += tests/ut_server.o
trusted_mem-y += tests/ut_cases.o
trusted_mem-y += tests/ut_ssheap.o
endif # !CONFIG_TEST_MTK_TRUSTED_MEMORY
ifneq ($(filter y m,$(CONFIG_MTK_TRUSTED_MEMORY_SUBSYSTEM)),)
#==========================================================================
# TEE Seecure Memory Devices & Trustzone Peer Driver
#==========================================================================
ifneq ($(filter y m,$(CONFIG_MTK_SECURE_MEM_SUPPORT)\
$(CONFIG_MTK_WFD_SMEM_SUPPORT)\
$(CONFIG_MTK_SDSP_SHARED_PERM_VPU_TEE)),)
trusted_mem-y += tee_devices.o
ccflags-y += -DTEE_DEVICES_SUPPORT
trusted_mem-y += tee_impl/tee_invoke.o
ifneq ($(filter y m,$(CONFIG_MICROTRUST_TEE_SUPPORT)\
$(CONFIG_TRUSTONIC_TEE_SUPPORT) $(CONFIG_TEEGRIS_TEE_SUPPORT)),)
trusted_mem-y += tee_impl/tee_ops.o
endif
endif
#==========================================================================
# MTEE Multiple Chunk Devices & Geniezone Peer Driver
#==========================================================================
ifneq ($(filter y m,$(CONFIG_MTK_PROT_MEM_SUPPORT)\
$(CONFIG_MTK_MTEE_MULTI_CHUNK_SUPPORT)\
$(CONFIG_MTK_SECURE_MEM_SUPPORT)),)
trusted_mem-y += mtee_devices.o
ccflags-y += -DMTEE_DEVICES_SUPPORT
endif
ifneq ($(filter y m,$(CONFIG_MTK_GZ_KREE)),)
trusted_mem-y += mtee_impl/mtee_ops.o
trusted_mem-y += mtee_impl/mtee_invoke.o
trusted_mem-y += mtee_impl/tmem_carveout_heap.o
endif
endif # !CONFIG_MTK_TRUSTED_MEMORY_SUBSYSTEM
#==========================================================================
# Trusted Memory Subsystem Common Headers
#==========================================================================
ccflags-y += -I$(srctree)/drivers/misc/mediatek/trusted_mem/
ccflags-y += -I$(srctree)/drivers/misc/mediatek/trusted_mem/public/
ccflags-y += -I$(srctree)/drivers/misc/mediatek/trusted_mem/ssmr
ccflags-y += -I$(srctree)/drivers/misc/mediatek/trusted_mem/ssheap
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/
#==========================================================================
# Other Modules Include Header Paths
#==========================================================================
ifneq ($(filter y m,$(CONFIG_MTK_GZ_KREE)),)
ccflags-y += -I$(srctree)/drivers/misc/mediatek/geniezone/public
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/gz/
endif # !CONFIG_MTK_GZ_KREE
ifneq ($(filter y m,$(CONFIG_TRUSTONIC_TEE_SUPPORT)),)
ccflags-y += -I$(srctree)/drivers/tee/gud/$(CONFIG_TRUSTONIC_TEE_VERSION)/MobiCoreDriver/public
ccflags-y += -I$(srctree)/drivers/tee/gud/$(CONFIG_TRUSTONIC_TEE_VERSION)/MobiCoreDriver/public/GP
endif # !CONFIG_TRUSTONIC_TEE_SUPPORT
ifneq ($(filter y m,$(CONFIG_MICROTRUST_TEE_SUPPORT)),)
ccflags-y += -I$(srctree)/drivers/tee/teei/$(CONFIG_MICROTRUST_TEE_VERSION)/common/include
endif # !CONFIG_MICROTRUST_TEE_SUPPORT
ifneq ($(filter y m,$(CONFIG_BLOWFISH_TEE_SUPPORT)),)
ccflags-y += -I$(srctree)/drivers/misc/tzdev
endif # !CONFIG_BLOWFISH_TEE_SUPPORT
ifeq ($(CONFIG_TEEGRIS_TEE_SUPPORT),y)
ccflags-y += -I$(srctree)/drivers/tee/tzdev/$(CONFIG_TEEGRIS_VERSION_STRING)/include/tzdev
ccflags-y += -I$(srctree)/drivers/misc/tzdev/include/tzdev
endif # CONFIG_TEEGRIS_TEE_SUPPORT