compile.sh: build also HLSDK. Add check if sources are symlinked, which is really handy in development
This commit is contained in:
parent
64403a5cd8
commit
0aaf624cd7
1 changed files with 18 additions and 3 deletions
21
compile.sh
21
compile.sh
|
@ -2,8 +2,13 @@
|
||||||
|
|
||||||
ARCHS="armeabi-v7a-hard armeabi x86"
|
ARCHS="armeabi-v7a-hard armeabi x86"
|
||||||
TOOLCHAIN=4.9
|
TOOLCHAIN=4.9
|
||||||
API=21
|
API=19
|
||||||
ROOT="$PWD" # compile.sh must be run from root of android project sources
|
ROOT="$PWD" # compile.sh must be run from root of android project sources
|
||||||
|
SUBDIRS="xash3d-fwgs hlsdk-xash3d"
|
||||||
|
SYMLINKS_APPEND=""
|
||||||
|
|
||||||
|
# Cleanup libraries
|
||||||
|
rm -rf android/lib/
|
||||||
|
|
||||||
# Generate configs
|
# Generate configs
|
||||||
android/gen-config.sh android/
|
android/gen-config.sh android/
|
||||||
|
@ -11,12 +16,22 @@ android/gen-version.sh android/
|
||||||
|
|
||||||
build_native_project()
|
build_native_project()
|
||||||
{
|
{
|
||||||
./waf -t $1 -o build-$1-$2 configure -T release --android="$2,$3,$4" build
|
mkdir -p $ROOT/build-$1/$2
|
||||||
|
if [ -L "$1-sl" ]; then
|
||||||
|
cd $1-sl # need to change directory, as waf doesn't work well with symlinks(used in development purposes)
|
||||||
|
else
|
||||||
|
cd $1
|
||||||
|
fi
|
||||||
|
./waf -o $ROOT/build-$1/$2 configure -T release --android="$2,$3,$4" build || exit 1
|
||||||
|
./waf install --destdir=$ROOT/android/
|
||||||
|
cd $ROOT # obviously, we can't ../ from symlink directory, so change to our root directory
|
||||||
}
|
}
|
||||||
|
|
||||||
# Do it inside waf?
|
# Do it inside waf?
|
||||||
for i in $ARCHS; do
|
for i in $ARCHS; do
|
||||||
build_native_project "xash3d-fwgs" "$i" "$TOOLCHAIN" "$API" || exit 1
|
for j in $SUBDIRS; do
|
||||||
|
build_native_project "$j" "$i" "$TOOLCHAIN" "$API"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# Run waf
|
# Run waf
|
||||||
|
|
Loading…
Add table
Reference in a new issue