• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=MIPS Support
2@jd:body
3
4<div id="qv-wrapper">
5    <div id="qv">
6      <h2>On this page</h2>
7
8      <ol>
9        <li><a href="#over">Overview</a></li>
10        <li><a href="#comp">Compatibility</a></li>
11      </ol>
12    </div>
13  </div>
14
15<p>The NDK supports the {@code mips} ABI, which allows native code to run on Android-based devices
16that have CPUs supporting the MIPS32 instruction set.</p>
17
18<h2 id="over">Overview</h2>
19<p>To generate MIPS machine code, include {@code mips} in your
20<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file's
21{@code APP_ABI} definition. For example: </p>
22
23<pre class="no-pretty-print">
24APP_ABI := mips
25</pre>
26
27<p>For more information about defining the {@code APP_ABI} variable, see
28<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>.</p>
29
30<p>The build system places generated libraries into {@code $PROJECT/libs/mips/}, where
31{@code $PROJECT} represents your project's root directory, and embeds them in your APK under
32the {@code /lib/mips/} directory.</p>
33
34<p>The Android package manager extracts these libraries when installing your APK on a compatible
35MIPS-based device, placing them under your app's private data directory.</p>
36
37<p>In the Google Play store, the server filters applications so that a consumer sees only the native
38libraries that run on the CPU powering his or her device.</p>
39
40<h2 id="comp">Compatibility</h2>
41<p>MIPS support requires, at minimum, Android 2.3 (Android API level 9). If your project files
42target an older API level, but include MIPS as a targeted platform, the NDK build script
43automatically selects the right set of native platform headers/libraries for you.</p>