aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/README
blob: 4c48585b3030afaae1bcbd10df616cf1754c1963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Examples:

#- Darwin
#----------------------------------------------------------------------------

OSX (i386):
    ./configure --host=i386-apple-darwin

OSX (x86_64):
    ./configure --host=x86_64-apple-darwin

IOS (armv7):
    ./configure --host=arm-apple-darwin

IOS (arm64):
    ./configure --host=arm-apple-darwin --with-cpu=arm64

TVOS:
    ./configure --host=arm-apple-darwin --with-platform=tvos

  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.

#- Android (the paths are examples and have to match those of docs/READM.android)
#----------------------------------------------------------------------------

  arm:
    ./configure --with-tarballs=/opt/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=/opt/android-sdk-linux --with-ndk-path=/opt/android-ndk-r16 --with-toolchain=/opt/arm-linux-androideabi-4.9-vanilla/android-21 --prefix=/opt/xbmc-depends

  x86:
    ./configure --with-tarballs=/opt/xbmc-tarballs --host=i686-linux-android --with-sdk-path=/opt/android-sdk-linux --with-ndk-path=/opt/android-ndk-r16 --with-toolchain=/opt/x86-linux-4.9-vanilla/android-21 --prefix=/opt/xbmc-depends

#- Linux
#----------------------------------------------------------------------------

  ARM toolchain (codesourcery/lenaro/etc)
    ./configure --with-toolchain=/opt/toolchains/my-example-toolchain/  --prefix=/opt/xbmc-deps --host=arm-linux-gnueabi

  RASPBERRY-PI:
    ./configure --with-platform=raspberry-pi --host=arm-linux-gnueabihf --prefix=/opt/xbmc-deps --with-tarballs=/opt/xbmc-tarballs --with-toolchain=/opt/rbp-dev/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf --with-firmware=/opt/rbp-dev/firmware --build=i686-linux

  Native toolchain
    ./configure --with-toolchain=/usr --prefix=/opt/xbmc-deps --host=x86_64-linux-gnu

#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
Details:
  We build a native tools for platforms that do not have the native tools we need. OSX is
  the largest builder of native tools as there is not much present. No cmake, no autotools, etc.

  Cross compiling is a real pain is the rear :) Generally there are three forms,
    autotools (configure/make), cmake driven, and hand crafted makefile. In term
    of usage, 90 percent are autotools, followed by cmake and hand crafted makefiles.
    Some libs need patching, most do not. Lib versions are picked for a reason, be prepared
    for robust testing if you go bumping libs. Never commit bumps unless you have also done
    a complete distclean nuke of EVERYTHING and rebuild from scratch on ALL platforms.
    Epic fail if this is not tested.

  1) autotool driven tend to be simple PROVIDED the authors followed proper autotool format.
     Try with $(CONFIGURE) 1st, if problem, try adding $(AUTORECONF) -vif before the
     $(CONFIGURE). Some are do silly things and only a config.site can correct the errors.
     So watch for this in the config.site.in. config.site rules and this is the only way
     to handle bad autotool behavior.

  2) cmake driven tend to be simple, setup cmake flags right and go. On rare cases, you might
     need to diddle the native cmake setup.

  3) hand crafted Makefiles typically require manual sed tweaks or patching.