1# SPDX-License-Identifier: BSD-3-Clause 2 3cmake_minimum_required(VERSION 3.13) 4 5project(SOF_SMEX C) 6 7if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 8 message(STATUS "No CMAKE_BUILD_TYPE, defaulting to Debug") 9 set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE) 10endif() 11 12set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") 13 14add_executable(smex 15 elf.c 16 ldc.c 17 smex.c 18) 19 20# In addition to the usual flags from CMAKE_BUILD_TYPE 21target_compile_options(smex PRIVATE 22 -Wall -Werror -Wl,-EL -Wmissing-prototypes -Wimplicit-fallthrough=3 23) 24 25target_include_directories(smex PRIVATE 26 "${SOF_ROOT_SOURCE_DIRECTORY}/src/include" 27 "${SOF_ROOT_SOURCE_DIRECTORY}/rimage/src/include" 28) 29 30# TODO: smex should not need RTOS headers: FIX. 31if (NOT CONFIG_SOF_ZEPHYR_STRICT_HEADERS) 32target_include_directories(smex PRIVATE 33 "${SOF_ROOT_SOURCE_DIRECTORY}/xtos/include" 34) 35endif()