1 set(CMAKE_SYSTEM_NAME "Generic")
2 set(CMAKE_SYSTEM_PROCESSOR "sh2")
4 set_property(DIRECTORY PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
6 set(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR}/toolchain/inst/)
8 set(CMAKE_C_FLAGS "-m2 -ml -Os -ffreestanding -nostartfiles")
9 set(CMAKE_C_LINK_FLAGS "-Wl,-static,-EL,-x,--gc-sections")
11 set(OBJCOPY ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-objcopy)
12 set(CMAKE_C_COMPILER "${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-gcc")
13 set(CMAKE_AR ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-ar)
14 set(CMAKE_ASM_COMPILER ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-as)
15 set(CMAKE_ASM-ATT_COMPILER ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-as)
16 set(CMAKE_LINKER ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-ld)
17 set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-gcc <OBJECTS> ${CMAKE_C_FLAGS} <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> -o <TARGET>")
19 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
20 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
21 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)