Android build: more tweaking

Don't ever link against a shared libcrypt. One of the recent changes to
make things build on the various Linux build systems apparently broke the
Android build as it now adds an extra -lcrypt right after the correct
static link to libcrypt.a. Instead of fiddling even more with this and
re-breaking all the other builds I just hack around it here and remove any
calls to a simply -lcrypt as that won't work on Android.

This also passes through the remaining options on the command line to make
so we can do things like VERBOSE=1 or -j12

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-12-24 09:49:05 -08:00
parent 697bd94198
commit b747e1bc72

View file

@ -42,7 +42,12 @@ OPENSSL_VERSION=1.0.1p
LIBFTDI_VERSION=1.2
# arm or x86
export ARCH=${1-arm}
if [ "$1" = "arm" ] || [ "$1" = "x86" ] ; then
export ARCH=$1
shift
else
export ARCH=arm
fi
if [ "$ARCH" = "arm" ] ; then
QT_ARCH="armv7"
@ -315,7 +320,14 @@ cmake $MOBILE_CMAKE \
-DMAKE_TESTS=OFF \
-DFTDISUPPORT=${FTDI} \
$SUBSURFACE_SOURCE
make
# sometimes cmake tries to link both against the static and shared
# libcrypto - that's not helpful
sed -i "s!-lcrypto!!g" CMakeFiles/subsurface-mobile.dir/link.txt
# now build Subsurface and use the rest of the command line arguments
make $@
#make install INSTALL_ROOT=android_build
# bug in androiddeployqt? why is it looking for something with the builddir in it?
#ln -fs android-libsubsurface.so-deployment-settings.json android-libsubsurface-build-${ARCH}.so-deployment-settings.json