2015-03-20, 03:44
Here is the readme from my libretro game add-on
Building out-of-tree (recommended)
Linux
Clone the repo and create a build directory
Generate a build environment with config for debugging
If you are developing in Eclipse, you can create a "makefile project with existing code" using game.libretro/ as the existing code location. To build, enter Properties -> "C/C++ Build" and change the build command to make -C build.
It is also possible to generate Eclipse project files with cmake
Building in-tree (cross-compiling)
Kodi's build system will fetch the add-on from the GitHub URL and git hash specified in game.libretro.txt.
Linux
Ensure that kodi has been built successfully. Then, from the root of the source tree, run
Build the add-on
The compiled .so can be found at
To rebuild the add-on or compile a different one, clean the build directory
Windows
First, download and install CMake.
Run the script from PR6658 to create Visual Studio project files
The generated solution can be found at
OSX
Per README.osx, enter the tools/depends directory and make the add-on:
To rebuild the add-on or compile a different one, clean the build directory
Devs: is this correct? how do you build out-of-tree on windows? Non-devs: feel free to adapt these instructions for your own project
Building out-of-tree (recommended)
Linux
Clone the repo and create a build directory
Code:
git clone https://github.com/kodi-game/game.libretro.git
cd game.libretro
mkdir build
cd build
Generate a build environment with config for debugging
Code:
cmake -DADDONS_TO_BUILD=game.libretro \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/workspace/xbmc/addons \
$HOME/workspace/xbmc/project/cmake/addons
If you are developing in Eclipse, you can create a "makefile project with existing code" using game.libretro/ as the existing code location. To build, enter Properties -> "C/C++ Build" and change the build command to make -C build.
It is also possible to generate Eclipse project files with cmake
Code:
cmake -G"Eclipse CDT4 - Unix Makefiles" \
-D_ECLIPSE_VERSION=4.4 \
-DADDONS_TO_BUILD=game.libretro \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/workspace/xbmc/addons \
$HOME/workspace/xbmc/project/cmake/addons
Building in-tree (cross-compiling)
Kodi's build system will fetch the add-on from the GitHub URL and git hash specified in game.libretro.txt.
Linux
Ensure that kodi has been built successfully. Then, from the root of the source tree, run
Code:
make install DESTDIR=$HOME/kodi
Build the add-on
Code:
make -C tools/depends/target/binary-addons PREFIX=$HOME/kodi ADDONS="game.libretro"
The compiled .so can be found at
Code:
$HOME/kodi/lib/kodi/addons/game.libretro/game.libretro.so
To rebuild the add-on or compile a different one, clean the build directory
Code:
make -C tools/depends/target/binary-addons clean
Windows
First, download and install CMake.
Run the script from PR6658 to create Visual Studio project files
Code:
tools\windows\prepare-binary-addons-dev.bat
The generated solution can be found at
Code:
project\cmake\addons\build\kodi-addons.sln
OSX
Per README.osx, enter the tools/depends directory and make the add-on:
Code:
cd tools/depends
make -C target/binary-addons ADDONS="game.libretro"
To rebuild the add-on or compile a different one, clean the build directory
Code:
make -C target/binary-addons clean
Devs: is this correct? how do you build out-of-tree on windows? Non-devs: feel free to adapt these instructions for your own project