Merge pull request #25820 from hribz/master
[xbmc.git] / tools / depends / README.md
blob29f555b296bc91a9f284491da627defb0b1bd6e7
1 ![Kodi Logo](../../docs/resources/banner_slim.png)
3 # Kodi's Unified Depends Build System
4 This builds native tools and library dependencies for platforms that do not provide them. It is used on our continuous integration system, **[jenkins](http://jenkins.kodi.tv/)**. A nice side effect is that it allows us to use the same tools and library versions across all platforms.
6 In terms of build system usage, largest percentage is Autotools, followed by CMake and, in rare cases, hand crafted Makefiles. Tools and libraries versions are picked for a reason. If you feel the urge to start bumping them, be prepared for robust testing. Some tools and libraries need patching, most do not.
8 That said, we try to stay fairly current with used versions and send patches upstream whenever possible.
11 * **Autotools driven tools and libraries** tend to just work **provided** the author(s) followed proper Autotools format. Execute `./bootstrap`, followed by `./configure --[...]` and you're all set. If `./configure --[...]` gives you problems, try `./autoreconf -vif` before `./configure --[...]`.
12 Some authors do silly things and only a `config.site` can correct the errors. Watch for this in the config.site(.in) file(s). It is the only way to handle bad Autotools behaviour.
14 * **CMake driven tools and libraries** also tend to just work. Setup CMake flags correctly and go. On rare cases, you might need to diddle the native CMake setup.
16 * **Hand crafted Makefiles driven tools and libraries** typically require manual sed tweaks or patching. May give you nightmares.
18 ## Usage Examples
19 Paths below are examples. If you want to build Kodi, follow our **[build guides](../../docs/README.md)**.
20 ### All platforms
21 `./bootstrap`
22 ### Darwin
23 **macOS (x86_64)**
24 `./configure --host=x86_64-apple-darwin`
26 **iOS (arm64)**
27 `./configure --host=aarch64-apple-darwin`
29 **tvOS**
30 `./configure --host=aarch64-apple-darwin --with-platform=tvos`
32 > [!NOTE]  
33 > You can target the same `--prefix=` path. Each setup will be done in an isolated directory. The last configure/make you do is the one used for Kodi/Xcode.
35 ### Android
36 **arm**
37 `./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends`
39 **aarch64**
40 `./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends`
42 **x86**
43 `./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends`
45 **x86_64**
46 `./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=x86_64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends`
48 > [!NOTE]  
49 > Android x86 and x86_64 are not maintained and are not 100% sure that everything works correctly!
51 ### Linux
52 **ARM (codesourcery/lenaro/etc)**
53 `./configure --with-toolchain=/opt/toolchains/my-example-toolchain/ --prefix=/opt/xbmc-deps --host=arm-linux-gnueabi --with-rendersystem=gles`
55 **webos (buildroot-nc4)**
56 `./configure --with-toolchain=/opt/toolchains/arm-webos-linux-gnueabi_sdk-buildroot --prefix=/opt/xbmc-deps --host=arm-webos-linux-gnueabi`
58 **Native**
59 `./configure --with-toolchain=/usr --prefix=/opt/xbmc-deps --host=x86_64-linux-gnu --with-rendersystem=gl`
61 Cross compiling is a PITA.