openamp/libmetal: use config OPENAMP_CACHE to control lib metal cache too

metal cache is a new config to control weather to use the cache API.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang 2024-08-09 20:29:45 +08:00 committed by Xiang Xiao
parent 8b0e5ee8bd
commit a953f14e78
2 changed files with 8 additions and 0 deletions

View File

@ -74,6 +74,10 @@ set(MACHINE ${CONFIG_ARCH})
set(CMAKE_SYSTEM_NAME NuttX)
set(WITH_DOC OFF)
if(CONFIG_OPENAMP_CACHE)
add_compile_definitions(METAL_CACHE)
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libmetal
${CMAKE_CURRENT_BINARY_DIR}/libmetal EXCLUDE_FROM_ALL)

View File

@ -56,6 +56,10 @@ CSRCS += libmetal/lib/log.c
CSRCS += libmetal/lib/shmem.c
CSRCS += libmetal/lib/version.c
ifeq ($(CONFIG_OPENAMP_CACHE),y)
CFLAGS += -DMETAL_CACHE
endif
CFLAGS += -DMETAL_INTERNAL
LIBMETAL_HDRS_SEDEXP := \