summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tasks/toolchains/androideabi.rake13
1 files changed, 7 insertions, 6 deletions
diff --git a/tasks/toolchains/androideabi.rake b/tasks/toolchains/androideabi.rake
index a69fd1a9d..51897667e 100644
--- a/tasks/toolchains/androideabi.rake
+++ b/tasks/toolchains/androideabi.rake
@@ -41,20 +41,21 @@ MRuby::Toolchain.new(:androideabi) do |conf|
end
if ANDROID_STANDALONE_TOOLCHAIN == nil then
- if RUBY_PLATFORM.include?('darwin') then
+ case RUBY_PLATFORM
+ when /cygwin|mswin|mingw|bccwin|wince|emx/i
+ HOST_PLATFORM = 'windows'
+ when /darwin/i
HOST_PLATFORM = 'darwin-x86'
- elsif RUBY_PLATFORM.include?('linux') then
+ when /linux/i
HOST_PLATFORM = 'linux-x86'
- elsif RUBY_PLATFORM.include?('win') then
- HOST_PLATFORM = 'windows'
else
- # Unknown host platform.
+ # Unknown host platform
end
ANDROID_TARGET_PLATFORM = ENV['ANDROID_TARGET_PLATFORM'] || DEFAULT_ANDROID_TARGET_PLATFORM
path_to_toolchain = ANDROID_NDK_HOME + '/toolchains/'
- path_to_sysroot = ANDROID_NDK_HOME + '/platforms/' + ANDROID_TARGET_PLATFORM
+ path_to_sysroot = ANDROID_NDK_HOME + '/platforms/' + ANDROID_TARGET_PLATFORM
if ANDROID_TOOLCHAIN.downcase == 'gcc' then
case ANDROID_TARGET_ARCH.downcase
when 'arch-arm', 'arm' then