Difference between revisions of "Compiling ScummVM/Android"

Jump to navigation Jump to search
Mention required version of Platform-tools
(forgot MAD)
(Mention required version of Platform-tools)
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= Compiling ScummVM for Android =
= Compiling ScummVM for Android =


This page describes how you build Android packages from the ScummVM source tree.
This page describes how you build Android packages from the ScummVM source tree.  For help compiling this on Windows, see the separate article, [[Compiling ScummVM/Android (on Windows)]].


= Mandatory tools =
= Mandatory tools =


* [http://developer.android.com/sdk/index.html Android SDK] r09 as of this writing
* [http://developer.android.com/sdk/index.html Android SDK] r09 as of this writing - note that this requires JDK 6, '''NOT''' JDK 7 (which can cause build failures)
* [http://developer.android.com/sdk/ndk/index.html Android NDK] r5b as of this writing
* [http://developer.android.com/sdk/ndk/index.html Android NDK] r5b as of this writing


Use the SDK Manager to install:
Use the SDK Manager to install:
* Android SDK Tools
* Android SDK Tools
* Android SDK Platform-tools
* Android SDK Platform-tools r06 or later
* SDK Platform Android 1.6, API 4
* SDK Platform Android 4.0, API 14
* SDK Platform Android 2.2, API 8


Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK.
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK.
Line 25: Line 24:
== Precompiled binaries ==
== Precompiled binaries ==


Get [http://static.hackmii.com/dhewg/3rd-android-4-armeabi.tar.bz2 this archive] and extract it to e.g. <tt>/opt/android</tt>.
Get [http://sourceforge.net/projects/scummvm/files/build/3rd-android-4.tar.bz2/download this archive] and extract it to e.g. <tt>/opt/android</tt>.


== Build the libraries yourself ==
== Build the libraries yourself ==
Line 42: Line 41:
  export STRIP=${PREFIX}strip
  export STRIP=${PREFIX}strip
  export OBJCOPY=${PREFIX}objcopy
  export OBJCOPY=${PREFIX}objcopy
export CPP=${PREFIX}cpp
   
   
  export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-4/arch-arm -g -mandroid -mthumb-interwork"
  export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-4/arch-arm -g -mandroid -mthumb-interwork"
Line 48: Line 48:
   
   
  export CXXFLAGS="${CFLAGS}"
  export CXXFLAGS="${CFLAGS}"
export CPPFLAGS="${CFLAGS}"
   
   
  export LDFLAGS="${MACHDEP}"
  export LDFLAGS="${MACHDEP}"
Line 103: Line 104:
= Compiling =
= Compiling =


The Android port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:
The Android port can be compiled with the <tt>configure</tt> script.
 
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK. Add the directory of the toolchain binaries from the NDK to your <tt>PATH</tt>. This directory differs, on Linux its <tt>$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin</tt>.
 
The most basic way to accomplish this is to run:


  ./configure --host=android --enable-plugins --default-dynamic
  ./configure --host=android --enable-plugins --default-dynamic
12

edits

Navigation menu