cmake_minimum_required(VERSION 3.16)



set(sources
    ${SDK_DIR}/Mcal/Mcu/src/Mcu.c
    ${SDK_DIR}/Mcal/Mcu/src/Mcu_Lld.c
    ${SDK_DIR}/Mcal/Mcu/src/Mcu_Lld_Irq.c
    ${SDK_DIR}/Mcal/Rte/src/SchM_Mcu.c
    ${SDK_DIR}/Mcal/Rte/src/SchM_Port.c
    ${SDK_DIR}/Mcal/Rte/src/SchM_Platform.c
    ${SDK_DIR}/Mcal/Det/src/Det.c
    ${SDK_DIR}/Mcal/Port/src/Port.c
    ${SDK_DIR}/Mcal/Port/src/Port_Lld.c
    ${SDK_DIR}/Mcal/Platform/src/exceptions.c
    ${SDK_DIR}/Mcal/Platform/src/IntCtrl_Lld.c
    ${SDK_DIR}/Mcal/Platform/src/OsIf.c
    ${SDK_DIR}/Mcal/Platform/src/Platform_Mld.c
    ${SDK_DIR}/Mcal/Platform/src/Platform.c
    ${SDK_DIR}/Mcal/Platform/src/System_Lld.c
    ${SDK_DIR}/Mcal/Platform/src/Mpu_Lld_M33.c
    ${SDK_DIR}/Mcal/Platform/intm/Intm_Lld.c
)
set(includes
    ${SDK_DIR}/Mcal/Mcu/inc
    ${SDK_DIR}/Mcal/Rte/inc
    ${SDK_DIR}/Mcal/Det/inc
    ${SDK_DIR}/Mcal/Port/inc
    ${SDK_DIR}/Mcal/Platform/inc
    ${SDK_DIR}/Mcal/Platform/core
    ${SDK_DIR}/Mcal/Platform/intm
    ${SDK_DIR}/Mcal/Platform/YTM32B1ME0/feature
    ${SDK_DIR}/Mcal/Platform/YTM32B1ME0/regmap
)
set(priIncludes
)

add_library(GENERATED_SDK_TARGET STATIC ${sources})

target_include_directories(GENERATED_SDK_TARGET PUBLIC ${includes})


target_include_directories(GENERATED_SDK_TARGET PRIVATE ${priIncludes})
configcore(GENERATED_SDK_TARGET ${CMAKE_SOURCE_DIR})

target_compile_definitions(GENERATED_SDK_TARGET PUBLIC
    YTM32B1ME0
    CPU_YTM32B1ME0
)
target_compile_options(GENERATED_SDK_TARGET PUBLIC
    -fdiagnostics-color=always
)



target_link_libraries(GENERATED_SDK_TARGET
    GENERATED_CONFIG_TARGET
)
