From be4030ffb3484a7155f50d69761a640ff6d95795 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Fri, 3 Jun 2022 13:38:10 +0100 Subject: [PATCH 1/7] add build scripts for linux platform --- linux.sh | 202 +++++++++++++++ scripts/android/ffmpeg.sh | 2 +- scripts/apple/ffmpeg.sh | 2 +- scripts/function-android.sh | 4 +- scripts/function-linux.sh | 427 ++++++++++++++++++++++++++++++++ scripts/function.sh | 283 ++++++++++++++++++--- scripts/linux/dav1d.sh | 27 ++ scripts/linux/ffmpeg-kit.sh | 73 ++++++ scripts/linux/ffmpeg.sh | 481 ++++++++++++++++++++++++++++++++++++ scripts/linux/kvazaar.sh | 28 +++ scripts/linux/libaom.sh | 45 ++++ scripts/linux/libilbc.sh | 24 ++ scripts/linux/openh264.sh | 32 +++ scripts/linux/openssl.sh | 38 +++ scripts/linux/srt.sh | 49 ++++ scripts/linux/x264.sh | 42 ++++ scripts/linux/zimg.sh | 24 ++ scripts/main-linux.sh | 168 +++++++++++++ scripts/run-linux.sh | 42 ++++ scripts/variable.sh | 41 ++- 20 files changed, 1990 insertions(+), 44 deletions(-) create mode 100755 linux.sh create mode 100755 scripts/function-linux.sh create mode 100755 scripts/linux/dav1d.sh create mode 100755 scripts/linux/ffmpeg-kit.sh create mode 100755 scripts/linux/ffmpeg.sh create mode 100755 scripts/linux/kvazaar.sh create mode 100755 scripts/linux/libaom.sh create mode 100755 scripts/linux/libilbc.sh create mode 100755 scripts/linux/openh264.sh create mode 100755 scripts/linux/openssl.sh create mode 100755 scripts/linux/srt.sh create mode 100755 scripts/linux/x264.sh create mode 100755 scripts/linux/zimg.sh create mode 100755 scripts/main-linux.sh create mode 100755 scripts/run-linux.sh diff --git a/linux.sh b/linux.sh new file mode 100755 index 0000000..339b715 --- /dev/null +++ b/linux.sh @@ -0,0 +1,202 @@ +#!/bin/bash + +# LOAD INITIAL SETTINGS +export BASEDIR="$(pwd)" +export FFMPEG_KIT_BUILD_TYPE="linux" +source "${BASEDIR}"/scripts/variable.sh +source "${BASEDIR}"/scripts/function-${FFMPEG_KIT_BUILD_TYPE}.sh +disabled_libraries=() + +# SET DEFAULTS SETTINGS +enable_default_linux_architectures + +echo -e "INFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1 + +# SET DEFAULT BUILD OPTIONS +GPL_ENABLED="no" +DISPLAY_HELP="" +BUILD_FULL="" +BUILD_TYPE_ID="" +BUILD_VERSION=$(git describe --tags --always 2>>"${BASEDIR}"/build.log) + +# MAIN BUILDS ENABLED BY DEFAULT +enable_main_build + +# PROCESS BUILD OPTIONS +while [ ! $# -eq 0 ]; do + + case $1 in + -h | --help) + DISPLAY_HELP="1" + ;; + -v | --version) + display_version + exit 0 + ;; + --skip-*) + SKIP_LIBRARY=$(echo $1 | sed -e 's/^--[A-Za-z]*-//g') + + skip_library "${SKIP_LIBRARY}" + ;; + --no-output-redirection) + no_output_redirection + ;; + --no-workspace-cleanup-*) + NO_WORKSPACE_CLEANUP_LIBRARY=$(echo $1 | sed -e 's/^--[A-Za-z]*-[A-Za-z]*-[A-Za-z]*-//g') + + no_workspace_cleanup_library "${NO_WORKSPACE_CLEANUP_LIBRARY}" + ;; + --no-link-time-optimization) + no_link_time_optimization + ;; + -d | --debug) + enable_debug + ;; + -s | --speed) + optimize_for_speed + ;; + -l | --lts) ;; + -f | --force) + export BUILD_FORCE="1" + ;; + --reconf-*) + CONF_LIBRARY=$(echo $1 | sed -e 's/^--[A-Za-z]*-//g') + + reconf_library "${CONF_LIBRARY}" + ;; + --rebuild-*) + BUILD_LIBRARY=$(echo $1 | sed -e 's/^--[A-Za-z]*-//g') + + rebuild_library "${BUILD_LIBRARY}" + ;; + --redownload-*) + DOWNLOAD_LIBRARY=$(echo $1 | sed -e 's/^--[A-Za-z]*-//g') + + redownload_library "${DOWNLOAD_LIBRARY}" + ;; + --full) + BUILD_FULL="1" + ;; + --enable-gpl) + GPL_ENABLED="yes" + ;; + --enable-custom-library-*) + CUSTOM_LIBRARY_OPTION_KEY=$(echo $1 | sed -e 's/^--enable-custom-//g;s/=.*$//g') + CUSTOM_LIBRARY_OPTION_VALUE=$(echo $1 | sed -e 's/^--enable-custom-.*=//g') + + echo -e "INFO: Custom library options detected: ${CUSTOM_LIBRARY_OPTION_KEY} ${CUSTOM_LIBRARY_OPTION_VALUE}\n" 1>>"${BASEDIR}"/build.log 2>&1 + + generate_custom_library_environment_variables "${CUSTOM_LIBRARY_OPTION_KEY}" "${CUSTOM_LIBRARY_OPTION_VALUE}" + ;; + --enable-*) + ENABLED_LIBRARY=$(echo $1 | sed -e 's/^--[A-Za-z]*-//g') + + enable_library "${ENABLED_LIBRARY}" + ;; + --disable-lib-*) + DISABLED_LIB=$(echo $1 | sed -e 's/^--[A-Za-z]*-[A-Za-z]*-//g') + + disabled_libraries+=("${DISABLED_LIB}") + ;; + --disable-*) + DISABLED_ARCH=$(echo $1 | sed -e 's/^--[A-Za-z]*-//g') + + disable_arch "${DISABLED_ARCH}" + ;; + --api-level=*) + API_LEVEL=$(echo $1 | sed -e 's/^--[A-Za-z]*-[A-Za-z]*=//g') + + export API=${API_LEVEL} + ;; + *) + print_unknown_option "$1" + ;; + esac + shift +done + +if [[ -z ${BUILD_VERSION} ]]; then + echo -e "\n(*) error: Can not run git commands in this folder. See build.log.\n" + exit 1 +fi + +# PROCESS FULL OPTION AS LAST OPTION +if [[ -n ${BUILD_FULL} ]]; then + for library in {0..92}; do + if [ ${GPL_ENABLED} == "yes" ]; then + enable_library "$(get_library_name $library)" 1 + else + if [[ $(is_gpl_licensed $library) -eq 1 ]]; then + enable_library "$(get_library_name $library)" 1 + fi + fi + done +fi + +# DISABLE SPECIFIED LIBRARIES +for disabled_library in ${disabled_libraries[@]}; do + set_library "${disabled_library}" 0 +done + +# IF HELP DISPLAYED EXIT +if [[ -n ${DISPLAY_HELP} ]]; then + display_help + exit 0 +fi + +echo -e "\nBuilding ffmpeg-kit ${BUILD_TYPE_ID}library for Linux\n" +echo -e -n "INFO: Building ffmpeg-kit ${BUILD_VERSION} ${BUILD_TYPE_ID}library for Linux: " 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "$(date)\n" 1>>"${BASEDIR}"/build.log 2>&1 + +# PRINT BUILD SUMMARY +print_enabled_architectures +print_enabled_libraries +print_reconfigure_requested_libraries +print_rebuild_requested_libraries +print_redownload_requested_libraries +print_custom_libraries + +# VALIDATE GPL FLAGS +for gpl_library in {$LIBRARY_X264,$LIBRARY_LINUX_XVIDCORE,$LIBRARY_LINUX_X265,$LIBRARY_LINUX_LIBVIDSTAB,$LIBRARY_LINUX_RUBBERBAND}; do + if [[ ${ENABLED_LIBRARIES[$gpl_library]} -eq 1 ]]; then + library_name=$(get_library_name ${gpl_library}) + + if [ ${GPL_ENABLED} != "yes" ]; then + echo -e "\n(*) Invalid configuration detected. GPL library ${library_name} enabled without --enable-gpl flag.\n" + echo -e "\n(*) Invalid configuration detected. GPL library ${library_name} enabled without --enable-gpl flag.\n" 1>>"${BASEDIR}"/build.log 2>&1 + exit 1 + fi + fi +done + +echo -n -e "\nDownloading sources: " +echo -e "INFO: Downloading the source code of ffmpeg and external libraries.\n" 1>>"${BASEDIR}"/build.log 2>&1 + +# DOWNLOAD GNU CONFIG +download_gnu_config + +# DOWNLOAD LIBRARY SOURCES +downloaded_library_sources "${ENABLED_LIBRARIES[@]}" + +# THIS WILL SAVE ARCHITECTURES TO BUILD +TARGET_ARCH_LIST=() + +# BUILD ENABLED LIBRARIES ON ENABLED ARCHITECTURES +for run_arch in {0..12}; do + if [[ ${ENABLED_ARCHITECTURES[$run_arch]} -eq 1 ]]; then + export ARCH=$(get_arch_name "$run_arch") + export FULL_ARCH=$(get_full_arch_name "$run_arch") + + # EXECUTE MAIN BUILD SCRIPT + . "${BASEDIR}"/scripts/main-linux.sh "${ENABLED_LIBRARIES[@]}" + + TARGET_ARCH_LIST+=("${FULL_ARCH}") + + # CLEAR FLAGS + for library in {0..92}; do + library_name=$(get_library_name "${library}") + unset "$(echo "OK_${library_name}" | sed "s/\-/\_/g")" + unset "$(echo "DEPENDENCY_REBUILT_${library_name}" | sed "s/\-/\_/g")" + done + fi +done diff --git a/scripts/android/ffmpeg.sh b/scripts/android/ffmpeg.sh index 7b6d2d7..b8e750f 100755 --- a/scripts/android/ffmpeg.sh +++ b/scripts/android/ffmpeg.sh @@ -310,7 +310,7 @@ for library in {0..61}; do # NOTE THAT IDS MUST BE +1 OF THE INDEX VALUE if [[ ${library} -eq ${LIBRARY_SDL} ]]; then CONFIGURE_POSTFIX+=" --disable-sdl2" - elif [[ ${library} -eq ${LIBRARY_ANDROID_ZLIB} ]]; then + elif [[ ${library} -eq ${LIBRARY_SYSTEM_ZLIB} ]]; then CONFIGURE_POSTFIX+=" --disable-zlib" elif [[ ${library} -eq ${LIBRARY_ANDROID_MEDIA_CODEC} ]]; then CONFIGURE_POSTFIX+=" --disable-mediacodec" diff --git a/scripts/apple/ffmpeg.sh b/scripts/apple/ffmpeg.sh index 990e922..406ecc1 100755 --- a/scripts/apple/ffmpeg.sh +++ b/scripts/apple/ffmpeg.sh @@ -383,7 +383,7 @@ for library in {0..61}; do CONFIGURE_POSTFIX+=" --disable-opengl" elif [[ ${library} -eq ${LIBRARY_APPLE_VIDEOTOOLBOX} ]]; then CONFIGURE_POSTFIX+=" --disable-videotoolbox" - elif [[ ${library} -eq ${LIBRARY_APPLE_ZLIB} ]]; then + elif [[ ${library} -eq ${LIBRARY_SYSTEM_ZLIB} ]]; then CONFIGURE_POSTFIX+=" --disable-zlib" elif [[ ${library} -eq ${LIBRARY_OPENSSL} ]]; then CONFIGURE_POSTFIX+=" --disable-openssl" diff --git a/scripts/function-android.sh b/scripts/function-android.sh index c1c6029..92f11c3 100755 --- a/scripts/function-android.sh +++ b/scripts/function-android.sh @@ -45,8 +45,8 @@ under the prebuilt folder.\n" echo -e "Libraries:" echo -e " --full\t\t\tenables all external libraries" - echo -e " --enable-android-media-codec\tbuild with built-in Android MediaCodec support[no]" - echo -e " --enable-android-zlib\t\tbuild with built-in zlib support[no]" + echo -e " --enable-android-media-codec\tbuild with built-in Android MediaCodec support [no]" + echo -e " --enable-android-zlib\t\tbuild with built-in zlib support [no]" display_help_common_libraries display_help_gpl_libraries diff --git a/scripts/function-linux.sh b/scripts/function-linux.sh new file mode 100755 index 0000000..1edf026 --- /dev/null +++ b/scripts/function-linux.sh @@ -0,0 +1,427 @@ +#!/bin/bash + +source "${BASEDIR}/scripts/function.sh" + +prepare_inline_sed + +enable_default_linux_architectures() { + ENABLED_ARCHITECTURES[ARCH_X86_64]=1 +} + +get_ffmpeg_kit_version() { + local FFMPEG_KIT_VERSION=$(grep '#define FFMPEG_KIT_VERSION' "${BASEDIR}"/linux/src/main/cpp/ffmpegkit.h | grep -Eo '\".*\"' | sed -e 's/\"//g') + + echo "${FFMPEG_KIT_VERSION}" +} + +display_help() { + local COMMAND=$(echo "$0" | sed -e 's/\.\///g') + + echo -e "\n'$COMMAND' builds FFmpegKit for Linux platform. By default only one Linux architecture \ +(x86_64) is built without any external libraries enabled. Options can be used to \ +disable architectures and/or enable external libraries. Please note that GPL libraries (external libraries with GPL \ +license) need --enable-gpl flag to be set explicitly. When compilation ends, \ +libraries are created under the prebuilt folder.\n" + echo -e "Usage: ./$COMMAND [OPTION]... [VAR=VALUE]...\n" + echo -e "Specify environment variables as VARIABLE=VALUE to override default build options.\n" + + display_help_options " -l, --lts\t\t\tbuild lts packages to support older devices" + display_help_licensing + + echo -e "Architectures:" + echo -e " --disable-x86-64\t\tdo not build x86-64 architecture [yes]\n" + + echo -e "Libraries:" + echo -e " --full\t\t\tenables all external libraries" + echo -e " --enable-linux-alsa\t\tbuild with built-in alsa support [no]" + echo -e " --enable-linux-chromaprint\tbuild with built-in chromaprint support [no]" + echo -e " --enable-linux-fontconfig\tbuild with built-in fontconfig support [no]" + echo -e " --enable-linux-freetype\tbuild with built-in freetype support [no]" + echo -e " --enable-linux-fribidi\tbuild with built-in fribidi support [no]" + echo -e " --enable-linux-gmp\t\tbuild with built-in gmp support [no]" + echo -e " --enable-linux-gnutls\t\tbuild with built-in gnutls support [no]" + echo -e " --enable-linux-lame\t\tbuild with built-in lame support [no]" + echo -e " --enable-linux-libass\t\tbuild with built-in libass support [no]" + echo -e " --enable-linux-libiconv\tbuild with built-in libiconv support [no]" + echo -e " --enable-linux-libtheora\tbuild with built-in libtheora support [no]" + echo -e " --enable-linux-libvorbis\tbuild with built-in libvorbis support [no]" + echo -e " --enable-linux-libvpx\t\tbuild with built-in libvpx support [no]" + echo -e " --enable-linux-libwebp\tbuild with built-in libwebp support [no]" + echo -e " --enable-linux-libxml2\tbuild with built-in libxml2 support [no]" + echo -e " --enable-linux-opencl\t\tbuild with built-in opencl support [no]" + echo -e " --enable-linux-opencore-amr\tbuild with built-in opencore-amr support [no]" + echo -e " --enable-linux-opus\t\tbuild with built-in opus support [no]" + echo -e " --enable-linux-sdl\t\tbuild with built-in sdl support [no]" + echo -e " --enable-linux-shine\t\tbuild with built-in shine support [no]" + echo -e " --enable-linux-snappy\t\tbuild with built-in snappy support [no]" + echo -e " --enable-linux-soxr\t\tbuild with built-in soxr support [no]" + echo -e " --enable-linux-speex\t\tbuild with built-in speex support [no]" + echo -e " --enable-linux-tesseract\tbuild with built-in tesseract support [no]" + echo -e " --enable-linux-twolame\tbuild with built-in twolame support [no]" + echo -e " --enable-linux-vaapi\t\tbuild with built-in vaapi support [no]" + echo -e " --enable-linux-v4l2\t\tbuild with built-in v4l2 support [no]" + echo -e " --enable-linux-vo-amrwbenc\tbuild with built-in vo-amrwbenc support [no]" + echo -e " --enable-linux-zlib\t\tbuild with built-in zlib support [no]" + echo -e " --enable-dav1d\t\tbuild with dav1d [no]" + echo -e " --enable-kvazaar\t\tbuild with kvazaar [no]" + echo -e " --enable-libaom\t\tbuild with libaom [no]" + echo -e " --enable-libilbc\t\tbuild with libilbc [no]" + echo -e " --enable-openh264\t\tbuild with openh264 [no]" + echo -e " --enable-openssl\t\tbuild with openssl [no]" + echo -e " --enable-srt\t\t\tbuild with srt [no]" + echo -e " --enable-zimg\t\t\tbuild with zimg [no]\n" + + echo -e "GPL libraries:" + echo -e " --enable-linux-libvidstab\tbuild with built-in libvidstab support [no]" + echo -e " --enable-linux-rubberband\tbuild with built-in rubber band support [no]" + echo -e " --enable-linux-x265\t\tbuild with built-in x265 support [no]" + echo -e " --enable-linux-xvidcore\tbuild with built-in xvidcore support [no]" + echo -e " --enable-x264\t\t\tbuild with x264 [no]\n" + + display_help_custom_libraries + display_help_advanced_options +} + +enable_main_build() { + unset FFMPEG_KIT_LTS_BUILD +} + +enable_lts_build() { + export FFMPEG_KIT_LTS_BUILD="1" +} + +get_cmake_system_processor() { + case ${ARCH} in + x86-64) + echo "x86_64" + ;; + esac +} + +get_target_cpu() { + case ${ARCH} in + x86-64) + echo "x86_64" + ;; + esac +} + +get_common_includes() { + echo "" +} + +get_common_cflags() { + if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]]; then + local LTS_BUILD__FLAG="-DFFMPEG_KIT_LTS " + fi + + echo "-fstrict-aliasing -fPIC -DLINUX ${LTS_BUILD__FLAG} ${LLVM_CONFIG_CFLAGS}" +} + +get_arch_specific_cflags() { + case ${ARCH} in + x86-64) + echo "-target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64" + ;; + esac +} + +get_size_optimization_cflags() { + if [[ -z ${NO_LINK_TIME_OPTIMIZATION} ]]; then + local LINK_TIME_OPTIMIZATION_FLAGS="-flto" + else + local LINK_TIME_OPTIMIZATION_FLAGS="" + fi + + local ARCH_OPTIMIZATION="" + case ${ARCH} in + x86-64) + case $1 in + ffmpeg) + ARCH_OPTIMIZATION="${LINK_TIME_OPTIMIZATION_FLAGS} -Os -ffunction-sections -fdata-sections" + ;; + *) + ARCH_OPTIMIZATION="-Os -ffunction-sections -fdata-sections" + ;; + esac + ;; + esac + + local LIB_OPTIMIZATION="" + + echo "${ARCH_OPTIMIZATION} ${LIB_OPTIMIZATION}" +} + +get_app_specific_cflags() { + local APP_FLAGS="" + case $1 in + ffmpeg) + APP_FLAGS="-Wno-unused-function -DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD" + ;; + kvazaar) + APP_FLAGS="-std=gnu99 -Wno-unused-function" + ;; + openh264) + APP_FLAGS="-std=gnu99 -Wno-unused-function -fstack-protector-all" + ;; + openssl | srt) + APP_FLAGS="-Wno-unused-function" + ;; + *) + APP_FLAGS="-std=c99 -Wno-unused-function" + ;; + esac + + echo "${APP_FLAGS}" +} + +get_cflags() { + local ARCH_FLAGS=$(get_arch_specific_cflags) + local APP_FLAGS=$(get_app_specific_cflags "$1") + local COMMON_FLAGS=$(get_common_cflags) + if [[ -z ${FFMPEG_KIT_DEBUG} ]]; then + local OPTIMIZATION_FLAGS=$(get_size_optimization_cflags "$1") + else + local OPTIMIZATION_FLAGS="${FFMPEG_KIT_DEBUG}" + fi + local COMMON_INCLUDES=$(get_common_includes) + + echo "${ARCH_FLAGS} ${APP_FLAGS} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_INCLUDES}" +} + +get_cxxflags() { + if [[ -z ${NO_LINK_TIME_OPTIMIZATION} ]]; then + local LINK_TIME_OPTIMIZATION_FLAGS="-flto" + else + local LINK_TIME_OPTIMIZATION_FLAGS="" + fi + + if [[ -z ${FFMPEG_KIT_DEBUG} ]]; then + local OPTIMIZATION_FLAGS="-Os -ffunction-sections -fdata-sections" + else + local OPTIMIZATION_FLAGS="${FFMPEG_KIT_DEBUG}" + fi + + local COMMON_FLAGS="${LLVM_CONFIG_CXXFLAGS} ${OPTIMIZATION_FLAGS}" + + case $1 in + ffmpeg) + if [[ -z ${FFMPEG_KIT_DEBUG} ]]; then + echo "${LINK_TIME_OPTIMIZATION_FLAGS} ${LLVM_CONFIG_CXXFLAGS} -O2 -ffunction-sections -fdata-sections" + else + echo "${FFMPEG_KIT_DEBUG} ${LLVM_CONFIG_CXXFLAGS}" + fi + ;; + srt | zimg) + echo "${COMMON_FLAGS} -fcxx-exceptions -fPIC" + ;; + *) + echo "-fno-exceptions -fno-rtti ${COMMON_FLAGS}" + ;; + esac +} + +get_common_linked_libraries() { + local COMMON_LIBRARY_PATHS="" + + case $1 in + ffmpeg) + echo "-lc -lm -ldl ${COMMON_LIBRARY_PATHS}" + ;; + srt) + echo "-lc -lm -ldl -lstdc++ ${COMMON_LIBRARY_PATHS}" + ;; + *) + echo "-lc -lm -ldl ${COMMON_LIBRARY_PATHS}" + ;; + esac +} + +get_size_optimization_ldflags() { + if [[ -z ${NO_LINK_TIME_OPTIMIZATION} ]]; then + local LINK_TIME_OPTIMIZATION_FLAGS="-flto" + else + local LINK_TIME_OPTIMIZATION_FLAGS="" + fi + + case ${ARCH} in + x86-64) + case $1 in + ffmpeg) + echo "${LINK_TIME_OPTIMIZATION_FLAGS} -O2 -ffunction-sections -fdata-sections -finline-functions" + ;; + *) + echo "-Os -ffunction-sections -fdata-sections" + ;; + esac + ;; + esac +} + +get_arch_specific_ldflags() { + case ${ARCH} in + x86-64) + echo "-march=x86-64 -Wl,-z,text" + ;; + esac +} + +get_ldflags() { + local ARCH_FLAGS=$(get_arch_specific_ldflags) + if [[ -z ${FFMPEG_KIT_DEBUG} ]]; then + local OPTIMIZATION_FLAGS="$(get_size_optimization_ldflags "$1")" + else + local OPTIMIZATION_FLAGS="${FFMPEG_KIT_DEBUG}" + fi + local COMMON_LINKED_LIBS=$(get_common_linked_libraries "$1") + + echo "${ARCH_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_LINKED_LIBS} ${LLVM_CONFIG_LDFLAGS} -Wl,--hash-style=both -fuse-ld=lld" +} + +create_mason_cross_file() { + cat >"$1" <"${INSTALL_PKG_CONFIG_DIR}/aom.pc" <"${INSTALL_PKG_CONFIG_DIR}/srt.pc" <"${INSTALL_PKG_CONFIG_DIR}/zimg.pc" <>"${BASEDIR}"/build.log) + export LLVM_CONFIG_CXXFLAGS=$(llvm-config-$CLANG_VERSION --cxxflags 2>>"${BASEDIR}"/build.log) + export LLVM_CONFIG_LDFLAGS=$(llvm-config-$CLANG_VERSION --ldflags 2>>"${BASEDIR}"/build.log) + else + local CLANG_POSTFIX="" + export LLVM_CONFIG_CFLAGS=$(llvm-config --cflags 2>>"${BASEDIR}"/build.log) + export LLVM_CONFIG_CXXFLAGS=$(llvm-config --cxxflags 2>>"${BASEDIR}"/build.log) + export LLVM_CONFIG_LDFLAGS=$(llvm-config --ldflags 2>>"${BASEDIR}"/build.log) + fi + + export CC=$(command -v "clang$CLANG_POSTFIX") + export CXX=$(command -v "clang++$CLANG_POSTFIX") + export AS=$(command -v "llvm-as$CLANG_POSTFIX") + export AR=$(command -v "llvm-ar$CLANG_POSTFIX") + export LD=$(command -v "ld.lld$CLANG_POSTFIX") + export RANLIB=$(command -v "llvm-ranlib$CLANG_POSTFIX") + export STRIP=$(command -v "llvm-strip$CLANG_POSTFIX") + export NM=$(command -v "llvm-nm$CLANG_POSTFIX") + export INSTALL_PKG_CONFIG_DIR="${BASEDIR}"/prebuilt/$(get_build_directory)/pkgconfig + export ZLIB_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/zlib.pc" + + if [ ! -d "${INSTALL_PKG_CONFIG_DIR}" ]; then + mkdir -p "${INSTALL_PKG_CONFIG_DIR}" 1>>"${BASEDIR}"/build.log 2>&1 + fi +} diff --git a/scripts/function.sh b/scripts/function.sh index 02f1ff3..054f46b 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -13,7 +13,7 @@ get_arch_name() { 6) echo "arm64e" ;; # ios 7) echo "i386" ;; # ios 8) echo "x86" ;; # android - 9) echo "x86-64" ;; # android, ios, macos, tvos + 9) echo "x86-64" ;; # android, ios, linux, macos, tvos 10) echo "x86-64-mac-catalyst" ;; # ios 11) echo "arm64-mac-catalyst" ;; # ios 12) echo "arm64-simulator" ;; # ios, tvos @@ -39,7 +39,7 @@ from_arch_name() { arm64e) echo 6 ;; # ios i386) echo 7 ;; # ios x86) echo 8 ;; # android - x86-64) echo 9 ;; # android, ios, macos, tvos + x86-64) echo 9 ;; # android, ios, linux, macos, tvos x86-64-mac-catalyst) echo 10 ;; # ios arm64-mac-catalyst) echo 11 ;; # ios arm64-simulator) echo 12 ;; # ios @@ -98,17 +98,21 @@ get_library_name() { 47) echo "libsamplerate" ;; 48) echo "harfbuzz" ;; 49) echo "cpu-features" ;; - 50) echo "android-zlib" ;; - 51) echo "android-media-codec" ;; - 52) - if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then + 50) + if [[ ${FFMPEG_KIT_BUILD_TYPE} == "android" ]]; then + echo "android-zlib" + elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-zlib" + elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "linux" ]]; then + echo "linux-zlib" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "macos-zlib" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]]; then echo "tvos-zlib" fi ;; + 51) echo "linux-alsa" ;; + 52) echo "android-media-codec" ;; 53) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-audiotoolbox" @@ -176,6 +180,37 @@ get_library_name() { echo "macos-opengl" fi ;; + 62) echo "linux-fontconfig" ;; + 63) echo "linux-freetype" ;; + 64) echo "linux-fribidi" ;; + 65) echo "linux-gmp" ;; + 66) echo "linux-gnutls" ;; + 67) echo "linux-lame" ;; + 68) echo "linux-libass" ;; + 69) echo "linux-libiconv" ;; + 70) echo "linux-libtheora" ;; + 71) echo "linux-libvorbis" ;; + 72) echo "linux-libvpx" ;; + 73) echo "linux-libwebp" ;; + 74) echo "linux-libxml2" ;; + 75) echo "linux-opencore-amr" ;; + 76) echo "linux-shine" ;; + 77) echo "linux-speex" ;; + 78) echo "linux-opencl" ;; + 79) echo "linux-xvidcore" ;; + 80) echo "linux-x265" ;; + 81) echo "linux-libvidstab" ;; + 82) echo "linux-rubberband" ;; + 83) echo "linux-v4l2" ;; + 84) echo "linux-opus" ;; + 85) echo "linux-snappy" ;; + 86) echo "linux-soxr" ;; + 87) echo "linux-chromaprint" ;; + 88) echo "linux-twolame" ;; + 89) echo "linux-sdl" ;; + 90) echo "linux-tesseract" ;; + 91) echo "linux-vaapi" ;; + 92) echo "linux-vo-amrwbenc" ;; esac } @@ -231,9 +266,9 @@ from_library_name() { libsamplerate) echo 47 ;; harfbuzz) echo 48 ;; cpu-features) echo 49 ;; - android-zlib) echo 50 ;; - android-media-codec) echo 51 ;; - ios-zlib | macos-zlib | tvos-zlib) echo 52 ;; + android-zlib | ios-zlib | linux-zlib | macos-zlib | tvos-zlib) echo 50 ;; + linux-alsa) echo 51 ;; + android-media-codec) echo 52 ;; ios-audiotoolbox | macos-audiotoolbox | tvos-audiotoolbox) echo 53 ;; ios-bzip2 | macos-bzip2 | tvos-bzip2) echo 54 ;; ios-videotoolbox | macos-videotoolbox | tvos-videotoolbox) echo 55 ;; @@ -243,6 +278,37 @@ from_library_name() { macos-coreimage) echo 59 ;; macos-opencl) echo 60 ;; macos-opengl) echo 61 ;; + linux-fontconfig) echo 62 ;; + linux-freetype) echo 63 ;; + linux-fribidi) echo 64 ;; + linux-gmp) echo 65 ;; + linux-gnutls) echo 66 ;; + linux-lame) echo 67 ;; + linux-libass) echo 68 ;; + linux-libiconv) echo 69 ;; + linux-libtheora) echo 70 ;; + linux-libvorbis) echo 71 ;; + linux-libvpx) echo 72 ;; + linux-libwebp) echo 73 ;; + linux-libxml2) echo 74 ;; + linux-opencore-amr) echo 75 ;; + linux-shine) echo 76 ;; + linux-speex) echo 77 ;; + linux-opencl) echo 78 ;; + linux-xvidcore) echo 79 ;; + linux-x265) echo 80 ;; + linux-libvidstab) echo 81 ;; + linux-rubberband) echo 82 ;; + linux-v4l2) echo 83 ;; + linux-opus) echo 84 ;; + linux-snappy) echo 85 ;; + linux-soxr) echo 86 ;; + linux-chromaprint) echo 87 ;; + linux-twolame) echo 88 ;; + linux-sdl) echo 89 ;; + linux-tesseract) echo 90 ;; + linux-vaapi) echo 91 ;; + linux-vo-amrwbenc) echo 92 ;; esac } @@ -252,18 +318,22 @@ from_library_name() { is_library_supported_on_platform() { local library_index=$(from_library_name "$1") case ${library_index} in - 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20) - echo "0" - ;; - 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40) + # ALL + 16 | 17 | 18 | 23 | 27 | 32 | 34 | 35 | 36) echo "0" ;; - 42 | 43 | 44 | 45 | 46 | 47 | 48) - echo "0" + + # ALL EXCEPT LINUX + 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 33 | 37 | 38 | 39 | 40 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 50) + if [[ ${FFMPEG_KIT_BUILD_TYPE} == "linux" ]]; then + echo "1" + else + echo "0" + fi ;; # ANDROID - 7 | 41 | 49 | 50 | 51) + 7 | 41 | 49 | 52) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "android" ]]; then echo "0" else @@ -271,6 +341,15 @@ is_library_supported_on_platform() { fi ;; + # ONLY LINUX + 51) + if [[ ${FFMPEG_KIT_BUILD_TYPE} == "linux" ]]; then + echo "0" + else + echo "1" + fi + ;; + # ONLY IOS AND MACOS 56) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] && [[ $1 == "ios-avfoundation" ]]; then @@ -283,7 +362,7 @@ is_library_supported_on_platform() { ;; # IOS, MACOS AND TVOS - 52 | 53 | 54 | 55 | 57 | 58) + 53 | 54 | 55 | 57 | 58) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "0" else @@ -299,6 +378,15 @@ is_library_supported_on_platform() { echo "1" fi ;; + + # ONLY LINUX + 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92) + if [[ ${FFMPEG_KIT_BUILD_TYPE} == "linux" ]]; then + echo "0" + else + echo "1" + fi + ;; *) echo "1" ;; @@ -306,7 +394,7 @@ is_library_supported_on_platform() { } # -# 1. +# 1. # is_arch_supported_on_platform() { local arch_index=$(from_arch_name "$1") @@ -344,7 +432,7 @@ is_arch_supported_on_platform() { # IOS, MACOS OR TVOS $ARCH_ARM64) - if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then + if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]]; then echo 1 else echo 0 @@ -385,6 +473,9 @@ get_meson_target_host_family() { android) echo "android" ;; + linux) + echo "linux" + ;; *) echo "darwin" ;; @@ -440,6 +531,8 @@ get_target() { echo "x86_64-linux-android" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "$(get_target_cpu)-apple-ios$(get_min_sdk_version)-simulator" + elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "linux" ]]; then + echo "$(get_target_cpu)-linux-gnu" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "$(get_target_cpu)-apple-darwin$(get_min_sdk_version)" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]]; then @@ -487,6 +580,8 @@ get_host() { echo "x86_64-linux-android" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "$(get_target_cpu)-ios-darwin" + elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "linux" ]]; then + echo "$(get_target_cpu)-linux-gnu" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "$(get_target_cpu)-apple-darwin" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]]; then @@ -950,15 +1045,15 @@ set_library() { fi case $1 in - android-zlib) - ENABLED_LIBRARIES[LIBRARY_ANDROID_ZLIB]=$2 + android-zlib | ios-zlib | linux-zlib | macos-zlib | tvos-zlib) + ENABLED_LIBRARIES[LIBRARY_SYSTEM_ZLIB]=$2 + ;; + linux-alsa) + ENABLED_LIBRARIES[LIBRARY_LINUX_ALSA]=$2 ;; android-media-codec) ENABLED_LIBRARIES[LIBRARY_ANDROID_MEDIA_CODEC]=$2 ;; - ios-zlib | macos-zlib | tvos-zlib) - ENABLED_LIBRARIES[LIBRARY_APPLE_ZLIB]=$2 - ;; ios-audiotoolbox | macos-audiotoolbox | tvos-audiotoolbox) ENABLED_LIBRARIES[LIBRARY_APPLE_AUDIOTOOLBOX]=$2 ;; @@ -1161,6 +1256,116 @@ set_library() { ENABLED_LIBRARIES[LIBRARY_TIFF]=$2 ENABLED_LIBRARIES[LIBRARY_JPEG]=$2 ;; + linux-chromaprint) + ENABLED_LIBRARIES[LIBRARY_LINUX_CHROMAPRINT]=$2 + ;; + linux-fontconfig) + ENABLED_LIBRARIES[LIBRARY_LINUX_FONTCONFIG]=$2 + set_library "linux-libiconv" $2 + set_library "linux-freetype" $2 + ;; + linux-freetype) + ENABLED_LIBRARIES[LIBRARY_LINUX_FREETYPE]=$2 + set_virtual_library "zlib" $2 + ;; + linux-fribidi) + ENABLED_LIBRARIES[LIBRARY_LINUX_FRIBIDI]=$2 + ;; + linux-gmp) + ENABLED_LIBRARIES[LIBRARY_LINUX_GMP]=$2 + ;; + linux-gnutls) + ENABLED_LIBRARIES[LIBRARY_LINUX_GNUTLS]=$2 + set_virtual_library "zlib" $2 + set_library "linux-gmp" $2 + set_library "linux-libiconv" $2 + ;; + linux-lame) + ENABLED_LIBRARIES[LIBRARY_LINUX_LAME]=$2 + set_library "linux-libiconv" $2 + ;; + linux-libass) + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBASS]=$2 + set_library "linux-freetype" $2 + set_library "linux-fribidi" $2 + set_library "linux-fontconfig" $2 + set_library "linux-libiconv" $2 + ;; + linux-libiconv) + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBICONV]=$2 + ;; + linux-libtheora) + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBTHEORA]=$2 + set_library "linux-libvorbis" $2 + ;; + linux-libvidstab) + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBVIDSTAB]=$2 + ;; + linux-libvorbis) + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBVORBIS]=$2 + ;; + linux-libvpx) + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBVPX]=$2 + ;; + linux-libwebp) + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBWEBP]=$2 + set_virtual_library "zlib" $2 + ;; + linux-libxml2) + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBXML2]=$2 + set_library "linux-libiconv" $2 + ;; + linux-vaapi) + ENABLED_LIBRARIES[LIBRARY_LINUX_VAAPI]=$2 + ;; + linux-opencl) + ENABLED_LIBRARIES[LIBRARY_LINUX_OPENCL]=$2 + ;; + linux-opencore-amr) + ENABLED_LIBRARIES[LIBRARY_LINUX_OPENCOREAMR]=$2 + ;; + linux-opus) + ENABLED_LIBRARIES[LIBRARY_LINUX_OPUS]=$2 + ;; + linux-rubberband) + ENABLED_LIBRARIES[LIBRARY_LINUX_RUBBERBAND]=$2 + ;; + linux-sdl) + ENABLED_LIBRARIES[LIBRARY_LINUX_SDL]=$2 + ;; + linux-shine) + ENABLED_LIBRARIES[LIBRARY_LINUX_SHINE]=$2 + ;; + linux-snappy) + ENABLED_LIBRARIES[LIBRARY_LINUX_SNAPPY]=$2 + set_virtual_library "zlib" $2 + ;; + linux-soxr) + ENABLED_LIBRARIES[LIBRARY_LINUX_SOXR]=$2 + ;; + linux-speex) + ENABLED_LIBRARIES[LIBRARY_LINUX_SPEEX]=$2 + ;; + linux-tesseract) + ENABLED_LIBRARIES[LIBRARY_LINUX_TESSERACT]=$2 + ENABLED_LIBRARIES[LIBRARY_LINUX_LIBWEBP]=$2 + set_virtual_library "zlib" $2 + ;; + linux-twolame) + ENABLED_LIBRARIES[LIBRARY_LINUX_TWOLAME]=$2 + ;; + linux-v4l2) + ENABLED_LIBRARIES[LIBRARY_LINUX_V4L2]=$2 + ;; + linux-vo-amrwbenc) + ENABLED_LIBRARIES[LIBRARY_LINUX_VO_AMRWBENC]=$2 + ;; + linux-x265) + ENABLED_LIBRARIES[LIBRARY_LINUX_X265]=$2 + ;; + linux-xvidcore) + ENABLED_LIBRARIES[LIBRARY_LINUX_XVIDCORE]=$2 + ;; *) print_unknown_library $1 ;; @@ -1190,11 +1395,7 @@ set_virtual_library() { fi ;; zlib) - if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "apple" ]]; then - ENABLED_LIBRARIES[LIBRARY_APPLE_ZLIB]=$2 - else - ENABLED_LIBRARIES[LIBRARY_ANDROID_ZLIB]=$2 - fi + ENABLED_LIBRARIES[LIBRARY_SYSTEM_ZLIB]=$2 ;; *) print_unknown_virtual_library $1 @@ -1403,7 +1604,7 @@ print_enabled_libraries() { let enabled=0 # SUPPLEMENTARY LIBRARIES NOT PRINTED - for library in {50..57} {59..61} {0..36}; do + for library in {50..57} {59..92} {0..36}; do if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then if [[ ${enabled} -ge 1 ]]; then echo -n ", " @@ -1822,7 +2023,7 @@ clone_git_repository_with_tag() { # 1. library index # is_gpl_licensed() { - for gpl_library in {$LIBRARY_X264,$LIBRARY_XVIDCORE,$LIBRARY_X265,$LIBRARY_LIBVIDSTAB,$LIBRARY_RUBBERBAND}; do + for gpl_library in {$LIBRARY_X264,$LIBRARY_XVIDCORE,$LIBRARY_X265,$LIBRARY_LIBVIDSTAB,$LIBRARY_RUBBERBAND,$LIBRARY_LINUX_XVIDCORE,$LIBRARY_LINUX_X265,$LIBRARY_LINUX_LIBVIDSTAB,$LIBRARY_LINUX_RUBBERBAND}; do if [[ $gpl_library -eq $1 ]]; then echo 0 return @@ -2099,8 +2300,8 @@ library_is_installed() { return fi - if [ ! -d "${INSTALL_PATH}"/"${LIB_NAME}"/lib ]; then - echo -e "INFO: ${INSTALL_PATH}/${LIB_NAME}/lib directory not found\n" 1>>"${BASEDIR}"/build.log 2>&1 + if [ ! -d "${INSTALL_PATH}/${LIB_NAME}/lib" ] && [ ! -d "${INSTALL_PATH}/${LIB_NAME}/lib64" ]; then + echo -e "INFO: ${INSTALL_PATH}/${LIB_NAME}/lib{lib64} directory not found\n" 1>>"${BASEDIR}"/build.log 2>&1 echo 0 return fi @@ -2112,7 +2313,7 @@ library_is_installed() { fi HEADER_COUNT=$(ls -l "${INSTALL_PATH}"/"${LIB_NAME}"/include | wc -l) - LIB_COUNT=$(ls -l ${INSTALL_PATH}/${LIB_NAME}/lib | wc -l) + LIB_COUNT=$(ls -l ${INSTALL_PATH}/${LIB_NAME}/lib* | wc -l) if [[ ${HEADER_COUNT} -eq 0 ]]; then echo -e "INFO: No headers found under ${INSTALL_PATH}/${LIB_NAME}/include\n" 1>>"${BASEDIR}"/build.log 2>&1 @@ -2121,7 +2322,7 @@ library_is_installed() { fi if [[ ${LIB_COUNT} -eq 0 ]]; then - echo -e "INFO: No libraries found under ${INSTALL_PATH}/${LIB_NAME}/lib\n" 1>>"${BASEDIR}"/build.log 2>&1 + echo -e "INFO: No libraries found under ${INSTALL_PATH}/${LIB_NAME}/lib{lib64}\n" 1>>"${BASEDIR}"/build.log 2>&1 echo 0 return fi @@ -2189,3 +2390,15 @@ compare_versions() { echo "0" return; } + +# +# 1. command +# +command_exists() { + local COMMAND=$1 + if [[ -n "$(command -v $COMMAND)" ]]; then + echo 0 + else + echo 1 + fi +} diff --git a/scripts/linux/dav1d.sh b/scripts/linux/dav1d.sh new file mode 100755 index 0000000..104d13f --- /dev/null +++ b/scripts/linux/dav1d.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# SET BUILD FLAGS +CROSS_FILE="${BASEDIR}"/src/"${LIB_NAME}"/package/crossfiles/$ARCH-$FFMPEG_KIT_BUILD_TYPE.meson + +create_mason_cross_file "$CROSS_FILE" || return 1 + +# ALWAYS CLEAN THE PREVIOUS BUILD +rm -rf "${BUILD_DIR}" || return 1 + +meson "${BUILD_DIR}" \ + --cross-file="$CROSS_FILE" \ + -Db_lto=true \ + -Db_ndebug=false \ + -Denable_asm=true \ + -Denable_tools=false \ + -Denable_examples=false \ + -Denable_tests=false || return 1 + +cd "${BUILD_DIR}" || return 1 + +ninja -j$(get_cpu_count) || return 1 + +ninja install || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp "${BUILD_DIR}"/meson-private/dav1d.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 diff --git a/scripts/linux/ffmpeg-kit.sh b/scripts/linux/ffmpeg-kit.sh new file mode 100755 index 0000000..9290687 --- /dev/null +++ b/scripts/linux/ffmpeg-kit.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# ENABLE COMMON FUNCTIONS +source "${BASEDIR}"/scripts/function-"${FFMPEG_KIT_BUILD_TYPE}".sh 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + +LIB_NAME="ffmpeg-kit" + +echo -e "----------------------------------------------------------------" 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "\nINFO: Building ${LIB_NAME} for ${HOST} with the following environment variables\n" 1>>"${BASEDIR}"/build.log 2>&1 +env 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "----------------------------------------------------------------\n" 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "INFO: System information\n" 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "INFO: $(uname -a)\n" 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "----------------------------------------------------------------\n" 1>>"${BASEDIR}"/build.log 2>&1 + +FFMPEG_KIT_LIBRARY_PATH="${LIB_INSTALL_BASE}/${LIB_NAME}" + +# SET PATHS +set_toolchain_paths "${LIB_NAME}" + +# SET BUILD FLAGS +HOST=$(get_host) +export CFLAGS="$(get_cflags ${LIB_NAME}) -I${LIB_INSTALL_BASE}/ffmpeg/include" +export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) +export LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${LIB_INSTALL_BASE}/ffmpeg/lib -lavdevice" +export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" + +cd "${BASEDIR}"/linux 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + +# ALWAYS BUILD SHARED LIBRARIES +BUILD_LIBRARY_OPTIONS="--enable-shared --disable-static" + +echo -n -e "\n${LIB_NAME}: " + +make distclean 2>/dev/null 1>/dev/null + +rm -f "${BASEDIR}"/linux/src/libffmpegkit* 1>>"${BASEDIR}"/build.log 2>&1 + +# ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS +autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + +./configure \ + --prefix="${FFMPEG_KIT_LIBRARY_PATH}" \ + --with-pic \ + ${BUILD_LIBRARY_OPTIONS} \ + --disable-fast-install \ + --disable-maintainer-mode \ + --host="${HOST}" 1>>"${BASEDIR}"/build.log 2>&1 + +# WORKAROUND FOR clang: warning: using sysroot for 'MacOSX' but targeting 'iPhone' +## ${SED_INLINE} "s|allow_undefined_flag -o|allow_undefined_flag -target $(get_target) -o|g" libtool 1>>"${BASEDIR}"/build.log 2>&1 +## ${SED_INLINE} 's|\$rpath/\\$soname|@rpath/ffmpegkit.framework/ffmpegkit|g' libtool 1>>"${BASEDIR}"/build.log 2>&1 + +if [ $? -ne 0 ]; then + echo -e "failed\n\nSee build.log for details\n" + exit 1 +fi + +# DELETE THE PREVIOUS BUILD OF THE LIBRARY +if [ -d "${FFMPEG_KIT_LIBRARY_PATH}" ]; then + rm -rf "${FFMPEG_KIT_LIBRARY_PATH}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +fi + +make -j$(get_cpu_count) 1>>"${BASEDIR}"/build.log 2>&1 + +make install 1>>"${BASEDIR}"/build.log 2>&1 + +if [ $? -eq 0 ]; then + echo "ok" +else + echo -e "failed\n\nSee build.log for details\n" + exit 1 +fi diff --git a/scripts/linux/ffmpeg.sh b/scripts/linux/ffmpeg.sh new file mode 100755 index 0000000..e330a1e --- /dev/null +++ b/scripts/linux/ffmpeg.sh @@ -0,0 +1,481 @@ +#!/bin/bash + +HOST_PKG_CONFIG_PATH=$(command -v pkg-config) +if [ -z "${HOST_PKG_CONFIG_PATH}" ]; then + echo -e "\n(*) pkg-config command not found\n" + exit 1 +fi + +LIB_NAME="ffmpeg" + +echo -e "----------------------------------------------------------------" 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "\nINFO: Building ${LIB_NAME} for ${HOST} with the following environment variables\n" 1>>"${BASEDIR}"/build.log 2>&1 +env 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "----------------------------------------------------------------\n" 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "INFO: System information\n" 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "INFO: $(uname -a)\n" 1>>"${BASEDIR}"/build.log 2>&1 +echo -e "----------------------------------------------------------------\n" 1>>"${BASEDIR}"/build.log 2>&1 + +FFMPEG_LIBRARY_PATH="${LIB_INSTALL_BASE}/${LIB_NAME}" + +# SET PATHS +set_toolchain_paths "${LIB_NAME}" + +# SET BUILD FLAGS +HOST=$(get_host) +export CFLAGS=$(get_cflags "${LIB_NAME}") +export CXXFLAGS=$(get_cxxflags "${LIB_NAME}") +export LDFLAGS=$(get_ldflags "${LIB_NAME}") +export PKG_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}:$(pkg-config --variable pc_path pkg-config)" + +echo -e "\nINFO: Using PKG_CONFIG_PATH: ${PKG_CONFIG_PATH}\n" 1>>"${BASEDIR}"/build.log 2>&1 + +cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + +# SET BUILD OPTIONS +TARGET_CPU="" +TARGET_ARCH="" +ASM_OPTIONS="" +case ${ARCH} in +x86-64) + TARGET_CPU="x86_64" + TARGET_ARCH="x86_64" + ASM_OPTIONS=" --disable-neon --enable-asm --enable-inline-asm" + ;; +esac + +CONFIGURE_POSTFIX="" +HIGH_PRIORITY_INCLUDES="" + +# SET CONFIGURE OPTIONS +for library in {0..92}; do + if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then + ENABLED_LIBRARY=$(get_library_name ${library}) + + echo -e "INFO: Enabling library ${ENABLED_LIBRARY}\n" 1>>"${BASEDIR}"/build.log 2>&1 + + case ${ENABLED_LIBRARY} in + linux-alsa) + CONFIGURE_POSTFIX+=" --enable-alsa" + ;; + linux-chromaprint) + CONFIGURE_POSTFIX+=" --enable-chromaprint" + ;; + linux-fontconfig) + CONFIGURE_POSTFIX+=" --enable-libfontconfig" + ;; + linux-freetype) + CONFIGURE_POSTFIX+=" --enable-libfreetype" + ;; + linux-fribidi) + CONFIGURE_POSTFIX+=" --enable-libfribidi" + ;; + linux-gmp) + CONFIGURE_POSTFIX+=" --enable-gmp" + ;; + linux-gnutls) + CONFIGURE_POSTFIX+=" --enable-gnutls" + ;; + linux-lame) + CONFIGURE_POSTFIX+=" --enable-libmp3lame" + ;; + linux-libass) + CONFIGURE_POSTFIX+=" --enable-libass" + ;; + linux-libiconv) + CONFIGURE_POSTFIX+=" --enable-iconv" + ;; + linux-libtheora) + CONFIGURE_POSTFIX+=" --enable-libtheora" + ;; + linux-libvidstab) + CONFIGURE_POSTFIX+=" --enable-libvidstab" + ;; + linux-libvorbis) + CONFIGURE_POSTFIX+=" --enable-libvorbis" + ;; + linux-libvpx) + CONFIGURE_POSTFIX+=" --enable-libvpx" + ;; + linux-libwebp) + CONFIGURE_POSTFIX+=" --enable-libwebp" + ;; + linux-libxml2) + CONFIGURE_POSTFIX+=" --enable-libxml2" + ;; + linux-opencl) + CONFIGURE_POSTFIX+=" --enable-opencl" + ;; + linux-opencore-amr) + CONFIGURE_POSTFIX+=" --enable-libopencore-amrnb" + ;; + linux-opus) + CONFIGURE_POSTFIX+=" --enable-libopus" + ;; + linux-rubberband) + CONFIGURE_POSTFIX+=" --enable-librubberband" + ;; + linux-sdl) + CONFIGURE_POSTFIX+=" --enable-sdl2" + ;; + linux-shine) + CONFIGURE_POSTFIX+=" --enable-libshine" + ;; + linux-snappy) + CONFIGURE_POSTFIX+=" --enable-libsnappy" + ;; + linux-soxr) + CONFIGURE_POSTFIX+=" --enable-libsoxr" + ;; + linux-speex) + CONFIGURE_POSTFIX+=" --enable-libspeex" + ;; + linux-tesseract) + CONFIGURE_POSTFIX+=" --enable-libtesseract" + ;; + linux-twolame) + CONFIGURE_POSTFIX+=" --enable-libtwolame" + ;; + linux-vaapi) + CONFIGURE_POSTFIX+=" --enable-vaapi" + ;; + linux-vo-amrwbenc) + CONFIGURE_POSTFIX+=" --enable-libvo-amrwbenc" + ;; + linux-v4l2) + CONFIGURE_POSTFIX+=" --enable-libv4l2" + ;; + linux-x265) + CONFIGURE_POSTFIX+=" --enable-libx265" + ;; + linux-xvidcore) + CONFIGURE_POSTFIX+=" --enable-libxvid" + ;; + linux-zlib) + CONFIGURE_POSTFIX+=" --enable-zlib" + ;; + dav1d) + CFLAGS+=" $(pkg-config --cflags dav1d 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static dav1d 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libdav1d" + ;; + kvazaar) + CFLAGS+=" $(pkg-config --cflags kvazaar 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static kvazaar 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libkvazaar" + ;; + libilbc) + CFLAGS+=" $(pkg-config --cflags libilbc 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static libilbc 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libilbc" + ;; + libaom) + CFLAGS+=" $(pkg-config --cflags aom 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static aom 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libaom" + ;; + openh264) + CFLAGS+=" $(pkg-config --cflags openh264 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static openh264 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libopenh264" + ;; + openssl) + CFLAGS+=" $(pkg-config --cflags openssl 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static openssl 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-openssl" + ;; + srt) + CFLAGS+=" $(pkg-config --cflags srt 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static srt 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libsrt" + ;; + x264) + CFLAGS+=" $(pkg-config --cflags x264 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static x264 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libx264" + ;; + zimg) + CFLAGS+=" $(pkg-config --cflags zimg 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static zimg 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libzimg" + ;; + esac + else + + # THE FOLLOWING LIBRARIES SHOULD BE EXPLICITLY DISABLED TO PREVENT AUTODETECT + # NOTE THAT IDS MUST BE +1 OF THE INDEX VALUE + if [[ ${library} -eq ${LIBRARY_LINUX_ALSA} ]]; then + CONFIGURE_POSTFIX+=" --disable-alsa" + elif [[ ${library} -eq ${LIBRARY_LINUX_CHROMAPRINT} ]]; then + CONFIGURE_POSTFIX+=" --disable-chromaprint" + elif [[ ${library} -eq ${LIBRARY_LINUX_FONTCONFIG} ]]; then + CONFIGURE_POSTFIX+=" --disable-libfontconfig" + elif [[ ${library} -eq ${LIBRARY_LINUX_FREETYPE} ]]; then + CONFIGURE_POSTFIX+=" --disable-libfreetype" + elif [[ ${library} -eq ${LIBRARY_LINUX_FRIBIDI} ]]; then + CONFIGURE_POSTFIX+=" --disable-libfribidi" + elif [[ ${library} -eq ${LIBRARY_LINUX_GMP} ]]; then + CONFIGURE_POSTFIX+=" --disable-gmp" + elif [[ ${library} -eq ${LIBRARY_LINUX_GNUTLS} ]]; then + CONFIGURE_POSTFIX+=" --disable-gnutls" + elif [[ ${library} -eq ${LIBRARY_LINUX_LAME} ]]; then + CONFIGURE_POSTFIX+=" --disable-libmp3lame" + elif [[ ${library} -eq ${LIBRARY_LINUX_LIBASS} ]]; then + CONFIGURE_POSTFIX+=" --disable-libass" + elif [[ ${library} -eq ${LIBRARY_LINUX_LIBICONV} ]]; then + CONFIGURE_POSTFIX+=" --disable-iconv" + elif [[ ${library} -eq ${LIBRARY_LINUX_LIBTHEORA} ]]; then + CONFIGURE_POSTFIX+=" --disable-libtheora" + elif [[ ${library} -eq ${LIBRARY_LINUX_LIBVIDSTAB} ]]; then + CONFIGURE_POSTFIX+=" --disable-libvidstab" + elif [[ ${library} -eq ${LIBRARY_LINUX_LIBVORBIS} ]]; then + CONFIGURE_POSTFIX+=" --disable-libvorbis" + elif [[ ${library} -eq ${LIBRARY_LINUX_LIBVPX} ]]; then + CONFIGURE_POSTFIX+=" --disable-libvpx" + elif [[ ${library} -eq ${LIBRARY_LINUX_LIBWEBP} ]]; then + CONFIGURE_POSTFIX+=" --disable-libwebp" + elif [[ ${library} -eq ${LIBRARY_LINUX_LIBXML2} ]]; then + CONFIGURE_POSTFIX+=" --disable-libxml2" + elif [[ ${library} -eq ${LIBRARY_LINUX_OPENCOREAMR} ]]; then + CONFIGURE_POSTFIX+=" --disable-libopencore-amrnb" + elif [[ ${library} -eq ${LIBRARY_LINUX_OPUS} ]]; then + CONFIGURE_POSTFIX+=" --disable-libopus" + elif [[ ${library} -eq ${LIBRARY_LINUX_RUBBERBAND} ]]; then + CONFIGURE_POSTFIX+=" --disable-librubberband" + elif [[ ${library} -eq ${LIBRARY_LINUX_SDL} ]]; then + CONFIGURE_POSTFIX+=" --disable-sdl2" + elif [[ ${library} -eq ${LIBRARY_LINUX_SHINE} ]]; then + CONFIGURE_POSTFIX+=" --disable-libshine" + elif [[ ${library} -eq ${LIBRARY_LINUX_SNAPPY} ]]; then + CONFIGURE_POSTFIX+=" --disable-libsnappy" + elif [[ ${library} -eq ${LIBRARY_LINUX_SOXR} ]]; then + CONFIGURE_POSTFIX+=" --disable-libsoxr" + elif [[ ${library} -eq ${LIBRARY_LINUX_SPEEX} ]]; then + CONFIGURE_POSTFIX+=" --disable-libspeex" + elif [[ ${library} -eq ${LIBRARY_LINUX_TESSERACT} ]]; then + CONFIGURE_POSTFIX+=" --disable-libtesseract" + elif [[ ${library} -eq ${LIBRARY_LINUX_TWOLAME} ]]; then + CONFIGURE_POSTFIX+=" --disable-libtwolame" + elif [[ ${library} -eq ${LIBRARY_LINUX_VO_AMRWBENC} ]]; then + CONFIGURE_POSTFIX+=" --disable-libvo-amrwbenc" + elif [[ ${library} -eq ${LIBRARY_LINUX_X265} ]]; then + CONFIGURE_POSTFIX+=" --disable-libx265" + elif [[ ${library} -eq ${LIBRARY_LINUX_XVIDCORE} ]]; then + CONFIGURE_POSTFIX+=" --disable-libxvid" + elif [[ ${library} -eq ${LIBRARY_SYSTEM_ZLIB} ]]; then + CONFIGURE_POSTFIX+=" --disable-zlib" + elif [[ ${library} -eq ${LIBRARY_DAV1D} ]]; then + CONFIGURE_POSTFIX+=" --disable-libdav1d" + elif [[ ${library} -eq ${LIBRARY_KVAZAAR} ]]; then + CONFIGURE_POSTFIX+=" --disable-libkvazaar" + elif [[ ${library} -eq ${LIBRARY_LIBILBC} ]]; then + CONFIGURE_POSTFIX+=" --disable-libilbc" + elif [[ ${library} -eq ${LIBRARY_LIBAOM} ]]; then + CONFIGURE_POSTFIX+=" --disable-libaom" + elif [[ ${library} -eq ${LIBRARY_OPENH264} ]]; then + CONFIGURE_POSTFIX+=" --disable-libopenh264" + elif [[ ${library} -eq ${LIBRARY_OPENSSL} ]]; then + CONFIGURE_POSTFIX+=" --disable-openssl" + elif [[ ${library} -eq ${LIBRARY_SRT} ]]; then + CONFIGURE_POSTFIX+=" --disable-libsrt" + elif [[ ${library} -eq ${LIBRARY_X264} ]]; then + CONFIGURE_POSTFIX+=" --disable-libx264" + elif [[ ${library} -eq ${LIBRARY_ZIMG} ]]; then + CONFIGURE_POSTFIX+=" --disable-libzimg" + fi + fi +done + +# SET CONFIGURE OPTIONS FOR CUSTOM LIBRARIES +for custom_library_index in "${CUSTOM_LIBRARIES[@]}"; do + library_name="CUSTOM_LIBRARY_${custom_library_index}_NAME" + pc_file_name="CUSTOM_LIBRARY_${custom_library_index}_PACKAGE_CONFIG_FILE_NAME" + ffmpeg_flag_name="CUSTOM_LIBRARY_${custom_library_index}_FFMPEG_ENABLE_FLAG" + + echo -e "INFO: Enabling custom library ${!library_name}\n" 1>>"${BASEDIR}"/build.log 2>&1 + + CFLAGS+=" $(pkg-config --cflags ${!pc_file_name} 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static ${!pc_file_name} 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-${!ffmpeg_flag_name}" +done + +# SET ENABLE GPL FLAG WHEN REQUESTED +if [ "$GPL_ENABLED" == "yes" ]; then + CONFIGURE_POSTFIX+=" --enable-gpl" +fi + +# ALWAYS BUILD SHARED LIBRARIES +BUILD_LIBRARY_OPTIONS="--disable-static --enable-shared" + +# OPTIMIZE FOR SPEED INSTEAD OF SIZE +if [[ -z ${FFMPEG_KIT_OPTIMIZED_FOR_SPEED} ]]; then + SIZE_OPTIONS="--enable-small" +else + SIZE_OPTIONS="" +fi + +# SET DEBUG OPTIONS +if [[ -z ${FFMPEG_KIT_DEBUG} ]]; then + + # SET LTO FLAGS + if [[ -z ${NO_LINK_TIME_OPTIMIZATION} ]]; then + DEBUG_OPTIONS="--disable-debug --enable-lto" + else + DEBUG_OPTIONS="--disable-debug --disable-lto" + fi +else + DEBUG_OPTIONS="--enable-debug --disable-stripping" +fi + +echo -n -e "\n${LIB_NAME}: " + +if [[ -z ${NO_WORKSPACE_CLEANUP_ffmpeg} ]]; then + echo -e "INFO: Cleaning workspace for ${LIB_NAME}\n" 1>>"${BASEDIR}"/build.log 2>&1 + make distclean 2>/dev/null 1>/dev/null + + # WORKAROUND TO MANUALLY DELETE UNCLEANED FILES + rm -f "${BASEDIR}"/src/"${LIB_NAME}"/libavfilter/opencl/*.o 1>>"${BASEDIR}"/build.log 2>&1 + rm -f "${BASEDIR}"/src/"${LIB_NAME}"/libavcodec/neon/*.o 1>>"${BASEDIR}"/build.log 2>&1 + + # DELETE SHARED FRAMEWORK WORKAROUNDS + git checkout "${BASEDIR}/src/ffmpeg/ffbuild" 1>>"${BASEDIR}"/build.log 2>&1 +fi + +# USE HIGHER LIMITS FOR FFMPEG LINKING +ulimit -n 2048 1>>"${BASEDIR}"/build.log 2>&1 + +########################### CUSTOMIZATIONS ####################### +cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +git checkout libavformat/file.c 1>>"${BASEDIR}"/build.log 2>&1 +git checkout libavformat/protocols.c 1>>"${BASEDIR}"/build.log 2>&1 +git checkout libavutil 1>>"${BASEDIR}"/build.log 2>&1 + +# 1. Use thread local log levels +${SED_INLINE} 's/static int av_log_level/__thread int av_log_level/g' "${BASEDIR}"/src/"${LIB_NAME}"/libavutil/log.c 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + +# 2. Set friendly ffmpeg version +FFMPEG_VERSION="v$(get_user_friendly_ffmpeg_version)" +${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffbuild/version.sh 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + +################################################################### + +./configure \ + --cross-prefix="${HOST}-" \ + --prefix="${FFMPEG_LIBRARY_PATH}" \ + --pkg-config="${HOST_PKG_CONFIG_PATH}" \ + --enable-version3 \ + --arch="${TARGET_ARCH}" \ + --cpu="${TARGET_CPU}" \ + --target-os=linux \ + ${ASM_OPTIONS} \ + --ar="${AR}" \ + --cc="${CC}" \ + --cxx="${CXX}" \ + --ranlib="${RANLIB}" \ + --strip="${STRIP}" \ + --nm="${NM}" \ + --disable-autodetect \ + --enable-cross-compile \ + --enable-pic \ + --enable-optimizations \ + --enable-swscale \ + ${BUILD_LIBRARY_OPTIONS} \ + --enable-pthreads \ + --enable-v4l2-m2m \ + --disable-outdev=fbdev \ + --disable-indev=fbdev \ + ${SIZE_OPTIONS} \ + --disable-xmm-clobber-test \ + ${DEBUG_OPTIONS} \ + --disable-neon-clobber-test \ + --disable-programs \ + --disable-postproc \ + --disable-doc \ + --disable-htmlpages \ + --disable-manpages \ + --disable-podpages \ + --disable-txtpages \ + --disable-sndio \ + --disable-schannel \ + --disable-securetransport \ + --disable-xlib \ + --disable-cuda \ + --disable-cuvid \ + --disable-nvenc \ + --disable-vaapi \ + --disable-vdpau \ + --disable-videotoolbox \ + --disable-audiotoolbox \ + --disable-appkit \ + --disable-cuda \ + --disable-cuvid \ + --disable-nvenc \ + --disable-vaapi \ + --disable-vdpau \ + ${CONFIGURE_POSTFIX} 1>>"${BASEDIR}"/build.log 2>&1 + +if [[ $? -ne 0 ]]; then + echo -e "failed\n\nSee build.log for details\n" + exit 1 +fi + +if [[ -z ${NO_OUTPUT_REDIRECTION} ]]; then + make -j$(get_cpu_count) 1>>"${BASEDIR}"/build.log 2>&1 + + if [[ $? -ne 0 ]]; then + echo -e "failed\n\nSee build.log for details\n" + exit 1 + fi +else + echo -e "started\n" + make -j$(get_cpu_count) + + if [[ $? -ne 0 ]]; then + echo -n -e "\n${LIB_NAME}: failed\n\nSee build.log for details\n" + exit 1 + else + echo -n -e "\n${LIB_NAME}: " + fi +fi + +# DELETE THE PREVIOUS BUILD OF THE LIBRARY BEFORE INSTALLING +if [ -d "${FFMPEG_LIBRARY_PATH}" ]; then + rm -rf "${FFMPEG_LIBRARY_PATH}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +fi +make install 1>>"${BASEDIR}"/build.log 2>&1 + +if [[ $? -ne 0 ]]; then + echo -e "failed\n\nSee build.log for details\n" + exit 1 +fi + +# MANUALLY ADD REQUIRED HEADERS +mkdir -p "${FFMPEG_LIBRARY_PATH}"/include/libavutil/x86 1>>"${BASEDIR}"/build.log 2>&1 +mkdir -p "${FFMPEG_LIBRARY_PATH}"/include/libavutil/arm 1>>"${BASEDIR}"/build.log 2>&1 +mkdir -p "${FFMPEG_LIBRARY_PATH}"/include/libavutil/aarch64 1>>"${BASEDIR}"/build.log 2>&1 +mkdir -p "${FFMPEG_LIBRARY_PATH}"/include/libavcodec/x86 1>>"${BASEDIR}"/build.log 2>&1 +mkdir -p "${FFMPEG_LIBRARY_PATH}"/include/libavcodec/arm 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/config.h "${FFMPEG_LIBRARY_PATH}"/include/config.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavcodec/mathops.h "${FFMPEG_LIBRARY_PATH}"/include/libavcodec/mathops.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavcodec/x86/mathops.h "${FFMPEG_LIBRARY_PATH}"/include/libavcodec/x86/mathops.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavcodec/arm/mathops.h "${FFMPEG_LIBRARY_PATH}"/include/libavcodec/arm/mathops.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavformat/network.h "${FFMPEG_LIBRARY_PATH}"/include/libavformat/network.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavformat/os_support.h "${FFMPEG_LIBRARY_PATH}"/include/libavformat/os_support.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavformat/url.h "${FFMPEG_LIBRARY_PATH}"/include/libavformat/url.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/internal.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/internal.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/libm.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/libm.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/reverse.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/reverse.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/thread.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/thread.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/timer.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/timer.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/x86/asm.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/x86/asm.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/x86/timer.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/x86/timer.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/arm/timer.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/arm/timer.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/aarch64/timer.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/aarch64/timer.h 1>>"${BASEDIR}"/build.log 2>&1 +overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/x86/emms.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/x86/emms.h 1>>"${BASEDIR}"/build.log 2>&1 + +if [ $? -eq 0 ]; then + echo "ok" +else + echo -e "failed\n\nSee build.log for details\n" + exit 1 +fi diff --git a/scripts/linux/kvazaar.sh b/scripts/linux/kvazaar.sh new file mode 100755 index 0000000..bd97753 --- /dev/null +++ b/scripts/linux/kvazaar.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_kvazaar} -eq 1 ]]; then + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +fi + +# WORKAROUND TO DISABLE LINKING TO -lrt +## ${SED_INLINE} 's/\-lrt//g' "${BASEDIR}"/src/"${LIB_NAME}"/configure || return 1 + +./configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + --with-pic \ + --enable-static \ + --disable-shared \ + --disable-fast-install \ + --host="${HOST}" || return 1 + +# NOTE THAT kvazaar DOES NOT SUPPORT PARALLEL EXECUTION +make || return 1 + +make install || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp ./src/kvazaar.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 diff --git a/scripts/linux/libaom.sh b/scripts/linux/libaom.sh new file mode 100755 index 0000000..8d6419c --- /dev/null +++ b/scripts/linux/libaom.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# DISABLE ASM WORKAROUNDS BEFORE APPLYING THEM AGAIN +git checkout ${BASEDIR}/src/${LIB_NAME}/aom_ports 1>>"${BASEDIR}"/build.log 2>&1 + +# SET BUILD OPTIONS +ASM_OPTIONS="" +case ${ARCH} in +x86-64) + ASM_OPTIONS="-DENABLE_SSE4_2=1 -DHAVE_SSE4_2=1" + ;; +esac + +mkdir -p "${BUILD_DIR}" || return 1 +cd "${BUILD_DIR}" || return 1 + +cmake -Wno-dev \ + -DCMAKE_VERBOSE_MAKEFILE=0 \ + -DCONFIG_PIC=1 \ + -DCMAKE_C_FLAGS="${CFLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ + -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \ + -DCMAKE_CXX_COMPILER="$CXX" \ + -DCMAKE_C_COMPILER="$CC" \ + -DCMAKE_LINKER="$LD" \ + -DCMAKE_AR="$AR" \ + -DCMAKE_AS="$AS" \ + -DCMAKE_POSITION_INDEPENDENT_CODE=1 \ + ${ASM_OPTIONS} \ + -DENABLE_TESTS=0 \ + -DENABLE_EXAMPLES=0 \ + -DENABLE_TOOLS=0 \ + -DCONFIG_UNIT_TESTS=0 \ + -DAOM_TARGET_CPU=generic \ + -DBUILD_SHARED_LIBS=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# CREATE PACKAGE CONFIG MANUALLY +create_libaom_package_config "3.2.0" || return 1 diff --git a/scripts/linux/libilbc.sh b/scripts/linux/libilbc.sh new file mode 100755 index 0000000..beeaa91 --- /dev/null +++ b/scripts/linux/libilbc.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libilbc} -eq 1 ]]; then + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +fi + +./configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + --with-pic \ + --enable-static \ + --disable-shared \ + --disable-fast-install \ + --host="${HOST}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp ./libilbc.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 diff --git a/scripts/linux/openh264.sh b/scripts/linux/openh264.sh new file mode 100755 index 0000000..6a8682e --- /dev/null +++ b/scripts/linux/openh264.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# SET BUILD OPTIONS +case ${ARCH} in +x86-64) + ASM_OPTIONS=x86 + CFLAGS+=" -DHAVE_AVX2" + ;; +esac + +# ALWAYS CLEAN THE PREVIOUS BUILD +make clean 2>/dev/null 1>/dev/null + +# DISCARD APPLE WORKAROUNDS +git checkout "${BASEDIR}"/src/"${LIB_NAME}"/build || return 1 +git checkout "${BASEDIR}"/src/"${LIB_NAME}"/codec || return 1 + +make -j$(get_cpu_count) \ + ARCH="$(get_target_cpu)" \ + AR="${AR}" \ + CC="${CC}" \ + CFLAGS="$CFLAGS" \ + CXX="${CXX}" \ + CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + OS=linux \ + PREFIX="${LIB_INSTALL_PREFIX}" \ + ASM_OPTIONS=${ASM_OPTIONS} \ + install-static || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp "${BASEDIR}"/src/"${LIB_NAME}"/openh264-static.pc "${INSTALL_PKG_CONFIG_DIR}"/openh264.pc || return 1 diff --git a/scripts/linux/openssl.sh b/scripts/linux/openssl.sh new file mode 100755 index 0000000..a36fa64 --- /dev/null +++ b/scripts/linux/openssl.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# SET BUILD OPTIONS +ASM_OPTIONS="" +case ${ARCH} in +x86-64) + ASM_OPTIONS="linux-x86_64 enable-ec_nistp_64_gcc_128" + ;; +esac + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_openssl} -eq 1 ]]; then + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +fi + +INT128_AVAILABLE=$($CC -dM -E - >"${BASEDIR}"/build.log | grep __SIZEOF_INT128__) + +echo -e "INFO: __uint128_t detection output: $INT128_AVAILABLE\n" 1>>"${BASEDIR}"/build.log 2>&1 + +./Configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + zlib \ + no-shared \ + no-engine \ + no-dso \ + no-legacy \ + ${ASM_OPTIONS} \ + no-tests || return 1 + +make -j$(get_cpu_count) build_sw || return 1 + +make install_sw install_ssldirs || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp ./*.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 diff --git a/scripts/linux/srt.sh b/scripts/linux/srt.sh new file mode 100755 index 0000000..d1c8b19 --- /dev/null +++ b/scripts/linux/srt.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# ALWAYS CLEAN THE PREVIOUS BUILD +git clean -dfx 2>/dev/null 1>/dev/null + +# OVERRIDE SYSTEM PROCESSOR +SYSTEM_PROCESSOR="" +case ${ARCH} in +x86-64) + SYSTEM_PROCESSOR="x86_64" + ;; +esac + +# WORKAROUND TO GENERATE BASE BUILD FILES +./configure || echo "" 2>/dev/null 1>/dev/null + +cmake -Wno-dev \ + -DUSE_ENCLIB=openssl \ + -DCMAKE_VERBOSE_MAKEFILE=0 \ + -DCMAKE_C_FLAGS="${CFLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ + -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_CXX_COMPILER="$CXX" \ + -DCMAKE_C_COMPILER="$CC" \ + -DCMAKE_LINKER="$LD" \ + -DCMAKE_AR="$AR" \ + -DCMAKE_AS="$AS" \ + -DCMAKE_SYSTEM_LOADED=1 \ + -DCMAKE_SYSTEM_PROCESSOR="${SYSTEM_PROCESSOR}" \ + -DENABLE_STDCXX_SYNC=1 \ + -DENABLE_MONOTONIC_CLOCK=1 \ + -DENABLE_STDCXX_SYNC=1 \ + -DENABLE_CXX11=1 \ + -DUSE_OPENSSL_PC=1 \ + -DENABLE_DEBUG=0 \ + -DENABLE_LOGGING=0 \ + -DENABLE_HEAVY_LOGGING=0 \ + -DENABLE_APPS=0 \ + -DENABLE_SHARED=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# CREATE PACKAGE CONFIG MANUALLY +create_srt_package_config "1.4.4" || return 1 \ No newline at end of file diff --git a/scripts/linux/x264.sh b/scripts/linux/x264.sh new file mode 100755 index 0000000..6315342 --- /dev/null +++ b/scripts/linux/x264.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# SET BUILD OPTIONS +ASM_OPTIONS="" +DEBUG_OPTIONS="" +case ${ARCH} in +x86-64) + if ! [ -x "$(command -v nasm)" ]; then + echo -e "\n(*) nasm command not found\n" + return 1 + fi + + export AS="$(command -v nasm)" + ;; +esac +if [[ -n ${FFMPEG_KIT_DEBUG} ]]; then + DEBUG_OPTIONS="--enable-debug" +fi + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_x264} -eq 1 ]]; then + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +fi + +./configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + --enable-pic \ + --enable-static \ + --disable-cli \ + ${ASM_OPTIONS} \ + ${DEBUG_OPTIONS} \ + --host="${HOST}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp x264.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 diff --git a/scripts/linux/zimg.sh b/scripts/linux/zimg.sh new file mode 100755 index 0000000..4fc6d30 --- /dev/null +++ b/scripts/linux/zimg.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_zimg} -eq 1 ]]; then + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +fi + +./configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + --with-pic \ + --enable-static \ + --disable-shared \ + --disable-fast-install \ + --host="${HOST}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# CREATE PACKAGE CONFIG MANUALLY +create_zimg_package_config "3.0.3" || return 1 diff --git a/scripts/main-linux.sh b/scripts/main-linux.sh new file mode 100755 index 0000000..7a8a1e2 --- /dev/null +++ b/scripts/main-linux.sh @@ -0,0 +1,168 @@ +#!/bin/bash + +if [[ -z ${ARCH} ]]; then + echo -e "\n(*) ARCH not defined\n" + exit 1 +fi + +if [[ -z ${BASEDIR} ]]; then + echo -e "\n(*) BASEDIR not defined\n" + exit 1 +fi + +echo -e "\nBuilding ${ARCH} platform\n" +echo -e "\nINFO: Starting new build for ${ARCH} at $(date)\n" 1>>"${BASEDIR}"/build.log 2>&1 + +# SET BASE INSTALLATION DIRECTORY FOR THIS ARCHITECTURE +export LIB_INSTALL_BASE="${BASEDIR}/prebuilt/$(get_build_directory)" + +# CREATE PACKAGE CONFIG DIRECTORY FOR THIS ARCHITECTURE +PKG_CONFIG_DIRECTORY="${LIB_INSTALL_BASE}/pkgconfig" +if [ ! -d "${PKG_CONFIG_DIRECTORY}" ]; then + mkdir -p "${PKG_CONFIG_DIRECTORY}" || return 1 +fi + +# FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT +# NOTE THAT BUILT-IN LIBRARIES ARE FORWARDED TO FFMPEG SCRIPT WITHOUT ANY PROCESSING +enabled_library_list=() +for library in {1..50}; do + if [[ ${!library} -eq 1 ]]; then + ENABLED_LIBRARY=$(get_library_name $((library - 1))) + enabled_library_list+=(${ENABLED_LIBRARY}) + + echo -e "INFO: Enabled library ${ENABLED_LIBRARY} will be built\n" 1>>"${BASEDIR}"/build.log 2>&1 + fi +done + +# BUILD ENABLED LIBRARIES AND THEIR DEPENDENCIES +let completed=0 +while [ ${#enabled_library_list[@]} -gt $completed ]; do + for library in "${enabled_library_list[@]}"; do + let run=0 + case $library in + srt) + if [[ $OK_openssl -eq 1 ]]; then + run=1 + fi + ;; + *) + run=1 + ;; + esac + + # DEFINE SOME FLAGS TO MANAGE DEPENDENCIES AND REBUILD OPTIONS + BUILD_COMPLETED_FLAG=$(echo "OK_${library}" | sed "s/\-/\_/g") + REBUILD_FLAG=$(echo "REBUILD_${library}" | sed "s/\-/\_/g") + DEPENDENCY_REBUILT_FLAG=$(echo "DEPENDENCY_REBUILT_${library}" | sed "s/\-/\_/g") + + if [[ $run -eq 1 ]] && [[ "${!BUILD_COMPLETED_FLAG}" != "1" ]]; then + LIBRARY_IS_INSTALLED=$(library_is_installed "${LIB_INSTALL_BASE}" "${library}") + + echo -e "INFO: Flags detected for ${library}: already installed=${LIBRARY_IS_INSTALLED}, rebuild requested by user=${!REBUILD_FLAG}, will be rebuilt due to dependency update=${!DEPENDENCY_REBUILT_FLAG}\n" 1>>"${BASEDIR}"/build.log 2>&1 + + # CHECK IF BUILD IS NECESSARY OR NOT + if [[ ${LIBRARY_IS_INSTALLED} -ne 1 ]] || [[ ${!REBUILD_FLAG} -eq 1 ]] || [[ ${!DEPENDENCY_REBUILT_FLAG} -eq 1 ]]; then + + echo -n "${library}: " + + "${BASEDIR}"/scripts/run-linux.sh "${library}" 1>>"${BASEDIR}"/build.log 2>&1 + + RC=$? + + # SET SOME FLAGS AFTER THE BUILD + if [ $RC -eq 0 ]; then + ((completed += 1)) + declare "$BUILD_COMPLETED_FLAG=1" + check_if_dependency_rebuilt "${library}" + echo "ok" + elif [ $RC -eq 200 ]; then + echo -e "not supported\n\nSee build.log for details\n" + exit 1 + else + echo -e "failed\n\nSee build.log for details\n" + exit 1 + fi + else + ((completed += 1)) + declare "$BUILD_COMPLETED_FLAG=1" + echo "${library}: already built" + fi + else + echo -e "INFO: Skipping $library, dependencies built=$run, already built=${!BUILD_COMPLETED_FLAG}\n" 1>>"${BASEDIR}"/build.log 2>&1 + fi + done +done + +# BUILD CUSTOM LIBRARIES +for custom_library_index in "${CUSTOM_LIBRARIES[@]}"; do + library_name="CUSTOM_LIBRARY_${custom_library_index}_NAME" + + echo -e "\nDEBUG: Custom library ${!library_name} will be built\n" 1>>"${BASEDIR}"/build.log 2>&1 + + # DEFINE SOME FLAGS TO REBUILD OPTIONS + REBUILD_FLAG=$(echo "REBUILD_${!library_name}" | sed "s/\-/\_/g") + LIBRARY_IS_INSTALLED=$(library_is_installed "${LIB_INSTALL_BASE}" "${!library_name}") + + echo -e "INFO: Flags detected for custom library ${!library_name}: already installed=${LIBRARY_IS_INSTALLED}, rebuild requested by user=${!REBUILD_FLAG}\n" 1>>"${BASEDIR}"/build.log 2>&1 + + if [[ ${LIBRARY_IS_INSTALLED} -ne 1 ]] || [[ ${!REBUILD_FLAG} -eq 1 ]]; then + + echo -n "${!library_name}: " + + "${BASEDIR}"/scripts/run-linux.sh "${!library_name}" 1>>"${BASEDIR}"/build.log 2>&1 + + RC=$? + + # SET SOME FLAGS AFTER THE BUILD + if [ $RC -eq 0 ]; then + echo "ok" + elif [ $RC -eq 200 ]; then + echo -e "not supported\n\nSee build.log for details\n" + exit 1 + else + echo -e "failed\n\nSee build.log for details\n" + exit 1 + fi + else + echo "${!library_name}: already built" + fi +done + +# SKIP TO SPEED UP THE BUILD +if [[ ${SKIP_ffmpeg} -ne 1 ]]; then + + # PREPARE PATHS & DEFINE ${INSTALL_PKG_CONFIG_DIR} + LIB_NAME="ffmpeg" + set_toolchain_paths "${LIB_NAME}" + + # SET BUILD FLAGS + HOST=$(get_host) + export CFLAGS=$(get_cflags "${LIB_NAME}") + export CXXFLAGS=$(get_cxxflags "${LIB_NAME}") + export LDFLAGS=$(get_ldflags "${LIB_NAME}") + export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" + + cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + + LIB_INSTALL_PREFIX="${LIB_INSTALL_BASE}/${LIB_NAME}" + + # BUILD FFMPEG + source "${BASEDIR}"/scripts/linux/ffmpeg.sh + + if [[ $? -ne 0 ]]; then + exit 1 + fi +else + echo -e "\nffmpeg: skipped" +fi + +# SKIP TO SPEED UP THE BUILD +if [[ ${SKIP_ffmpeg_kit} -ne 1 ]]; then + + # BUILD FFMPEG KIT + . "${BASEDIR}"/scripts/linux/ffmpeg-kit.sh "$@" || return 1 +else + echo -e "\nffmpeg-kit: skipped" +fi + +echo -e "\nINFO: Completed build for ${ARCH} at $(date)\n" 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/scripts/run-linux.sh b/scripts/run-linux.sh new file mode 100755 index 0000000..b22eea0 --- /dev/null +++ b/scripts/run-linux.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# ENABLE COMMON FUNCTIONS +source "${BASEDIR}"/scripts/function-"${FFMPEG_KIT_BUILD_TYPE}".sh || return 1 + +LIB_NAME=$1 +ENABLED_LIBRARY_PATH="${LIB_INSTALL_BASE}/${LIB_NAME}" + +# DELETE THE PREVIOUS BUILD OF THE LIBRARY +if [ -d "${ENABLED_LIBRARY_PATH}" ]; then + rm -rf "${ENABLED_LIBRARY_PATH}" || return 1 +fi + +# PREPARE PATHS & DEFINE ${INSTALL_PKG_CONFIG_DIR} +SCRIPT_PATH="${BASEDIR}/scripts/linux/${LIB_NAME}.sh" +set_toolchain_paths "${LIB_NAME}" + +# SET BUILD FLAGS +HOST=$(get_host) +export CFLAGS=$(get_cflags "${LIB_NAME}") +export CXXFLAGS=$(get_cxxflags "${LIB_NAME}") +export LDFLAGS=$(get_ldflags "${LIB_NAME}") +export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" + +cd "${BASEDIR}"/src/"${LIB_NAME}" || return 1 + +LIB_INSTALL_PREFIX="${ENABLED_LIBRARY_PATH}" +BUILD_DIR=$(get_cmake_build_directory) + +echo -e "----------------------------------------------------------------" +echo -e "\nINFO: Building ${LIB_NAME} for ${HOST} with the following environment variables\n" +env +echo -e "----------------------------------------------------------------\n" +echo -e "INFO: System information\n" +echo -e "INFO: $(uname -a)\n" +echo -e "----------------------------------------------------------------\n" + +rm -rf "${LIB_INSTALL_PREFIX}" || return 1 +rm -rf "${BUILD_DIR}" || return 1 + +# EXECUTE BUILD SCRIPT OF EACH ENABLED LIBRARY +source "${SCRIPT_PATH}" diff --git a/scripts/variable.sh b/scripts/variable.sh index 70c2a92..9709232 100755 --- a/scripts/variable.sh +++ b/scripts/variable.sh @@ -10,7 +10,7 @@ ENABLED_ARCHITECTURES=(0 0 0 0 0 0 0 0 0 0 0 0 0) ENABLED_ARCHITECTURE_VARIANTS=(0 0 0 0 0 0 0 0) # ARRAY OF ENABLED LIBRARIES -ENABLED_LIBRARIES=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) +ENABLED_LIBRARIES=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) # ARRAY OF LIBRARIES THAT WILL BE RE-CONFIGURED RECONF_LIBRARIES=() @@ -34,7 +34,7 @@ ARCH_ARM64=5 # ios, tvos, macos ARCH_ARM64E=6 # ios ARCH_I386=7 # ios ARCH_X86=8 # android -ARCH_X86_64=9 # android, ios, macos, tvos +ARCH_X86_64=9 # android, ios, linux, macos, tvos ARCH_X86_64_MAC_CATALYST=10 # ios ARCH_ARM64_MAC_CATALYST=11 # ios ARCH_ARM64_SIMULATOR=12 # ios @@ -100,9 +100,9 @@ LIBRARY_LEPTONICA=46 LIBRARY_LIBSAMPLERATE=47 LIBRARY_HARFBUZZ=48 LIBRARY_CPU_FEATURES=49 -LIBRARY_ANDROID_ZLIB=50 -LIBRARY_ANDROID_MEDIA_CODEC=51 -LIBRARY_APPLE_ZLIB=52 +LIBRARY_SYSTEM_ZLIB=50 +LIBRARY_LINUX_ALSA=51 +LIBRARY_ANDROID_MEDIA_CODEC=52 LIBRARY_APPLE_AUDIOTOOLBOX=53 LIBRARY_APPLE_BZIP2=54 LIBRARY_APPLE_VIDEOTOOLBOX=55 @@ -112,3 +112,34 @@ LIBRARY_APPLE_LIBUUID=58 LIBRARY_APPLE_COREIMAGE=59 LIBRARY_APPLE_OPENCL=60 LIBRARY_APPLE_OPENGL=61 +LIBRARY_LINUX_FONTCONFIG=62 +LIBRARY_LINUX_FREETYPE=63 +LIBRARY_LINUX_FRIBIDI=64 +LIBRARY_LINUX_GMP=65 +LIBRARY_LINUX_GNUTLS=66 +LIBRARY_LINUX_LAME=67 +LIBRARY_LINUX_LIBASS=68 +LIBRARY_LINUX_LIBICONV=69 +LIBRARY_LINUX_LIBTHEORA=70 +LIBRARY_LINUX_LIBVORBIS=71 +LIBRARY_LINUX_LIBVPX=72 +LIBRARY_LINUX_LIBWEBP=73 +LIBRARY_LINUX_LIBXML2=74 +LIBRARY_LINUX_OPENCOREAMR=75 +LIBRARY_LINUX_SHINE=76 +LIBRARY_LINUX_SPEEX=77 +LIBRARY_LINUX_OPENCL=78 +LIBRARY_LINUX_XVIDCORE=79 +LIBRARY_LINUX_X265=80 +LIBRARY_LINUX_LIBVIDSTAB=81 +LIBRARY_LINUX_RUBBERBAND=82 +LIBRARY_LINUX_V4L2=83 +LIBRARY_LINUX_OPUS=84 +LIBRARY_LINUX_SNAPPY=85 +LIBRARY_LINUX_SOXR=86 +LIBRARY_LINUX_CHROMAPRINT=87 +LIBRARY_LINUX_TWOLAME=88 +LIBRARY_LINUX_SDL=89 +LIBRARY_LINUX_TESSERACT=90 +LIBRARY_LINUX_VAAPI=91 +LIBRARY_LINUX_VO_AMRWBENC=92 From ba2b668c844f947437fd2d2cf2de652c33c05a9e Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Fri, 3 Jun 2022 13:38:29 +0100 Subject: [PATCH 2/7] implement linux api --- linux.sh | 3 + linux/.gitignore | 12 + linux/Doxyfile | 2616 ++ linux/Makefile.am | 3 + linux/Makefile.in | 802 + linux/aclocal.m4 | 1236 + linux/ar-lib | 270 + linux/autogen.sh | 3 + linux/compile | 348 + linux/config.guess | 1480 ++ linux/config.sub | 1801 ++ linux/configure | 19775 ++++++++++++++++ linux/configure.ac | 57 + linux/depcomp | 791 + linux/install-sh | 518 + linux/libtool | 11911 ++++++++++ linux/ltmain.sh | 11251 +++++++++ linux/m4/libtool.m4 | 8394 +++++++ linux/m4/ltoptions.m4 | 437 + linux/m4/ltsugar.m4 | 124 + linux/m4/ltversion.m4 | 23 + linux/m4/lt~obsolete.m4 | 99 + linux/missing | 215 + linux/src/.gitignore | 6 + linux/src/AbstractSession.cpp | 203 + linux/src/AbstractSession.h | 287 + linux/src/ArchDetect.cpp | 36 + linux/src/ArchDetect.h | 43 + linux/src/Chapter.cpp | 73 + linux/src/Chapter.h | 93 + linux/src/FFmpegKit.cpp | 81 + linux/src/FFmpegKit.h | 146 + linux/src/FFmpegKitConfig.cpp | 1368 ++ linux/src/FFmpegKitConfig.h | 432 + linux/src/FFmpegSession.cpp | 89 + linux/src/FFmpegSession.h | 157 + linux/src/FFmpegSessionCompleteCallback.h | 57 + linux/src/FFprobeKit.cpp | 120 + linux/src/FFprobeKit.h | 189 + linux/src/FFprobeSession.cpp | 54 + linux/src/FFprobeSession.h | 102 + linux/src/FFprobeSessionCompleteCallback.h | 57 + linux/src/Level.h | 89 + linux/src/Log.cpp | 35 + linux/src/Log.h | 46 + linux/src/LogCallback.h | 38 + linux/src/LogRedirectionStrategy.h | 35 + linux/src/Makefile.am | 64 + linux/src/Makefile.in | 1057 + linux/src/MediaInformation.cpp | 92 + linux/src/MediaInformation.h | 160 + linux/src/MediaInformationJsonParser.cpp | 76 + linux/src/MediaInformationJsonParser.h | 55 + linux/src/MediaInformationSession.cpp | 58 + linux/src/MediaInformationSession.h | 110 + .../MediaInformationSessionCompleteCallback.h | 58 + linux/src/Packages.cpp | 251 + linux/src/Packages.h | 53 + linux/src/ReturnCode.cpp | 51 + linux/src/ReturnCode.h | 48 + linux/src/Session.h | 260 + linux/src/SessionState.h | 34 + linux/src/Signal.h | 35 + linux/src/Statistics.cpp | 56 + linux/src/Statistics.h | 56 + linux/src/StatisticsCallback.h | 38 + linux/src/StreamInformation.cpp | 117 + linux/src/StreamInformation.h | 215 + linux/src/ffmpegkit_exception.cpp | 23 + linux/src/ffmpegkit_exception.h | 29 + linux/src/fftools_cmdutils.c | 2429 ++ linux/src/fftools_cmdutils.h | 641 + linux/src/fftools_ffmpeg.c | 5736 +++++ linux/src/fftools_ffmpeg.h | 791 + linux/src/fftools_ffmpeg_filter.c | 1167 + linux/src/fftools_ffmpeg_hw.c | 572 + linux/src/fftools_ffmpeg_opt.c | 3493 +++ linux/src/fftools_ffprobe.c | 3964 ++++ scripts/function-linux.sh | 35 +- scripts/function.sh | 40 +- scripts/linux/ffmpeg-kit.sh | 8 +- scripts/source.sh | 5 + 82 files changed, 87860 insertions(+), 22 deletions(-) create mode 100644 linux/.gitignore create mode 100644 linux/Doxyfile create mode 100644 linux/Makefile.am create mode 100644 linux/Makefile.in create mode 100644 linux/aclocal.m4 create mode 100755 linux/ar-lib create mode 100755 linux/autogen.sh create mode 100755 linux/compile create mode 100755 linux/config.guess create mode 100755 linux/config.sub create mode 100755 linux/configure create mode 100644 linux/configure.ac create mode 100755 linux/depcomp create mode 100755 linux/install-sh create mode 100755 linux/libtool create mode 100644 linux/ltmain.sh create mode 100644 linux/m4/libtool.m4 create mode 100644 linux/m4/ltoptions.m4 create mode 100644 linux/m4/ltsugar.m4 create mode 100644 linux/m4/ltversion.m4 create mode 100644 linux/m4/lt~obsolete.m4 create mode 100755 linux/missing create mode 100644 linux/src/.gitignore create mode 100644 linux/src/AbstractSession.cpp create mode 100644 linux/src/AbstractSession.h create mode 100644 linux/src/ArchDetect.cpp create mode 100644 linux/src/ArchDetect.h create mode 100644 linux/src/Chapter.cpp create mode 100644 linux/src/Chapter.h create mode 100644 linux/src/FFmpegKit.cpp create mode 100644 linux/src/FFmpegKit.h create mode 100644 linux/src/FFmpegKitConfig.cpp create mode 100644 linux/src/FFmpegKitConfig.h create mode 100644 linux/src/FFmpegSession.cpp create mode 100644 linux/src/FFmpegSession.h create mode 100644 linux/src/FFmpegSessionCompleteCallback.h create mode 100644 linux/src/FFprobeKit.cpp create mode 100644 linux/src/FFprobeKit.h create mode 100644 linux/src/FFprobeSession.cpp create mode 100644 linux/src/FFprobeSession.h create mode 100644 linux/src/FFprobeSessionCompleteCallback.h create mode 100644 linux/src/Level.h create mode 100644 linux/src/Log.cpp create mode 100644 linux/src/Log.h create mode 100644 linux/src/LogCallback.h create mode 100644 linux/src/LogRedirectionStrategy.h create mode 100644 linux/src/Makefile.am create mode 100644 linux/src/Makefile.in create mode 100644 linux/src/MediaInformation.cpp create mode 100644 linux/src/MediaInformation.h create mode 100644 linux/src/MediaInformationJsonParser.cpp create mode 100644 linux/src/MediaInformationJsonParser.h create mode 100644 linux/src/MediaInformationSession.cpp create mode 100644 linux/src/MediaInformationSession.h create mode 100644 linux/src/MediaInformationSessionCompleteCallback.h create mode 100644 linux/src/Packages.cpp create mode 100644 linux/src/Packages.h create mode 100644 linux/src/ReturnCode.cpp create mode 100644 linux/src/ReturnCode.h create mode 100644 linux/src/Session.h create mode 100644 linux/src/SessionState.h create mode 100644 linux/src/Signal.h create mode 100644 linux/src/Statistics.cpp create mode 100644 linux/src/Statistics.h create mode 100644 linux/src/StatisticsCallback.h create mode 100644 linux/src/StreamInformation.cpp create mode 100644 linux/src/StreamInformation.h create mode 100644 linux/src/ffmpegkit_exception.cpp create mode 100644 linux/src/ffmpegkit_exception.h create mode 100644 linux/src/fftools_cmdutils.c create mode 100644 linux/src/fftools_cmdutils.h create mode 100644 linux/src/fftools_ffmpeg.c create mode 100644 linux/src/fftools_ffmpeg.h create mode 100644 linux/src/fftools_ffmpeg_filter.c create mode 100644 linux/src/fftools_ffmpeg_hw.c create mode 100644 linux/src/fftools_ffmpeg_opt.c create mode 100644 linux/src/fftools_ffprobe.c diff --git a/linux.sh b/linux.sh index 339b715..7e0eeaa 100755 --- a/linux.sh +++ b/linux.sh @@ -175,6 +175,9 @@ echo -e "INFO: Downloading the source code of ffmpeg and external libraries.\n" # DOWNLOAD GNU CONFIG download_gnu_config +# DOWNLOAD RAPIDJSON +download_rapidjson + # DOWNLOAD LIBRARY SOURCES downloaded_library_sources "${ENABLED_LIBRARIES[@]}" diff --git a/linux/.gitignore b/linux/.gitignore new file mode 100644 index 0000000..adc4268 --- /dev/null +++ b/linux/.gitignore @@ -0,0 +1,12 @@ +/autom4te.cache/ +/Makefile +/config.status +/configure.tmp +/configure~ +/.deps/ +/.libs/ +*.trs +/unittests +/test-driver +/config.log +/*.tmp diff --git a/linux/Doxyfile b/linux/Doxyfile new file mode 100644 index 0000000..aac731e --- /dev/null +++ b/linux/Doxyfile @@ -0,0 +1,2616 @@ +# Doxyfile 1.9.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "FFmpegKit Linux API" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = 4.5.1 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = ../docs/assets/ffmpeg-kit-icon-v9-small.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = ../docs/linux + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = YES + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = src + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which efficively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = YES + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = YES + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and MacOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = NO + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= NO + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the doxygen process doxygen will return with a non-zero status. +# Possible values are: NO, YES and FAIL_ON_WARNINGS. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, +# *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: +# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the main .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# run qhelpgenerator on the generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/ + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /