diff options
author | Joe Onorato <joeo@google.com> | 2012-07-25 22:24:00 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-07-25 22:24:00 -0700 |
commit | 42f0127a068ecb540dc98dea23932e074d127b20 (patch) | |
tree | ec2b445e431dd027677bc3493e450fae844f193a /core/main.mk | |
parent | 4b0c5ee8e05241aae22b900479e2fc92cd4866bf (diff) | |
parent | e3adc7fdcc04b7382d6818c5157c0a06eaf8c48f (diff) | |
download | build-42f0127a068ecb540dc98dea23932e074d127b20.zip build-42f0127a068ecb540dc98dea23932e074d127b20.tar.gz build-42f0127a068ecb540dc98dea23932e074d127b20.tar.bz2 |
am e3adc7fd: am c22da7d7: Merge "Don\'t try to build the emulator on Mac OS if the right tools aren\'t installed."
* commit 'e3adc7fdcc04b7382d6818c5157c0a06eaf8c48f':
Don't try to build the emulator on Mac OS if the right tools aren't installed.
Diffstat (limited to 'core/main.mk')
-rw-r--r-- | core/main.mk | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/core/main.mk b/core/main.mk index 5e2559b..56978c9 100644 --- a/core/main.mk +++ b/core/main.mk @@ -162,10 +162,32 @@ GCC_REALPATH = $(realpath $(shell which gcc)) ifneq ($(findstring llvm-gcc,$(GCC_REALPATH)),) # Using LLVM GCC results in a non functional emulator due to it # not honouring global register variables - $(warning ****************************************) - $(warning * gcc is linked to llvm-gcc which will *) - $(warning * not create a useable emulator. *) - $(warning ****************************************) + ifneq ($(strip $(BUILD_EMULATOR)),) + $(warning ****************************************) + $(warning * gcc is linked to llvm-gcc which will *) + $(warning * not create a useable emulator. *) + $(warning ****************************************) + endif + BUILD_EMULATOR := false +else + BUILD_EMULATOR := true +endif +# When building on Leopard or above, we need to use the 10.4 SDK +# or the generated binary will not run on Tiger. +darwin_version := $(strip $(shell sw_vers -productVersion)) +ifneq ($(filter 10.1 10.2 10.3 10.1.% 10.2.% 10.3.% 10.4 10.4.%,$(darwin_version)),) + $(error Building the Android emulator requires OS X 10.5 or above) +endif +ifneq ($(filter 10.5 10.5.% 10.6 10.6.%,$(darwin_version)),) + # We are on Leopard or Snow Leopard + MSDK=10.5 +else + # We are on Lion or beyond, and 10.6 SDK is the minimum in Xcode 4.x + MSDK=10.6 +endif +MACOSX_SDK := /Developer/SDKs/MacOSX$(MSDK).sdk +ifeq ($(strip $(wildcard $(MACOSX_SDK))),) + BUILD_EMULATOR := false endif endif |