android_toolchain.sh 765 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. #-------------------------------------------------------------------------------------------------------
  3. # Copyright (C) Microsoft. All rights reserved.
  4. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  5. #-------------------------------------------------------------------------------------------------------
  6. if [ $# -eq 0 ]
  7. then
  8. echo "usage: android_toolchain <ndk_path>"
  9. exit
  10. fi
  11. ANDROID_TARGET=android-21
  12. export TOOLCHAIN=$PWD/android-toolchain-arm
  13. rm -rf $TOOLCHAIN
  14. mkdir -p $TOOLCHAIN
  15. $1/build/tools/make-standalone-toolchain.sh \
  16. --toolchain=arm-linux-androideabi-4.9 \
  17. --arch=arm \
  18. --install-dir=$TOOLCHAIN \
  19. --platform=$ANDROID_TARGET --force
  20. rm $TOOLCHAIN/bin/python