Commit 95a767fd authored by Thomas Guillem's avatar Thomas Guillem

build: find vlc dir in more places

This script can now be called from VLC directory
parent ba324b62
......@@ -160,7 +160,15 @@ else
fi
SRC_DIR=$PWD
VLC_SRC_DIR="$SRC_DIR/vlc"
if [ -f $SRC_DIR/src/libvlc.h ];then
VLC_SRC_DIR="$SRC_DIR"
elif [ -d $SRC_DIR/vlc ];then
VLC_SRC_DIR=$SRC_DIR/vlc
else
echo "Could not find vlc sources"
exit 1
fi
VLC_BUILD_DIR=`realpath $VLC_SRC_DIR/build-android-${TARGET_TUPLE}`
VLC_OUT_PATH="$SRC_DIR/build/ndk"
VLC_OUT_LDLIBS="-L$VLC_OUT_PATH/libs/${ANDROID_ABI} -lvlc"
......@@ -429,9 +437,9 @@ VLC_MODULE_BLACKLIST="
# Build buildsystem tools #
###########################
export PATH="`pwd`/vlc/extras/tools/build/bin:$PATH"
export PATH="$VLC_SRC_DIR/extras/tools/build/bin:$PATH"
echo "Building tools"
cd vlc/extras/tools
cd $VLC_SRC_DIR/extras/tools
./bootstrap
avlc_checkfail "buildsystem tools: bootstrap failed"
make $MAKEFLAGS
......@@ -442,7 +450,7 @@ cd ../../..
VLC_CONTRIB="$VLC_SRC_DIR/contrib/$TARGET_TUPLE"
cd vlc
cd $VLC_SRC_DIR
#############
# BOOTSTRAP #
......@@ -627,7 +635,7 @@ printf "/* Autogenerated from the list of modules */\n#include <unistd.h>\n$DEFI
DEFINITION=""
BUILTINS="const void *libvlc_functions[] = {\n";
for func in `cat vlc/lib/libvlc.sym`
for func in `cat $VLC_SRC_DIR/lib/libvlc.sym`
do
DEFINITION=$DEFINITION"int $func(void);\n";
BUILTINS="$BUILTINS $func,\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment