-
Notifications
You must be signed in to change notification settings - Fork 3
/
prepare_sources.sh
executable file
·57 lines (46 loc) · 2.02 KB
/
prepare_sources.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
#!/bin/sh
topdir=`pwd`
if test -z "$1" ; then
ndk_build_path=`which ndk-build`
if test "$?" != "0" ; then
echo "ndk-build not found in path. Please specify path to android NDK as first argument of $0."
exit 127
fi
NDK_PATH=`dirname $ndk_build_path`
if test -z "NDK_PATH" ; then
echo "Path to Android NDK not set, please specify it as first argument of $0."
exit 127
fi
else
NDK_PATH=$1
fi
echo "using $NDK_PATH as android NDK"
cd submodules/externals/ffmpeg
if test -z "`git status | grep neon`" ; then
echo "Applying patch to ffmpeg"
cd $topdir
patch -p0 < ${topdir}/patches/ffmpeg_scalar_product_remove_alignment_hints.patch
fi
cd $topdir/submodules/libilbc-rfc3951 && ./autogen.sh && ./configure && make || ( echo "iLBC prepare stage failed" ; exit 1 )
cd $topdir/submodules/externals/libvpx && ./configure --target=armv7-android-gcc --sdk-path=$NDK_PATH --enable-error-concealment && make clean && make asm_com_offsets.asm || ( echo "VP8 prepare stage failed." ; exit 1 )
cd $topdir/submodules/mssilk && ./autogen.sh && ./configure --host=arm-linux MEDIASTREAMER_CFLAGS=" " MEDIASTREAMER_LIBS=" " && cd sdk && make extract-sources || ( echo "SILK audio plugin prepare state failed." ; exit 1 )
cd $topdir/submodules/externals/srtp/ && cp ../build/srtp/config.h . || ( echo "SRTP prepare state failed." ; exit 1 )
cd $topdir/submodules/linphone/mediastreamer2/src/
# extract rules to build shader files
vs_rule=`cat Makefile.am | grep xxd | grep yuv2rgb.vs | sed 's/$$builddir/./'`
fs_rule=`cat Makefile.am | grep xxd | grep yuv2rgb.fs | sed 's/$$builddir/./'`
eval $vs_rule
# verify vs file creation
if ! [ -e yuv2rgb.vs.h ]
then
echo "yuv2rgb.vs.h creation error (do you have 'xxd' application installed ?)"; cd -; exit 1
fi
eval $fs_rule
# verify fs file creation
if ! [ -e yuv2rgb.fs.h ]
then
echo "yuv2rgb.fs.h creation error (do you have 'xxd' application installed ?)"; cd -; exit 1
fi
cd $topdir
# As a memo, the config.h for zrtpcpp is generated using the command
# cmake -Denable-ccrtp=false submodules/externals/libzrtpcpp