use build host and target host in build scripts

This commit is contained in:
Taner Sener
2020-02-24 21:23:14 +00:00
parent 4605e778c5
commit efe1c59a20
87 changed files with 178 additions and 176 deletions
+1 -1
View File
@@ -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})
+12 -12
View File
@@ -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() {
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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}" \
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+10 -8
View File
@@ -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)"
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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}"
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})"
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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"
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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})
+2 -2
View File
@@ -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
+4 -4
View File
@@ -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"