From 29e52cdab4dbe1d553c9bd9a076786732612f9ee Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Sat, 31 Mar 2012 16:56:27 +0200 Subject: [PATCH] repair prepare_sources.sh (should not ask for NDK path !) --- prepare_sources.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/prepare_sources.sh b/prepare_sources.sh index 3c37ccc7c..3fa41adb9 100755 --- a/prepare_sources.sh +++ b/prepare_sources.sh @@ -2,12 +2,18 @@ topdir=`pwd` -if [ $# -ne 1 ] -then - "Error : path to the ndk as parameter." - exit 65 +if test -z "$1" ; then + ndk_build_path=`which ndk-build` + 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" + 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" @@ -17,9 +23,10 @@ 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=$1 --enable-error-concealment && make asm_com_offsets.asm || ( echo "VP8 prepare stage failed." ; exit 1 ) +cd $topdir/submodules/externals/libvpx && ./configure --target=armv7-android-gcc --sdk-path=$NDK_PATH --enable-error-concealment && 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 ) # As a memo, the config.h for zrtpcpp is generated using the command # cmake -Denable-ccrtp=false submodules/externals/libzrtpcpp +