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
|
2021-07-06 11:07:39 +08:00
|
|
|
-Wall -Werror -Wl,-EL -Wmissing-prototypes -Wimplicit-fallthrough=3
|
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
|
|
|
)
|