@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Defining essential directories
# The root of the project
function max() {
[ $1 -ge $2 ] && echo "$1" || echo "$2"
}
# Defining a toolchain directory's name according to the current OS.
# Assume that proper version of NDK is installed
# and is referenced by ANDROID_NDK_HOME environment variable
case $ANDROID_ABI in
armeabi-v7a)
EXTRA_BUILD_CONFIGURATION_FLAGS=--enable-thumb
# Script to download FFmpeg's source code
# Relies on FFMPEG_SOURCE_TYPE and FFMPEG_SOURCE_VALUE variables
# to choose the valid origin and version
# libaom doesn't support building while being in its root directory
CMAKE_BUILD_DIR=aom_build_${ANDROID_ABI}
rm -rf ${CMAKE_BUILD_DIR}
# Script to download AV1 Codec Library's source code
# Exports SOURCES_DIR_libaom - path where actual sources are stored
CROSS_FILE_NAME=crossfile-${ANDROID_ABI}.meson
rm ${CROSS_FILE_NAME}
# Script to download Dav1d's source code
# Exports SOURCES_DIR_libdav1d - path where actual sources are stored
./configure \
--prefix=${INSTALL_DIR} \
--target=${TARGET} \
# Script to download Lame's source code
# Exports SOURCES_DIR_libmp3lame - path where actual sources are stored
# This script parses arguments that were passed to ffmpeg-android-maker.sh
# and exports a bunch of varables that are used elsewhere.