mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 16:43:58 +00:00
Android specific documentation update.
This commit is contained in:
parent
117ddabd02
commit
fcd519ba66
@ -1,9 +1,11 @@
|
|||||||
# Android Build
|
# Android Build
|
||||||
|
|
||||||
## Prerequisites
|
## Preamble
|
||||||
|
|
||||||
The last known NDK is automatically downloaded, if not specified otherwise.
|
The last known NDK is automatically downloaded, if not specified otherwise.
|
||||||
|
|
||||||
|
As indicated in the main [README](../../README.md#supported-platforms-with-primary-CI), Android support is still DRAFT.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Basics
|
### Basics
|
||||||
@ -21,8 +23,7 @@ Provided build scripts can mainly be used like
|
|||||||
|
|
||||||
### Android NDK
|
### Android NDK
|
||||||
|
|
||||||
LIBZMQ is tested against Android NDK version r25, but should
|
LIBZMQ is tested against Android NDK versions r19 to r25.
|
||||||
support older ones too.
|
|
||||||
|
|
||||||
By default, LIBZMQ uses NDK `android-ndk-r25`, but you can specify
|
By default, LIBZMQ uses NDK `android-ndk-r25`, but you can specify
|
||||||
a different one:
|
a different one:
|
||||||
@ -63,22 +64,32 @@ where <arch> is one of `arm`, `arm64`, `x86` or `x86_64`.
|
|||||||
|
|
||||||
### Android build cleanup
|
### Android build cleanup
|
||||||
|
|
||||||
You can build your own Android libraries, and place them under
|
Build and Dependency storage folders are automatically cleaned,
|
||||||
${ANDROID_BUILD_DIR}/prefix/<arch>/lib, but then, you'll need to
|
by ci_build.sh. This can be avoided with the help of
|
||||||
indicate the build scripts to not clean this folder, with the
|
|
||||||
help of ANDROID_BUILD_CLEAN
|
|
||||||
|
|
||||||
ANDROID_BUILD_CLEAN=no
|
ANDROID_BUILD_DIR="no"
|
||||||
|
|
||||||
|
If you turn this to "no", make sure to clean what has to be, before
|
||||||
|
calling `build.sh` or `ci_build.sh`.
|
||||||
|
|
||||||
|
### Prebuilt Android libraries
|
||||||
|
|
||||||
|
Android prebuilt libraries have to be stored under
|
||||||
|
|
||||||
|
ANDROID_BUILD_DIR/prefix/<arch>/lib
|
||||||
|
|
||||||
|
Do not forget to disable [Android cleanup](#android-build-cleanup).
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
By default, dependencies are stored under /tmp/tmp-deps, but you
|
By default, `build.sh` download dependencies under `/tmp/tmp-deps`.
|
||||||
can specify another folder with the help of ANDROID_DEPENDENCIES:
|
|
||||||
|
You can specify another folder with the help of ANDROID_DEPENDENCIES_DIR:
|
||||||
|
|
||||||
ANDROID_DEPENDENCIES_DIR=${HOME}/my_dependencies
|
ANDROID_DEPENDENCIES_DIR=${HOME}/my_dependencies
|
||||||
|
|
||||||
If you place your own dependency source trees there, you'll need
|
If you place your own dependency source trees there,
|
||||||
to specify ANDROID_BUILD_CLEAN=no too.
|
do not forget to disable [Android cleanup](#android-build-cleanup).
|
||||||
|
|
||||||
### Cryptographic configuration
|
### Cryptographic configuration
|
||||||
|
|
||||||
@ -115,7 +126,7 @@ Select your preferred parameters:
|
|||||||
export YYY=yyy
|
export YYY=yyy
|
||||||
...
|
...
|
||||||
|
|
||||||
And, in the android directory, run:
|
and run:
|
||||||
|
|
||||||
cd <libzmq>/builds/android
|
cd <libzmq>/builds/android
|
||||||
./build.sh [ arm | arm64 | x86 | x86_64 ]
|
./build.sh [ arm | arm64 | x86 | x86_64 ]
|
||||||
@ -125,13 +136,13 @@ SHELL script, like in ci_build.sh.
|
|||||||
|
|
||||||
## CI build
|
## CI build
|
||||||
|
|
||||||
Basically, it will call build.sh once, for each Android target.
|
Basically, it will call `build.sh` once, for each Android target.
|
||||||
|
|
||||||
This script accepts the same configuration variables, but some are set
|
This script accepts the same configuration variables, but some are set
|
||||||
with different default values. For instance, the dependencies are not
|
with different default values. For instance, the dependencies are not
|
||||||
downloaded or cloned in /tmp/tmp-deps, but inside LIBZMQ clone.
|
downloaded or cloned in `/tmp/tmp-deps, but inside LIBZMQ clone.
|
||||||
|
|
||||||
It can be used in the same way than build.sh
|
It can be used in the same way as build.sh
|
||||||
|
|
||||||
export XXX=xxx
|
export XXX=xxx
|
||||||
export YYY=yyy
|
export YYY=yyy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user