Initial commit

added libraries:
opus
flac
libsndfile

updated:
libvorbis
libogg
openal

- Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
This commit is contained in:
marauder2k7 2024-03-21 17:33:47 +00:00
parent 05a083ca6f
commit a745fc3757
1954 changed files with 431332 additions and 21037 deletions

View file

@ -0,0 +1,46 @@
# Building for Android
Assuming the Android Ndk is installed at location `/path/to/toolchain`, building
libsndfile for Android (arm-linux-androideabi) should be as simple as:
```
autoreconf -vif
export ANDROID_TOOLCHAIN_HOME=/path/to/android/toolchain
./Scripts/android-configure.sh
make
```
The `Scripts/android-configure.sh` contains four of variables; `ANDROID_NDK_VER`,
`ANDROID_GCC_VER`, `ANDROID_API_VER` and `ANDROID_TARGET` that can be overridden
by setting them before the script is run.
Since I (erikd), do almost zero Android development, I am happy accept patches
for this documentation and script to improve its utility for real Android
developers.
---
## Using CMake
(Tested on Linux)
For convenience, export the following variables:
```
export ANDROID_ABI=arm64-v8a
export ANDROID_PLATFORM_API_LEVEL=29
export NDK_ROOT=/path/to/android/ndk
```
Set `ANDROID_ABI`, `ANDROID_PLATFORM_API_LEVEL` according to your target system. Now cd into the libsndfile root directory, and run
```
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake -DANDROID_ABI=$ANDROID_ABI -DANDROID_PLATFORM=$ANDROID_PLATFORM_API_LEVEL
```
cd into `build` and run make
```
cd build
make [-j <number of parallel jobs>]
```
This will build libsndfile for android.