summaryrefslogtreecommitdiff
path: root/platform/android/DISTRIBUTE.md
blob: e7df5650f1185216d25f5d22bd87cf3942912fcf (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
# Distributing Mapbox GL Native for Android

Depending on your use case, you may want to support all or just a subset of [Android ABIs](http://developer.android.com/ndk/guides/abis.html).
This can be achieved using the different `Makefile` targets that are available.

##### Build native libraries for all supported ABIs

```sh
make apackage
```

This will build native libraries to support following ABIs:
 - armeabi
 - armeabi-v7a
 - arm64-v8a
 - x86
 - x86_64
 - mips

##### Build native libraries for a specific ABI

```sh
make android-lib-%%
```

In the command above you'll need to replace `%%` with an ABI key listed below:

| ABI Key | Android ABI |
|---------|-------------|
| arm-v5 | armeabi |
| arm-v7 | armeabi-v7a |
| arm-v8 | arm64-v8a |
| x86 | x86 |
| x86-64 | x86_64 |
| mips | mips |

For example, to build the arm64-v8a ABI the Makefile target would be:

```sh
make android-lib-arm-v8
```

It's also possible to build multiple ABI (without having to build them all) by running the Makefile multiple times.  For example to build arm64-v8a and x86_64 in the same project the commands would be:

```sh
make android-lib-arm-v8
make android-lib-arm-x86-64
```