Skip to content

Instantly share code, notes, and snippets.

@abeluck
Created April 24, 2013 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abeluck/5454342 to your computer and use it in GitHub Desktop.
Save abeluck/5454342 to your computer and use it in GitHub Desktop.
From 0e62582754cd6dcf95e16ff294d762fa88497469 Mon Sep 17 00:00:00 2001
From: Abel Luck <abel@guardianproject.info>
Date: Wed, 24 Apr 2013 20:25:34 +0200
Subject: [PATCH] detect NDK arch on Darwin
---
Makefile.android | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile.android b/Makefile.android
index b1948f1..01a99cb 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -20,9 +20,14 @@ NDK_PLATFORM_LEVEL ?= 8
NDK_ABI=arm
NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI)
NDK_UNAME=`uname -s | tr '[A-Z]' '[a-z]'`
+ifeq ($(NDK_UNAME), "Darwin")
+NDK_ARCH=x86_64
+else
+NDK_ARCH=x86
+endif
#NDK_COMPILER_VERSION=4.4.3
NDK_COMPILER_VERSION=4.6
-NDK_TOOLCHAIN=$(NDK_BASE)/toolchains/$(NDK_ABI)-linux-androideabi-$(NDK_COMPILER_VERSION)/prebuilt/$(NDK_UNAME)-x86
+NDK_TOOLCHAIN=$(NDK_BASE)/toolchains/$(NDK_ABI)-linux-androideabi-$(NDK_COMPILER_VERSION)/prebuilt/$(NDK_UNAME)-$(NDK_ARCH)
# to use the real HOST tag, you need the latest libtool files:
# http://stackoverflow.com/questions/4594736/configure-does-not-recognize-androideabi
--
1.7.11.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment