forked from wlanjie/trinity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile-ffmpeg.sh
executable file
·76 lines (71 loc) · 1.63 KB
/
compile-ffmpeg.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#! /usr/bin/env bash
UNI_BUILD_ROOT=`pwd`
FF_TARGET=$1
set -e
set +x
FF_ACT_ARCHS_32="armeabi armeabi-v7a x86"
FF_ACT_ARCHS_64="armeabi armeabi-v7 arm64-v8a x86 x86-64"
FF_ACT_ARCHS_ALL=$FF_ACT_ARCHS_64
echo_archs() {
echo "===================="
echo "[*] check archs"
echo "===================="
echo "FF_ALL_ARCHS = $FF_ACT_ARCHS_ALL"
echo "FF_ACT_ARCHS = $*"
echo ""
}
echo_usage() {
echo "Usage:"
echo " compile-ffmpeg.sh armv5|armv7a|arm64|x86|x86_64"
echo " compile-ffmpeg.sh all|all32"
echo " compile-ffmpeg.sh all64"
echo " compile-ffmpeg.sh clean"
echo " compile-ffmpeg.sh check"
exit 1
}
echo_nextstep_help() {
echo ""
echo "--------------------"
echo "[*] Finished"
}
#----------
case "$FF_TARGET" in
"")
sh ./do-compile-ffmpeg.sh armeabi-v7a
;;
armeabi|armeabi-v7a|arm64-v8a|x86|x86-64)
echo_archs $FF_TARGET
sh ./do-compile-ffmpeg.sh $FF_TARGET
;;
all32)
echo_archs $FF_ACT_ARCHS_32
for ARCH in $FF_ACT_ARCHS_32
do
sh ./do-compile-ffmpeg.sh $ARCH
done
;;
all|all64)
echo_archs $FF_ACT_ARCHS_64
for ARCH in $FF_ACT_ARCHS_64
do
sh ./do-compile-ffmpeg.sh $ARCH
done
;;
clean)
echo_archs FF_ACT_ARCHS_64
for ARCH in $FF_ACT_ARCHS_ALL
do
if [ -d ffmpeg-$ARCH ]; then
cd ffmpeg-$ARCH && git clean -xdf && cd -
fi
done
rm -rf ./build/ffmpeg-*
;;
check)
echo_archs FF_ACT_ARCHS_ALL
;;
*)
echo_usage
exit 1
;;
esac