diff --git a/ffmpeg-android-maker-2.sh b/ffmpeg-android-maker-2.sh index 7d749ff..7d447ef 100755 --- a/ffmpeg-android-maker-2.sh +++ b/ffmpeg-android-maker-2.sh @@ -1,5 +1,7 @@ -source scripts/parse-arguments.sh +source scripts/export-core-variables.sh source scripts/export-host-variables.sh +source scripts/parse-arguments.sh + function prepareOutput() { OUTPUT_LIB=${OUTPUT_DIR}/lib/${ANDROID_ABI} diff --git a/scripts/export-core-variables.sh b/scripts/export-core-variables.sh new file mode 100755 index 0000000..3c7dcf9 --- /dev/null +++ b/scripts/export-core-variables.sh @@ -0,0 +1,25 @@ +# Essential directories + +# The root of the project +export BASE_DIR="$( cd "$( dirname "$0" )" && pwd )" +# Directory that contains source code for FFmpeg and its dependencies +# Each library has its own subdirectory +# Multiple versions of the same library can be stored inside librarie's directory +export SOURCES_DIR=${BASE_DIR}/sources +# Directory to place some statistics about the build. +# Currently - the info about Text Relocations +export STATS_DIR=${BASE_DIR}/stats +# Directory that contains helper scripts and +# scripts to download and build FFmpeg and each dependency separated by subdirectories +export SCRIPTS_DIR=${BASE_DIR}/scripts +# The directory to use by Android project +# All FFmpeg's libraries and headers are copied there +export OUTPUT_DIR=${BASE_DIR}/output + +# Directory to use as a place to build/install FFmpeg and its dependencies +BUILD_DIR=${BASE_DIR}/build +# Separate directory to build FFmpeg to +export BUILD_DIR_FFMPEG=$BUILD_DIR/ffmpeg +# All external libraries are installed to a single root +# to make easier referencing them when FFmpeg is being built. +export BUILD_DIR_EXTERNAL=$BUILD_DIR/external diff --git a/scripts/parse-arguments.sh b/scripts/parse-arguments.sh index d450de6..cbabd28 100755 --- a/scripts/parse-arguments.sh +++ b/scripts/parse-arguments.sh @@ -64,29 +64,3 @@ export FFMPEG_EXTERNAL_LIBRARIES=${EXTERNAL_LIBRARIES[@]} # Desired Android API level to use during compilation # Will be replaced with 21 for 64bit ABIs if the value is less than 21 export DESIRED_ANDROID_API_LEVEL=${API_LEVEL} - -# Essential directories - -# The root of the project -export BASE_DIR="$( cd "$( dirname "$0" )" && pwd )" -# Directory that contains source code for FFmpeg and its dependencies -# Each library has its own subdirectory -# Multiple versions of the same library can be stored inside librarie's directory -export SOURCES_DIR=${BASE_DIR}/sources -# Directory to place some statistics about the build. -# Currently - the info about Text Relocations -export STATS_DIR=${BASE_DIR}/stats -# Directory that contains helper scripts and -# scripts to download and build FFmpeg and each dependency separated by subdirectories -export SCRIPTS_DIR=${BASE_DIR}/scripts -# The directory to use by Android project -# All FFmpeg's libraries and headers are copied there -export OUTPUT_DIR=${BASE_DIR}/output - -# Directory to use as a place to build/install FFmpeg and its dependencies -BUILD_DIR=${BASE_DIR}/build -# Separate directory to build FFmpeg to -export BUILD_DIR_FFMPEG=$BUILD_DIR/ffmpeg -# All external libraries are installed to a single root -# to make easier referencing them when FFmpeg is being built. -export BUILD_DIR_EXTERNAL=$BUILD_DIR/external