mirror of
https://github.com/autc04/Retro68.git
synced 2025-01-12 10:31:01 +00:00
cmake build for libretro
This commit is contained in:
parent
de0aa6610b
commit
2194af326d
@ -1,11 +1,16 @@
|
|||||||
set(CMAKE_CXX_FLAGS "-std=c++11")
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
set(CMAKE_CXX_FLAGS "-std=c++11") # -fomit-frame-pointer")
|
||||||
add_executable(Test
|
add_executable(Test
|
||||||
test.cc
|
test.cc
|
||||||
Console.cc
|
Console.cc
|
||||||
Console.h
|
Console.h
|
||||||
MacUtils.h)
|
MacUtils.h
|
||||||
|
)
|
||||||
|
#target_link_libraries(Test :retrocrt.o)
|
||||||
|
|
||||||
|
target_link_libraries(Test retrocrt)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT Test.dsk
|
OUTPUT Test.dsk
|
||||||
COMMAND ${MAKE_APPL} -c Test
|
COMMAND ${MAKE_APPL} -b -c Test
|
||||||
DEPENDS Test)
|
DEPENDS Test)
|
||||||
add_custom_target(TestAPPL ALL DEPENDS Test.dsk)
|
add_custom_target(TestAPPL ALL DEPENDS Test.dsk)
|
||||||
|
3
CMakeLists.txt
Normal file
3
CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
add_subdirectory(libretro)
|
||||||
|
add_subdirectory(App2)
|
14
libretro/CMakeLists.txt
Normal file
14
libretro/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
add_library(retrocrt_multi
|
||||||
|
start.c
|
||||||
|
malloc.c
|
||||||
|
syscalls.c
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT retrocrt.o
|
||||||
|
DEPENDS retrocrt_multi
|
||||||
|
COMMAND ${CMAKE_LINKER} -r -o retrocrt.o --whole-archive libretrocrt_multi.a
|
||||||
|
)
|
||||||
|
add_library(retrocrt retrocrt.o glue.c)
|
||||||
|
#add_custom_target(retrocrt_o ALL DEPENDS retrocrt.o)
|
||||||
|
install(TARGETS retrocrt DESTINATION lib)
|
@ -2,10 +2,12 @@ set( CMAKE_SYSTEM_NAME Retro68 )
|
|||||||
set( CMAKE_SYSTEM_VERSION 1)
|
set( CMAKE_SYSTEM_VERSION 1)
|
||||||
|
|
||||||
set( RETRO68_ROOT "" CACHE PATH "path to root of Retro68 Toolchain" )
|
set( RETRO68_ROOT "" CACHE PATH "path to root of Retro68 Toolchain" )
|
||||||
|
set( CMAKE_INSTALL_PREFIX "${RETRO68_ROOT}/m68k-unknown-elf/" CACHE PATH "installation prefix" )
|
||||||
|
|
||||||
set( MAKE_APPL "${RETRO68_ROOT}/bin/MakeAPPL" )
|
set( MAKE_APPL "${RETRO68_ROOT}/bin/MakeAPPL" )
|
||||||
|
|
||||||
set( CMAKE_C_COMPILER "${RETRO68_ROOT}/bin/m68k-unknown-elf-gcc" )
|
set( CMAKE_C_COMPILER "${RETRO68_ROOT}/bin/m68k-unknown-elf-gcc" )
|
||||||
set( CMAKE_CXX_COMPILER "${RETRO68_ROOT}/bin/m68k-unknown-elf-g++" )
|
set( CMAKE_CXX_COMPILER "${RETRO68_ROOT}/bin/m68k-unknown-elf-g++" )
|
||||||
|
|
||||||
set( CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-elf2flt -Wl,-q -l:retrocrt.o")
|
set( CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-elf2flt -Wl,-q" )
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user