Advertisement
Guest User

Untitled

a guest
Mar 8th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # set the base path to your Android NDK (or export NDK to environment)
  4.  
  5. #set -x
  6.  
  7. if [[ "x$NDK_BASE" == "x" ]]; then
  8. NDK_BASE=/opt/android-ndk
  9. echo "No NDK_BASE set, using $NDK_BASE"
  10. fi
  11.  
  12. NDK_PLATFORM_VERSION=8
  13. NDK_ABI=arm
  14. NDK_COMPILER_VERSION=4.6
  15. NDK_SYSROOT=$NDK_BASE/platforms/android-$NDK_PLATFORM_VERSION/arch-$NDK_ABI
  16. NDK_UNAME=`uname -s | tr '[A-Z]' '[a-z]'` # Convert Linux -> linux
  17. HOST=$NDK_ABI-linux-androideabi
  18. if [ -d $NDK_BASE/toolchains/$HOST-$NDK_COMPILER_VERSION/prebuilt/$NDK_UNAME-x86 ]; then
  19. NDK_TOOLCHAIN_BASE=$NDK_BASE/toolchains/$HOST-$NDK_COMPILER_VERSION/prebuilt/$NDK_UNAME-x86
  20. else
  21. NDK_TOOLCHAIN_BASE=$NDK_BASE/toolchains/$HOST-$NDK_COMPILER_VERSION/prebuilt/$NDK_UNAME-x86_64
  22. fi
  23. export CC="$NDK_TOOLCHAIN_BASE/bin/$HOST-gcc --sysroot=$NDK_SYSROOT"
  24. export LD=$NDK_TOOLCHAIN_BASE/bin/$HOST-ld
  25.  
  26. ./configure \
  27. --host=$HOST \
  28. --without-x \
  29. --with-driver=none \
  30. --with-port=none \
  31. --with-irq=none \
  32. --with-kerneldir=/E/i3android-interra/lichee/linux-3.4 \
  33. "$@" && \
  34. make ARCH=arm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement