build_libopenmpt_android.sh 892 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env bash
  2. set -e
  3. MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  4. cd "${MY_DIR}"
  5. cd ../..
  6. SVN_INFO=$( svn info . > /dev/null 2>&1 ; echo $? )
  7. if [ $SVN_INFO -eq 0 ] ; then
  8. MPT_SVNURL="$( svn info --xml | grep '^<url>' | sed 's/<url>//g' | sed 's/<\/url>//g' )"
  9. MPT_SVNVERSION="$( svnversion -n . | tr ':' '-' )"
  10. MPT_SVNDATE="$( svn info --xml | grep '^<date>' | sed 's/<date>//g' | sed 's/<\/date>//g' )"
  11. else
  12. MPT_SVNURL=
  13. MPT_SVNVERSION=
  14. MPT_SVNDATE=
  15. fi
  16. cd build/android_ndk/
  17. rm -f jni
  18. ln -s ../.. jni
  19. cd jni
  20. rm -f Application.mk
  21. ln -s build/android_ndk/Application.mk Application.mk
  22. rm -f Android.mk
  23. ln -s build/android_ndk/Android.mk Android.mk
  24. cd ..
  25. ndk-build MPT_SVNURL="$MPT_SVNURL" MPT_SVNVERSION="$MPT_SVNVERSION" MPT_SVNDATE="$MPT_SVNDATE" "$@" clean
  26. ndk-build MPT_SVNURL="$MPT_SVNURL" MPT_SVNVERSION="$MPT_SVNVERSION" MPT_SVNDATE="$MPT_SVNDATE" "$@"