OpenTTD: updated build scripts

This commit is contained in:
Sergii Pylypenko
2019-04-26 22:54:54 +03:00
parent 65fe44f66a
commit 8c34faa475
4 changed files with 14 additions and 11 deletions

View File

@@ -244,7 +244,7 @@ NDK_TOOLCHAIN_VERSION=clang
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
# Available architectures: armeabi-v7a x86 arm64-v8a x86_64
MultiABI='arm64-v8a' # armeabi-v7a x86 x86_64
MultiABI='arm64-v8a armeabi-v7a x86 x86_64'
# Optional shared libraries to compile - removing some of them will save space
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed

View File

@@ -17,21 +17,24 @@ CPU_TYPE=32
cp -a src/bin/baseset openttd-$VER-$1/bin/
} || exit 1
[ -e openttd-$VER-$1/objs/lang/english.lng ] || {
sh -c "cd openttd-$VER-$1 && ../src/configure --without-freetype --without-png --without-zlib \
--without-lzo2 --without-lzma --cpu-type=$CPU_TYPE && \
make lang && make -C objs/release endian_target.h depend && make -C objs/setting" || exit 1
rm -f openttd-$VER-$1/Makefile
} || exit 1
#[ -e openttd-$VER-$1/objs/lang/english.lng ] || {
# sh -c "cd openttd-$VER-$1 && ../src/configure --without-freetype --without-png --without-zlib \
# --without-lzo2 --without-lzma --cpu-type=$CPU_TYPE && \
# make lang && make -C objs/release endian_target.h depend && make -C objs/setting" || exit 1
# rm -f openttd-$VER-$1/Makefile
#} || exit 1
[ -e openttd-$VER-$1/Makefile ] || {
rm -f src/src/rev.cpp
env PATH=$LOCAL_PATH/..:$PATH \
env LDFLAGS=-L$LOCAL_PATH/../../../obj/local/$ARCH \
env CFLAGS_BUILD="-I." \
env CXXFLAGS_BUILD="-I." \
env LDFLAGS_BUILD="-L." \
env CLANG=1 ../setEnvironment-$1.sh sh -c "cd openttd-$VER-$1 && env ../src/configure \
--with-sdl --with-freetype --with-png --with-zlib --with-icu --with-libtimidity='pkg-config libtimidity' \
--with-lzo2=$LOCAL_PATH/../../../obj/local/$ARCH/liblzo2.so --prefix-dir='.' --data-dir='' \
--without-allegro --with-fontconfig --with-lzma --cpu-type=$CPU_TYPE --os=android"
--without-allegro --with-fontconfig --with-lzma --cpu-type=$CPU_TYPE --os=android --cc-build=gcc --cxx-build=g++"
} || exit 1
NCPU=4

View File

@@ -18,9 +18,9 @@ cd bin
export LD_LIBRARY_PATH=/usr/local/lib
if [ -z "$1" ]; then
./openttd -d 2 -r 854x480 -g opntitle.sav
./openttd -d 2 -g opntitle.sav
else
#valgrind --track-fds=yes --log-file=valgrind.log --leak-check=full \
gdb -ex run --args \
./openttd -d 2 -r 854x480 -g opntitle.sav
./openttd -d 2 -g opntitle.sav
fi