diff --git a/cmake/ctr.cmake b/cmake/ctr.cmake new file mode 100644 index 00000000..c0dc12bd --- /dev/null +++ b/cmake/ctr.cmake @@ -0,0 +1,15 @@ +set(CMAKE_C_COMPILER "$ENV{DEVKITARM}/bin/arm-none-eabi-gcc") +set(CMAKE_CXX_COMPILER "$ENV{DEVKITARM}/bin/arm-none-eabi-g++") +set(CMAKE_AR "$ENV{DEVKITARM}/bin/arm-none-eabi-gcc-ar") +set(CMAKE_RANLIB "$ENV{DEVKITARM}/bin/arm-none-eabi-gcc-ranlib") +set(CMAKE_SYSTEM_PROCESSOR armv6k) +set(CMAKE_SYSTEM_NAME Generic) +set(CMAKE_CROSSCOMPILING ON) +set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-fPIC") +set(CMAKE_C_LINK_FLAGS "-fPIC") +set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) +set(CMAKE_CXX_FLAGS " -march=armv6k -mtune=mpcore -mfloat-abi=hard -I$ENV{DEVKITPRO}/libctru/include") +set(CMAKE_C_FLAGS " -march=armv6k -mtune=mpcore -mfloat-abi=hard -I$ENV{DEVKITPRO}/libctru/include") + +add_definitions(-DARM11 -D_3DS) +set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "Shared libs not available" ) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 2d909ca2..d486af07 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -384,6 +384,7 @@ build_libretro_generic_makefile() { android ) EXTRAARGS="-DANDROID_PLATFORM=android-${API_LEVEL} \ -DANDROID_ABI=${ABI_OVERRIDE} \ -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake" ;; + 3ds|ctr ) EXTRAARGS="-DCMAKE_TOOLCHAIN_FILE=${WORK}/cmake/ctr.cmake" ;; * ) EXTRAARGS="" ;; esac diff --git a/recipes/nintendo/3ds b/recipes/nintendo/3ds index 0668cbfd..7d728f3c 100644 --- a/recipes/nintendo/3ds +++ b/recipes/nintendo/3ds @@ -62,7 +62,7 @@ stella libretro-stella https://github.com/stella-emu/stella.git master NO GENERI test libretro-samples https://github.com/libretro/libretro-samples.git master YES GENERIC Makefile tests/test theodore libretro-theodore https://github.com/Zlika/theodore.git master YES GENERIC Makefile . tgbdual libretro-tgbdual https://github.com/libretro/tgbdual-libretro.git master NO GENERIC Makefile . -tic80 libretro-tic80 https://github.com/nesbox/TIC-80.git master YES CMAKE Makefile builddir -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_DEMO_CARTS=OFF -DBUILD_LIBRETRO=ON -DCMAKE_C_COMPILER=${DEVKITARM}/bin/arm-none-eabi-gcc -DCMAKE_CXX_COMPILER=${DEVKITARM}/bin/arm-none-eabi-g++ -DCMAKE_SYSTEM_PROCESSOR=arm -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_CROSSCOMPILING=TRUE -DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS=-fPIC -DCMAKE_C_LINK_FLAGS=-fPIC -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY -DDISABLE_NETWORKING=TRUE -DLIBRETRO_STATIC=TRUE -DLIBRETRO_SUFFIX=_ctr -DCMAKE_CXX_FLAGS=" -march=armv6k -mtune=mpcore -mfloat-abi=hard" -DCMAKE_C_FLAGS=" -march=armv6k -mtune=mpcore -mfloat-abi=hard" +tic80 libretro-tic80 https://github.com/nesbox/TIC-80.git master YES CMAKE Makefile builddir -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_DEMO_CARTS=OFF -DBUILD_LIBRETRO=ON -DDISABLE_NETWORKING=ON -DLIBRETRO_STATIC=ON -DLIBRETRO_SUFFIX=_ctr tyrquake libretro-tyrquake https://github.com/libretro/tyrquake.git master YES GENERIC Makefile . vice_x128 libretro-vice_x128 https://github.com/libretro/vice-libretro.git master YES GENERIC Makefile . EMUTYPE=x128 vice_x64 libretro-vice_x64 https://github.com/libretro/vice-libretro.git master YES GENERIC Makefile .