diff --git a/README.md b/README.md index fc6a909..88b02c8 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,13 @@ The default enabled libraries included in the `ffmpeg` build are: - libmp3lame The user-overridable compile options are: -- `CLEAN`: clean build directories before building -- `LTO`: enable link time optimization -- `OPT`: optimization level (0-3) -- `STATIC`: static or shared build -- `ARCH`: architecture type (x86-64-v{1,2,3,4}, armv8-a, etc) -- `PREFIX`: prefix to install to, default is local install in ./gitignore/sysroot -- `ENABLE`: configure what ffmpeg enables +- `CLEAN`: clean build directories before building (default: ON) +- `LTO`: enable link time optimization (default: ON) +- `OPT`: optimization level (0-3) (default: 3) +- `STATIC`: static or shared build (default: ON) +- `ARCH`: architecture type (x86-64-v{1,2,3,4}, armv8-a, etc) (default: native) +- `PREFIX`: prefix to install to, default is local install in ./gitignore/sysroot (default: local) +- `ENABLE`: configure what ffmpeg enables (default: libsvtav1_psy libopus libdav1d libaom librav1e libvmaf libx264 libx265 libwebp libmp3lame) Examples: - only build libsvtav1_psy and libopus: `ENABLE='libsvtav1_psy libopus' ./scripts/build.sh` diff --git a/lib/build.sh b/lib/build.sh index f952ac9..5762e4e 100644 --- a/lib/build.sh +++ b/lib/build.sh @@ -314,7 +314,7 @@ download_release() { done # enabling a clean build - if [[ ${CLEAN} == true ]]; then + if [[ ${CLEAN} == 'ON' ]]; then DO_CLEAN="rm -rf" else DO_CLEAN='void' @@ -734,7 +734,7 @@ build_libplacebo() { ( installDir="${PWD}/3rdparty/glad" get_build_conf glad - CLEAN=false download_release + CLEAN=OFF download_release cd "${extractedDir}" || exit 1 cp -r ./* "${installDir}" ) || return 1 diff --git a/lib/compile_opts.sh b/lib/compile_opts.sh index 3eb0580..517d1b5 100644 --- a/lib/compile_opts.sh +++ b/lib/compile_opts.sh @@ -9,7 +9,7 @@ declare -Ag FB_COMP_OPTS_DESC # default compile options FB_COMP_OPTS_DESC['CLEAN']='clean build directories before building' -DEFAULT_CLEAN=true +DEFAULT_CLEAN=ON FB_COMP_OPTS_DESC['LTO']='enable link time optimization' DEFAULT_LTO=ON @@ -37,7 +37,7 @@ libvmaf \ libx264 \ libx265 \ libwebp \ -libmp3lame \ +libmp3lame\ " # user-overridable compile option variable names diff --git a/lib/readme.sh b/lib/readme.sh index 5ea965e..e63e6f1 100644 --- a/lib/readme.sh +++ b/lib/readme.sh @@ -13,7 +13,8 @@ gen_function_info() { gen_compile_opts_info() { for opt in "${FB_COMP_OPTS[@]}"; do - echo "- \`${opt}\`: ${FB_COMP_OPTS_DESC[${opt}]}" + declare -n defOptVal="DEFAULT_${opt}" + echo "- \`${opt}\`: ${FB_COMP_OPTS_DESC[${opt}]} (default: ${defOptVal})" done }