Skip to content

Instantly share code, notes, and snippets.

@quarnster
Created July 28, 2012 07:05
Show Gist options
  • Save quarnster/3192208 to your computer and use it in GitHub Desktop.
Save quarnster/3192208 to your computer and use it in GitHub Desktop.
Dreamcast cmake toolchain
# This has been working pretty well for me with:
# export KOS_CFLAGS="-Wa,--isa=sh4 -fomit-frame-pointer"
# export KOS_AFLAGS="--isa=sh4"
# . ${KOS_BASE}/environ_base.sh
# cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/dreamcast.cmake.cmake
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_C_COMPILER kos-cc)
set(CMAKE_CXX_COMPILER kos-c++)
set(CMAKE_ASM_COMPILER kos-as)
set(CMAKE_LINKER kos-cc)
add_definitions("-DDREAMCAST")
link_libraries(m)
set(DREAMCAST True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment