2020-04-02 20:22:48 +08:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2021-09-09 05:54:20 +08:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
2020-04-02 20:22:48 +08:00
|
|
|
|
|
|
|
project(SOF_SMEX C)
|
|
|
|
|
2021-07-06 11:07:39 +08:00
|
|
|
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
|
|
message(STATUS "No CMAKE_BUILD_TYPE, defaulting to Debug")
|
|
|
|
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
|
|
|
|
endif()
|
|
|
|
|
2020-04-02 20:22:48 +08:00
|
|
|
set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..")
|
|
|
|
|
|
|
|
add_executable(smex
|
|
|
|
elf.c
|
|
|
|
ldc.c
|
|
|
|
smex.c
|
|
|
|
)
|
|
|
|
|
2021-07-06 11:07:39 +08:00
|
|
|
# In addition to the usual flags from CMAKE_BUILD_TYPE
|
2020-04-02 20:22:48 +08:00
|
|
|
target_compile_options(smex PRIVATE
|
2023-05-19 01:28:28 +08:00
|
|
|
-Wall -Werror -Wmissing-prototypes -Wimplicit-fallthrough
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_options(smex PRIVATE
|
|
|
|
-Wall -Werror -Wl,-EL
|
2020-04-02 20:22:48 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(smex PRIVATE
|
|
|
|
"${SOF_ROOT_SOURCE_DIRECTORY}/src/include"
|
2020-05-25 20:19:43 +08:00
|
|
|
"${SOF_ROOT_SOURCE_DIRECTORY}/rimage/src/include"
|
2020-04-02 20:22:48 +08:00
|
|
|
)
|
2022-08-19 21:10:56 +08:00
|
|
|
|
|
|
|
# TODO: smex should not need RTOS headers: FIX.
|
|
|
|
if (NOT CONFIG_SOF_ZEPHYR_STRICT_HEADERS)
|
|
|
|
target_include_directories(smex PRIVATE
|
|
|
|
"${SOF_ROOT_SOURCE_DIRECTORY}/xtos/include"
|
|
|
|
)
|
|
|
|
endif()
|