diff --git a/build/android-chromaprint.sh b/build/android-chromaprint.sh index 357f5ce4d..9890ecbde 100755 --- a/build/android-chromaprint.sh +++ b/build/android-chromaprint.sh @@ -28,7 +28,7 @@ LIB_NAME="chromaprint" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-common.sh b/build/android-common.sh index 4fb6badd0..01b054b1f 100755 --- a/build/android-common.sh +++ b/build/android-common.sh @@ -75,7 +75,7 @@ get_arch_name() { esac } -get_target_host() { +get_build_host() { case ${ARCH} in arm-v7a | arm-v7a-neon) echo "arm-linux-androideabi" @@ -359,7 +359,7 @@ get_cxxflags() { } get_common_linked_libraries() { - local COMMON_LIBRARY_PATHS="-L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/${TARGET_HOST}/lib -L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot/usr/lib/${TARGET_HOST}/${API} -L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/lib" + local COMMON_LIBRARY_PATHS="-L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/${BUILD_HOST}/lib -L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot/usr/lib/${BUILD_HOST}/${API} -L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/lib" case $1 in ffmpeg) @@ -1003,16 +1003,16 @@ download_gpl_library_source() { set_toolchain_clang_paths() { export PATH=$PATH:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin - TARGET_HOST=$(get_target_host) + BUILD_HOST=$(get_build_host) - export AR=${TARGET_HOST}-ar + export AR=${BUILD_HOST}-ar export CC=$(get_clang_target_host)-clang export CXX=$(get_clang_target_host)-clang++ if [ "$1" == "x264" ]; then export AS=${CC} else - export AS=${TARGET_HOST}-as + export AS=${BUILD_HOST}-as fi case ${ARCH} in @@ -1021,9 +1021,9 @@ set_toolchain_clang_paths() { ;; esac - export LD=${TARGET_HOST}-ld - export RANLIB=${TARGET_HOST}-ranlib - export STRIP=${TARGET_HOST}-strip + export LD=${BUILD_HOST}-ld + export RANLIB=${BUILD_HOST}-ranlib + export STRIP=${BUILD_HOST}-strip export INSTALL_PKG_CONFIG_DIR="${BASEDIR}/prebuilt/android-$(get_target_build)/pkgconfig" export ZLIB_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/zlib.pc" @@ -1050,14 +1050,14 @@ build_cpufeatures() { set_toolchain_clang_paths "cpu-features" - TARGET_HOST=$(get_target_host) + BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags "cpu-features") export CXXFLAGS=$(get_cxxflags "cpu-features") export LDFLAGS=$(get_ldflags "cpu-features") # THEN BUILD FOR THIS ABI $(get_clang_target_host)-clang -c ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.c -o ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.o 1>>${BASEDIR}/build.log 2>&1 - ${TARGET_HOST}-ar rcs ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/libcpufeatures.a ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.o 1>>${BASEDIR}/build.log 2>&1 + ${BUILD_HOST}-ar rcs ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/libcpufeatures.a ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.o 1>>${BASEDIR}/build.log 2>&1 $(get_clang_target_host)-clang -shared ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.o -o ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/libcpufeatures.so 1>>${BASEDIR}/build.log 2>&1 create_cpufeatures_package_config @@ -1076,13 +1076,13 @@ build_android_lts_support() { set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS - TARGET_HOST=$(get_target_host) + BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) # THEN BUILD FOR THIS ABI $(get_clang_target_host)-clang ${CFLAGS} -Wno-unused-command-line-argument -c ${BASEDIR}/android/app/src/main/cpp/android_lts_support.c -o ${BASEDIR}/android/app/src/main/cpp/android_lts_support.o ${LDFLAGS} 1>>${BASEDIR}/build.log 2>&1 - ${TARGET_HOST}-ar rcs ${BASEDIR}/android/app/src/main/cpp/libandroidltssupport.a ${BASEDIR}/android/app/src/main/cpp/android_lts_support.o 1>>${BASEDIR}/build.log 2>&1 + ${BUILD_HOST}-ar rcs ${BASEDIR}/android/app/src/main/cpp/libandroidltssupport.a ${BASEDIR}/android/app/src/main/cpp/android_lts_support.o 1>>${BASEDIR}/build.log 2>&1 } autoreconf_library() { diff --git a/build/android-expat.sh b/build/android-expat.sh index 6f7885c4b..421d4bb9e 100755 --- a/build/android-expat.sh +++ b/build/android-expat.sh @@ -28,7 +28,7 @@ LIB_NAME="expat" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -51,7 +51,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-ffmpeg.sh b/build/android-ffmpeg.sh index 0a3653cd5..5bd0d39e7 100755 --- a/build/android-ffmpeg.sh +++ b/build/android-ffmpeg.sh @@ -34,7 +34,7 @@ LIB_NAME="ffmpeg" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -341,7 +341,7 @@ rm -f ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build cp ${BASEDIR}/tools/make/ffmpeg/libswscale/aarch64/hscale.S ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build.log 2>&1 ./configure \ - --cross-prefix="${TARGET_HOST}-" \ + --cross-prefix="${BUILD_HOST}-" \ --sysroot="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot" \ --prefix="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \ --pkg-config="${HOST_PKG_CONFIG_PATH}" \ diff --git a/build/android-fontconfig.sh b/build/android-fontconfig.sh index 63cfc1d69..cb4976446 100755 --- a/build/android-fontconfig.sh +++ b/build/android-fontconfig.sh @@ -28,7 +28,7 @@ LIB_NAME="fontconfig" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -55,7 +55,7 @@ fi --disable-rpath \ --disable-libxml2 \ --disable-docs \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-freetype.sh b/build/android-freetype.sh index 69163d565..f5be3eeae 100755 --- a/build/android-freetype.sh +++ b/build/android-freetype.sh @@ -28,7 +28,7 @@ LIB_NAME="freetype" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -58,7 +58,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/android-$(get_target_build)/libpng/lib --disable-shared \ --disable-fast-install \ --disable-mmap \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-fribidi.sh b/build/android-fribidi.sh index b4e86957a..90e7adc30 100755 --- a/build/android-fribidi.sh +++ b/build/android-fribidi.sh @@ -28,7 +28,7 @@ LIB_NAME="fribidi" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -52,7 +52,7 @@ fi --disable-fast-install \ --disable-debug \ --disable-deprecated \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-giflib.sh b/build/android-giflib.sh index 6c4ec3fff..f4b03beeb 100755 --- a/build/android-giflib.sh +++ b/build/android-giflib.sh @@ -28,7 +28,7 @@ LIB_NAME="giflib" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME})" -DS_IREAD=S_IRUSR -DS_IWRITE=S_IWUSR" export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -50,7 +50,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-gmp.sh b/build/android-gmp.sh index e47a600c9..1f57d1db0 100755 --- a/build/android-gmp.sh +++ b/build/android-gmp.sh @@ -28,7 +28,7 @@ LIB_NAME="gmp" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -51,7 +51,7 @@ fi --disable-shared \ --disable-fast-install \ --disable-maintainer-mode \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-gnutls.sh b/build/android-gnutls.sh index 4860c793d..e75d4d28c 100755 --- a/build/android-gnutls.sh +++ b/build/android-gnutls.sh @@ -28,7 +28,7 @@ LIB_NAME="gnutls" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) COMMON_CFLAGS=$(get_cflags ${LIB_NAME}) COMMON_CXXFLAGS=$(get_cxxflags ${LIB_NAME}) COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -83,7 +83,7 @@ fi --disable-tests \ --disable-tools \ --disable-maintainer-mode \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-jpeg.sh b/build/android-jpeg.sh index 8ae6bc5d7..664585572 100755 --- a/build/android-jpeg.sh +++ b/build/android-jpeg.sh @@ -28,7 +28,7 @@ LIB_NAME="jpeg" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-kvazaar.sh b/build/android-kvazaar.sh index 17763b60f..9c08914d7 100755 --- a/build/android-kvazaar.sh +++ b/build/android-kvazaar.sh @@ -28,7 +28,7 @@ LIB_NAME="kvazaar" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -62,7 +62,7 @@ LIBS="${ARCH_SPECIFIC_LIBS}" ./configure \ --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make || exit 1 diff --git a/build/android-lame.sh b/build/android-lame.sh index 7e6bfb630..2136d1315 100755 --- a/build/android-lame.sh +++ b/build/android-lame.sh @@ -28,7 +28,7 @@ LIB_NAME="lame" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -55,7 +55,7 @@ fi --disable-frontend \ --disable-efence \ --disable-gtktest \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-leptonica.sh b/build/android-leptonica.sh index 17cf7e0ba..d35cf2bac 100755 --- a/build/android-leptonica.sh +++ b/build/android-leptonica.sh @@ -28,7 +28,7 @@ LIB_NAME="leptonica" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export CPPFLAGS="-I${BASEDIR}/prebuilt/android-$(get_target_build)/giflib/include" @@ -72,7 +72,7 @@ fi --disable-shared \ --disable-fast-install \ --disable-programs \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libaom.sh b/build/android-libaom.sh index c0588e43b..6050e3b8c 100755 --- a/build/android-libaom.sh +++ b/build/android-libaom.sh @@ -28,7 +28,7 @@ LIB_NAME="libaom" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-libass.sh b/build/android-libass.sh index b9a52e4d3..869c24f15 100755 --- a/build/android-libass.sh +++ b/build/android-libass.sh @@ -28,7 +28,7 @@ LIB_NAME="libass" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -69,7 +69,7 @@ esac --disable-profile \ --disable-coretext \ ${ASM_FLAGS} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libiconv.sh b/build/android-libiconv.sh index 54b84c7d4..b996d37bf 100755 --- a/build/android-libiconv.sh +++ b/build/android-libiconv.sh @@ -28,7 +28,7 @@ LIB_NAME="libiconv" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -50,7 +50,7 @@ fi --disable-shared \ --disable-fast-install \ --disable-rpath \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libilbc.sh b/build/android-libilbc.sh index 39c8c3361..d5ee5c45f 100755 --- a/build/android-libilbc.sh +++ b/build/android-libilbc.sh @@ -28,7 +28,7 @@ LIB_NAME="libilbc" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -49,7 +49,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libogg.sh b/build/android-libogg.sh index 0daf521d3..1a01aaae5 100755 --- a/build/android-libogg.sh +++ b/build/android-libogg.sh @@ -28,7 +28,7 @@ LIB_NAME="libogg" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -49,7 +49,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libpng.sh b/build/android-libpng.sh index 5c0e03531..03dfcecfb 100755 --- a/build/android-libpng.sh +++ b/build/android-libpng.sh @@ -28,7 +28,7 @@ LIB_NAME="libpng" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -68,7 +68,7 @@ fi --disable-unversioned-libpng-pc \ --disable-unversioned-libpng-config \ ${CPU_SPECIFIC_OPTIONS} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libsndfile.sh b/build/android-libsndfile.sh index f1f57dce7..10929af74 100755 --- a/build/android-libsndfile.sh +++ b/build/android-libsndfile.sh @@ -28,7 +28,7 @@ LIB_NAME="libsndfile" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -53,7 +53,7 @@ fi --disable-alsa \ --disable-full-suite \ --disable-external-libs \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libtheora.sh b/build/android-libtheora.sh index 363016492..1183c62a8 100755 --- a/build/android-libtheora.sh +++ b/build/android-libtheora.sh @@ -28,7 +28,7 @@ LIB_NAME="libtheora" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -60,7 +60,7 @@ fi --disable-sdltest \ ${ASM_FLAGS} \ --disable-valgrind-testing \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libuuid.sh b/build/android-libuuid.sh index 9c96b69b8..428843f0b 100755 --- a/build/android-libuuid.sh +++ b/build/android-libuuid.sh @@ -28,7 +28,7 @@ LIB_NAME="libuuid" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -49,7 +49,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libvidstab.sh b/build/android-libvidstab.sh index 4c1d80694..c70d30ce4 100755 --- a/build/android-libvidstab.sh +++ b/build/android-libvidstab.sh @@ -28,7 +28,7 @@ LIB_NAME="libvidstab" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-libvorbis.sh b/build/android-libvorbis.sh index 5f51426cf..06220da55 100755 --- a/build/android-libvorbis.sh +++ b/build/android-libvorbis.sh @@ -28,7 +28,7 @@ LIB_NAME="libvorbis" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -55,7 +55,7 @@ PKG_CONFIG= ./configure \ --disable-docs \ --disable-examples \ --disable-oggtest \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-libwebp.sh b/build/android-libwebp.sh index d0df78bb9..14b45c003 100755 --- a/build/android-libwebp.sh +++ b/build/android-libwebp.sh @@ -28,7 +28,7 @@ LIB_NAME="libwebp" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-libxml2.sh b/build/android-libxml2.sh index f1ba6c211..ca35a9af3 100755 --- a/build/android-libxml2.sh +++ b/build/android-libxml2.sh @@ -28,7 +28,7 @@ LIB_NAME="libxml2" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -60,7 +60,7 @@ autoreconf_library ${LIB_NAME} --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-nettle.sh b/build/android-nettle.sh index 8051e7986..d938cbd58 100755 --- a/build/android-nettle.sh +++ b/build/android-nettle.sh @@ -28,7 +28,7 @@ LIB_NAME="nettle" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -65,7 +65,7 @@ fi --disable-gcov \ --disable-documentation \ ${OPTIONAL_CPU_SUPPORT} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-opencore-amr.sh b/build/android-opencore-amr.sh index 760a99fea..708050013 100755 --- a/build/android-opencore-amr.sh +++ b/build/android-opencore-amr.sh @@ -28,7 +28,7 @@ LIB_NAME="opencore-amr" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -50,7 +50,7 @@ fi --disable-shared \ --disable-fast-install \ --disable-maintainer-mode \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-openh264.sh b/build/android-openh264.sh index 96777d68f..49cff484c 100755 --- a/build/android-openh264.sh +++ b/build/android-openh264.sh @@ -28,7 +28,7 @@ LIB_NAME="openh264" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-opus.sh b/build/android-opus.sh index d77ad49c9..c1a957673 100755 --- a/build/android-opus.sh +++ b/build/android-opus.sh @@ -28,7 +28,7 @@ LIB_NAME="opus" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -56,7 +56,7 @@ fi --disable-maintainer-mode \ --disable-doc \ --disable-extra-programs \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-sdl.sh b/build/android-sdl.sh index 5d7997e90..5e4670d1c 100755 --- a/build/android-sdl.sh +++ b/build/android-sdl.sh @@ -28,7 +28,7 @@ LIB_NAME="sdl" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -51,7 +51,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-shine.sh b/build/android-shine.sh index 058998637..0dacbb6d8 100755 --- a/build/android-shine.sh +++ b/build/android-shine.sh @@ -28,7 +28,7 @@ LIB_NAME="shine" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -49,7 +49,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-snappy.sh b/build/android-snappy.sh index 05cd6d1df..76f27e4ca 100755 --- a/build/android-snappy.sh +++ b/build/android-snappy.sh @@ -28,7 +28,7 @@ LIB_NAME="snappy" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-soxr.sh b/build/android-soxr.sh index 28b41f9a1..3b60a4a67 100755 --- a/build/android-soxr.sh +++ b/build/android-soxr.sh @@ -28,7 +28,7 @@ LIB_NAME="soxr" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-speex.sh b/build/android-speex.sh index 5e6996fd4..ff64613ff 100755 --- a/build/android-speex.sh +++ b/build/android-speex.sh @@ -28,7 +28,7 @@ LIB_NAME="speex" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -56,7 +56,7 @@ fi --disable-shared \ --disable-binaries \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-tesseract.sh b/build/android-tesseract.sh index f42e9f942..e8f08fd7f 100755 --- a/build/android-tesseract.sh +++ b/build/android-tesseract.sh @@ -28,7 +28,7 @@ LIB_NAME="tesseract" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -60,7 +60,7 @@ export ac_cv_c_bigendian=no --disable-cube \ --disable-tessdata-prefix \ --disable-largefile \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 ${SED_INLINE} 's/\-lrt//g' ${BASEDIR}/src/${LIB_NAME}/api/Makefile diff --git a/build/android-tiff.sh b/build/android-tiff.sh index c905c296c..67efc866d 100755 --- a/build/android-tiff.sh +++ b/build/android-tiff.sh @@ -28,7 +28,7 @@ LIB_NAME="tiff" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -55,7 +55,7 @@ fi --disable-cxx \ --disable-win32-io \ --disable-lzma \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-twolame.sh b/build/android-twolame.sh index dc2e1920a..0f2b8b441 100755 --- a/build/android-twolame.sh +++ b/build/android-twolame.sh @@ -28,7 +28,7 @@ LIB_NAME="twolame" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -53,7 +53,7 @@ export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)" --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-wavpack.sh b/build/android-wavpack.sh index a90bae664..d7c5ddbab 100755 --- a/build/android-wavpack.sh +++ b/build/android-wavpack.sh @@ -28,7 +28,7 @@ LIB_NAME="wavpack" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -52,7 +52,7 @@ fi --disable-apps \ --disable-fast-install \ --disable-tests \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-x264.sh b/build/android-x264.sh index c327b9036..e44ae3ae7 100755 --- a/build/android-x264.sh +++ b/build/android-x264.sh @@ -33,7 +33,7 @@ LIB_NAME="x264" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -71,7 +71,7 @@ esac --enable-static \ --disable-cli \ ${ASM_FLAGS} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/android-x265.sh b/build/android-x265.sh index 49cc564bf..01dae6da1 100755 --- a/build/android-x265.sh +++ b/build/android-x265.sh @@ -28,7 +28,7 @@ LIB_NAME="x265" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/android-xvidcore.sh b/build/android-xvidcore.sh index 12302dabf..093f66286 100755 --- a/build/android-xvidcore.sh +++ b/build/android-xvidcore.sh @@ -28,7 +28,7 @@ LIB_NAME="xvidcore" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -55,7 +55,7 @@ esac ./configure \ --prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \ ${ASM_FLAGS} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-chromaprint.sh b/build/ios-chromaprint.sh index f957cb12b..71eacc699 100755 --- a/build/ios-chromaprint.sh +++ b/build/ios-chromaprint.sh @@ -32,7 +32,7 @@ LIB_NAME="chromaprint" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/ios-common.sh b/build/ios-common.sh index e4f4d1897..213f3e198 100755 --- a/build/ios-common.sh +++ b/build/ios-common.sh @@ -140,6 +140,10 @@ get_target_host() { esac } +get_build_host() { + echo "$(get_target_arch)-ios-darwin" +} + get_target_build_directory() { case ${ARCH} in x86-64) @@ -446,22 +450,22 @@ get_size_optimization_ldflags() { get_arch_specific_ldflags() { case ${ARCH} in armv7) - echo "-arch armv7 -march=armv7 -mfpu=neon -mfloat-abi=softfp -fembed-bitcode" + echo "-arch armv7 -march=armv7 -mfpu=neon -mfloat-abi=softfp -fembed-bitcode -target $(get_target_host)" ;; armv7s) - echo "-arch armv7s -march=armv7s -mfpu=neon -mfloat-abi=softfp -fembed-bitcode" + echo "-arch armv7s -march=armv7s -mfpu=neon -mfloat-abi=softfp -fembed-bitcode -target $(get_target_host)" ;; arm64) - echo "-arch arm64 -march=armv8-a+crc+crypto -fembed-bitcode" + echo "-arch arm64 -march=armv8-a+crc+crypto -fembed-bitcode -target $(get_target_host)" ;; arm64e) - echo "-arch arm64e -march=armv8.3-a+crc+crypto -fembed-bitcode" + echo "-arch arm64e -march=armv8.3-a+crc+crypto -fembed-bitcode -target $(get_target_host)" ;; i386) - echo "-arch i386 -march=i386" + echo "-arch i386 -march=i386 -target $(get_target_host)" ;; x86-64) - echo "-arch x86_64 -march=x86-64" + echo "-arch x86_64 -march=x86-64 -target $(get_target_host)" ;; x86-64-mac-catalyst) echo "-arch x86_64 -march=x86-64 -target $(get_target_host) -isysroot ${SDK_PATH} -L${SDK_PATH}/System/iOSSupport/usr/lib -iframework ${SDK_PATH}/System/iOSSupport/System/Library/Frameworks" @@ -1033,8 +1037,6 @@ set_toolchain_clang_paths() { LOCAL_GAS_PREPROCESSOR="${BASEDIR}/src/x264/tools/gas-preprocessor.pl" fi - TARGET_HOST=$(get_target_host) - export AR="$(xcrun --sdk $(get_sdk_name) -f ar)" export CC="clang" export OBJC="$(xcrun --sdk $(get_sdk_name) -f clang)" diff --git a/build/ios-expat.sh b/build/ios-expat.sh index 2a3f4aa52..aa0ae2c38 100755 --- a/build/ios-expat.sh +++ b/build/ios-expat.sh @@ -32,7 +32,7 @@ LIB_NAME="expat" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -55,7 +55,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-ffmpeg.sh b/build/ios-ffmpeg.sh index 741e9a04a..cc7b4b2c0 100755 --- a/build/ios-ffmpeg.sh +++ b/build/ios-ffmpeg.sh @@ -37,7 +37,7 @@ LIB_NAME="ffmpeg" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) FFMPEG_CFLAGS="" FFMPEG_LDFLAGS="" export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" diff --git a/build/ios-fontconfig.sh b/build/ios-fontconfig.sh index 390b3fe70..de35af860 100755 --- a/build/ios-fontconfig.sh +++ b/build/ios-fontconfig.sh @@ -32,7 +32,7 @@ LIB_NAME="fontconfig" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -59,7 +59,7 @@ fi --disable-rpath \ --disable-libxml2 \ --disable-docs \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 # DISABLE IOS TESTS with system() calls - system() is deprecated for IOS # 1. test-bz106632.c diff --git a/build/ios-freetype.sh b/build/ios-freetype.sh index 0e675a493..22d9ece12 100755 --- a/build/ios-freetype.sh +++ b/build/ios-freetype.sh @@ -32,7 +32,7 @@ LIB_NAME="freetype" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -62,7 +62,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/$(get_target_build_directory)/libpng/l --disable-shared \ --disable-fast-install \ --disable-mmap \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-fribidi.sh b/build/ios-fribidi.sh index 8aeab9a2c..cd1fa1a7a 100755 --- a/build/ios-fribidi.sh +++ b/build/ios-fribidi.sh @@ -32,7 +32,7 @@ LIB_NAME="fribidi" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -56,7 +56,7 @@ fi --disable-fast-install \ --disable-debug \ --disable-deprecated \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-giflib.sh b/build/ios-giflib.sh index c516457e4..85e1f9109 100755 --- a/build/ios-giflib.sh +++ b/build/ios-giflib.sh @@ -32,7 +32,7 @@ LIB_NAME="giflib" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME})" -DS_IREAD=S_IRUSR -DS_IWRITE=S_IWUSR" export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -54,7 +54,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-gmp.sh b/build/ios-gmp.sh index c8412f981..8450f4868 100755 --- a/build/ios-gmp.sh +++ b/build/ios-gmp.sh @@ -48,11 +48,11 @@ fi case ${ARCH} in i386) unset gmp_cv_asm_w32 - TARGET_HOST="x86-apple-darwin" + BUILD_HOST="x86-apple-darwin" ;; *) unset gmp_cv_asm_w32 - TARGET_HOST=$(get_target_host) + BUILD_HOST=$(get_build_host) ;; esac @@ -65,7 +65,7 @@ esac --disable-assembly \ --disable-fast-install \ --disable-maintainer-mode \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-gnutls.sh b/build/ios-gnutls.sh index cc0d4f3c8..4646e0028 100755 --- a/build/ios-gnutls.sh +++ b/build/ios-gnutls.sh @@ -32,7 +32,7 @@ LIB_NAME="gnutls" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) COMMON_CFLAGS=$(get_cflags ${LIB_NAME}) COMMON_CXXFLAGS=$(get_cxxflags ${LIB_NAME}) COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -96,7 +96,7 @@ fi --disable-tests \ --disable-tools \ --disable-maintainer-mode \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-jpeg.sh b/build/ios-jpeg.sh index f3e6616f0..7b66b9353 100755 --- a/build/ios-jpeg.sh +++ b/build/ios-jpeg.sh @@ -33,7 +33,7 @@ set_toolchain_clang_paths ${LIB_NAME} export CCAS=${AS} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/ios-kvazaar.sh b/build/ios-kvazaar.sh index be4c3b2e1..2e0866a5b 100755 --- a/build/ios-kvazaar.sh +++ b/build/ios-kvazaar.sh @@ -35,10 +35,10 @@ set_toolchain_clang_paths ${LIB_NAME} ARCH_OPTIONS="" case ${ARCH} in i386) - TARGET_HOST="x86-apple-darwin" + BUILD_HOST="x86-apple-darwin" ;; *) - TARGET_HOST=$(get_target_host) + BUILD_HOST=$(get_build_host) ;; esac export CFLAGS=$(get_cflags ${LIB_NAME}) @@ -65,7 +65,7 @@ fi --disable-shared \ --disable-fast-install \ ${ARCH_OPTIONS} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make || exit 1 diff --git a/build/ios-lame.sh b/build/ios-lame.sh index 2208939fb..a038ba1e3 100755 --- a/build/ios-lame.sh +++ b/build/ios-lame.sh @@ -32,7 +32,7 @@ LIB_NAME="lame" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -59,7 +59,7 @@ fi --disable-frontend \ --disable-efence \ --disable-gtktest \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-leptonica.sh b/build/ios-leptonica.sh index 74f0df682..85dc6829e 100755 --- a/build/ios-leptonica.sh +++ b/build/ios-leptonica.sh @@ -32,7 +32,7 @@ LIB_NAME="leptonica" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS="$(get_cflags ${LIB_NAME})" export CXXFLAGS="$(get_cxxflags ${LIB_NAME})" export CPPFLAGS="-I${BASEDIR}/prebuilt/$(get_target_build_directory)/giflib/include" @@ -76,7 +76,7 @@ fi --disable-shared \ --disable-fast-install \ --disable-programs \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libaom.sh b/build/ios-libaom.sh index b3a08c4c2..a415d6f55 100755 --- a/build/ios-libaom.sh +++ b/build/ios-libaom.sh @@ -32,7 +32,7 @@ LIB_NAME="libaom" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS="$(get_cflags ${LIB_NAME})" CXXFLAGS="$(get_cxxflags ${LIB_NAME})" LDFLAGS="$(get_ldflags ${LIB_NAME})" diff --git a/build/ios-libass.sh b/build/ios-libass.sh index 2b8e2bd73..310204e58 100755 --- a/build/ios-libass.sh +++ b/build/ios-libass.sh @@ -32,7 +32,7 @@ LIB_NAME="libass" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -67,7 +67,7 @@ fi ${ARCH_OPTIONS} \ --disable-profile \ --disable-coretext \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libilbc.sh b/build/ios-libilbc.sh index 1712c45c0..ae79176ac 100755 --- a/build/ios-libilbc.sh +++ b/build/ios-libilbc.sh @@ -32,7 +32,7 @@ LIB_NAME="libilbc" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -53,7 +53,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libogg.sh b/build/ios-libogg.sh index 372be40a2..0185cc5b5 100755 --- a/build/ios-libogg.sh +++ b/build/ios-libogg.sh @@ -32,7 +32,7 @@ LIB_NAME="libogg" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -56,7 +56,7 @@ ${SED_INLINE} 's/sys\/types/stdint/g' ${BASEDIR}/src/libogg/include/ogg/os_types --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libpng.sh b/build/ios-libpng.sh index 83bb142d3..159ba6761 100755 --- a/build/ios-libpng.sh +++ b/build/ios-libpng.sh @@ -32,7 +32,7 @@ LIB_NAME="libpng" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CPPFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) @@ -67,7 +67,7 @@ fi --disable-unversioned-libpng-pc \ --disable-unversioned-libpng-config \ ${CPU_SPECIFIC_OPTIONS} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libsndfile.sh b/build/ios-libsndfile.sh index 4f6057d92..73a70ee4f 100755 --- a/build/ios-libsndfile.sh +++ b/build/ios-libsndfile.sh @@ -32,7 +32,7 @@ LIB_NAME="libsndfile" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -57,7 +57,7 @@ fi --disable-alsa \ --disable-full-suite \ --disable-external-libs \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libtheora.sh b/build/ios-libtheora.sh index 41c8838a4..8cf2fc60c 100755 --- a/build/ios-libtheora.sh +++ b/build/ios-libtheora.sh @@ -32,7 +32,7 @@ LIB_NAME="libtheora" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -57,7 +57,7 @@ fi --disable-telemetry \ --disable-sdltest \ --disable-valgrind-testing \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libuuid.sh b/build/ios-libuuid.sh index f0e3a6602..31706e179 100755 --- a/build/ios-libuuid.sh +++ b/build/ios-libuuid.sh @@ -32,7 +32,7 @@ LIB_NAME="libuuid" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -53,7 +53,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libvidstab.sh b/build/ios-libvidstab.sh index 41979252f..a725852e9 100755 --- a/build/ios-libvidstab.sh +++ b/build/ios-libvidstab.sh @@ -32,7 +32,7 @@ LIB_NAME="libvidstab" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/ios-libvorbis.sh b/build/ios-libvorbis.sh index b4d20da3e..01c39ed34 100755 --- a/build/ios-libvorbis.sh +++ b/build/ios-libvorbis.sh @@ -32,7 +32,7 @@ LIB_NAME="libvorbis" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -63,7 +63,7 @@ PKG_CONFIG= ./configure \ --disable-docs \ --disable-examples \ --disable-oggtest \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-libwebp.sh b/build/ios-libwebp.sh index b31b1990b..6263db53b 100755 --- a/build/ios-libwebp.sh +++ b/build/ios-libwebp.sh @@ -32,7 +32,7 @@ LIB_NAME="libwebp" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/ios-libxml2.sh b/build/ios-libxml2.sh index d86f920fa..cf354a5a4 100755 --- a/build/ios-libxml2.sh +++ b/build/ios-libxml2.sh @@ -32,7 +32,7 @@ LIB_NAME="libxml2" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -58,7 +58,7 @@ autoreconf_library ${LIB_NAME} --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-mobile-ffmpeg.sh b/build/ios-mobile-ffmpeg.sh index 1cf42c85e..93f4bf171 100755 --- a/build/ios-mobile-ffmpeg.sh +++ b/build/ios-mobile-ffmpeg.sh @@ -32,9 +32,9 @@ LIB_NAME="mobile-ffmpeg" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) if [ ${ARCH} == "x86-64-mac-catalyst" ]; then - TARGET_HOST="x86_64-apple-darwin" + BUILD_HOST="x86_64-apple-darwin" fi COMMON_CFLAGS=$(get_cflags ${LIB_NAME}) COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -79,7 +79,7 @@ ${SED_INLINE} 's/${wl}suppress//g' configure ${VIDEOTOOLBOX_SUPPORT_FLAG} \ --disable-fast-install \ --disable-maintainer-mode \ - --host=${TARGET_HOST} 1>>${BASEDIR}/build.log 2>&1 + --host=${BUILD_HOST} 1>>${BASEDIR}/build.log 2>&1 if [ $? -ne 0 ]; then echo "failed" diff --git a/build/ios-nettle.sh b/build/ios-nettle.sh index ba3de0fb1..7ebc825d1 100755 --- a/build/ios-nettle.sh +++ b/build/ios-nettle.sh @@ -32,7 +32,7 @@ LIB_NAME="nettle" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -69,7 +69,7 @@ fi --disable-gcov \ --disable-documentation \ ${OPTIONAL_CPU_SUPPORT} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-opencore-amr.sh b/build/ios-opencore-amr.sh index c442e8de2..84232a8fb 100755 --- a/build/ios-opencore-amr.sh +++ b/build/ios-opencore-amr.sh @@ -32,7 +32,7 @@ LIB_NAME="opencore-amr" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -64,7 +64,7 @@ fi --disable-shared \ --disable-fast-install \ --disable-maintainer-mode \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-openh264.sh b/build/ios-openh264.sh index cea9e33b9..84c8d12de 100755 --- a/build/ios-openh264.sh +++ b/build/ios-openh264.sh @@ -32,7 +32,7 @@ LIB_NAME="openh264" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/ios-opus.sh b/build/ios-opus.sh index f6e642059..2a1567f06 100755 --- a/build/ios-opus.sh +++ b/build/ios-opus.sh @@ -32,7 +32,7 @@ LIB_NAME="opus" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -60,7 +60,7 @@ fi --disable-maintainer-mode \ --disable-doc \ --disable-extra-programs \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-sdl.sh b/build/ios-sdl.sh index 7b83085ca..5bb4070e6 100755 --- a/build/ios-sdl.sh +++ b/build/ios-sdl.sh @@ -32,7 +32,7 @@ LIB_NAME="sdl" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -59,7 +59,7 @@ cp ${BASEDIR}/tools/make/configure.sdl ${BASEDIR}/src/${LIB_NAME}/configure --enable-static \ --disable-shared \ --disable-video-opengl \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-shine.sh b/build/ios-shine.sh index 8b3dd3b12..21e82140d 100755 --- a/build/ios-shine.sh +++ b/build/ios-shine.sh @@ -32,7 +32,7 @@ LIB_NAME="shine" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -53,7 +53,7 @@ fi --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-snappy.sh b/build/ios-snappy.sh index 6f74113cd..40c9ed6e7 100755 --- a/build/ios-snappy.sh +++ b/build/ios-snappy.sh @@ -32,7 +32,7 @@ LIB_NAME="snappy" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS="$(get_cflags ${LIB_NAME}) -I${SDK_PATH}/usr/include" CXXFLAGS="$(get_cxxflags ${LIB_NAME})" LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${SDK_PATH}/usr/lib" diff --git a/build/ios-soxr.sh b/build/ios-soxr.sh index ac623b458..061358fb6 100755 --- a/build/ios-soxr.sh +++ b/build/ios-soxr.sh @@ -32,7 +32,7 @@ LIB_NAME="soxr" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/ios-speex.sh b/build/ios-speex.sh index 807ca8c7f..1c3897802 100755 --- a/build/ios-speex.sh +++ b/build/ios-speex.sh @@ -32,7 +32,7 @@ LIB_NAME="speex" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -61,7 +61,7 @@ fi --disable-shared \ --disable-binaries \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-tesseract.sh b/build/ios-tesseract.sh index 7d6c7ec2d..30a82a197 100755 --- a/build/ios-tesseract.sh +++ b/build/ios-tesseract.sh @@ -32,7 +32,7 @@ LIB_NAME="tesseract" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -61,7 +61,7 @@ export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/$(get_target_build_directory)/lepto --disable-cube \ --disable-tessdata-prefix \ --disable-largefile \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 ${SED_INLINE} 's/$wl-bind_at_load//g' ${BASEDIR}/src/${LIB_NAME}/libtool ${SED_INLINE} 's/-lrt//g' ${BASEDIR}/src/${LIB_NAME}/api/Makefile diff --git a/build/ios-tiff.sh b/build/ios-tiff.sh index fa1fc2479..88a75e250 100755 --- a/build/ios-tiff.sh +++ b/build/ios-tiff.sh @@ -32,7 +32,7 @@ LIB_NAME="tiff" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -59,7 +59,7 @@ fi --disable-cxx \ --disable-win32-io \ --disable-lzma \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-twolame.sh b/build/ios-twolame.sh index f5628ba46..f3a2ff1e4 100755 --- a/build/ios-twolame.sh +++ b/build/ios-twolame.sh @@ -32,7 +32,7 @@ LIB_NAME="twolame" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -57,7 +57,7 @@ export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)" --enable-static \ --disable-shared \ --disable-fast-install \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-wavpack.sh b/build/ios-wavpack.sh index caf3de239..c9abdf794 100755 --- a/build/ios-wavpack.sh +++ b/build/ios-wavpack.sh @@ -32,7 +32,7 @@ LIB_NAME="wavpack" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -67,7 +67,7 @@ esac --disable-apps \ --disable-fast-install \ --disable-tests \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-x264.sh b/build/ios-x264.sh index 430f390d9..42844db05 100755 --- a/build/ios-x264.sh +++ b/build/ios-x264.sh @@ -37,7 +37,7 @@ LIB_NAME="x264" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -71,7 +71,7 @@ ${SED_INLINE} 's/LDFLAGS=\"\$LDFLAGS \-arch x86_64/LDFLAGS=\"\$CFLAGS/g' configu --enable-static \ ${ASM_FLAGS} \ --disable-cli \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/ios-x265.sh b/build/ios-x265.sh index c56efde0a..9b77f50cd 100755 --- a/build/ios-x265.sh +++ b/build/ios-x265.sh @@ -32,7 +32,7 @@ LIB_NAME="x265" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) CFLAGS=$(get_cflags ${LIB_NAME}) CXXFLAGS=$(get_cxxflags ${LIB_NAME}) LDFLAGS=$(get_ldflags ${LIB_NAME}) diff --git a/build/ios-xvidcore.sh b/build/ios-xvidcore.sh index ba70f5119..1a01117ed 100755 --- a/build/ios-xvidcore.sh +++ b/build/ios-xvidcore.sh @@ -32,7 +32,7 @@ LIB_NAME="xvidcore" set_toolchain_clang_paths ${LIB_NAME} # PREPARING FLAGS -TARGET_HOST=$(get_target_host) +BUILD_HOST=$(get_build_host) export CFLAGS=$(get_cflags ${LIB_NAME}) export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS=$(get_ldflags ${LIB_NAME}) @@ -68,7 +68,7 @@ esac ./configure \ --prefix=${BASEDIR}/prebuilt/$(get_target_build_directory)/${LIB_NAME} \ ${ASM_FLAGS} \ - --host=${TARGET_HOST} || exit 1 + --host=${BUILD_HOST} || exit 1 make -j$(get_cpu_count) || exit 1 diff --git a/build/tvos-common.sh b/build/tvos-common.sh index 47158692f..e51015755 100755 --- a/build/tvos-common.sh +++ b/build/tvos-common.sh @@ -124,7 +124,7 @@ get_arch_name() { esac } -get_target_host() { +get_build_host() { echo "$(get_target_arch)-tvos-darwin" } @@ -207,10 +207,10 @@ get_common_cflags() { get_arch_specific_cflags() { case ${ARCH} in arm64) - echo "-arch arm64 -target $(get_target_host) -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64" + echo "-arch arm64 -target $(get_build_host) -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64" ;; x86-64) - echo "-arch x86_64 -target $(get_target_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64" + echo "-arch x86_64 -target $(get_build_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64" ;; esac } @@ -999,7 +999,7 @@ set_toolchain_clang_paths() { LOCAL_GAS_PREPROCESSOR="${BASEDIR}/src/x264/tools/gas-preprocessor.pl" fi - TARGET_HOST=$(get_target_host) + BUILD_HOST=$(get_build_host) export AR="$(xcrun --sdk $(get_sdk_name) -f ar)" export CC="clang"