am 7eaa4dc2: Merge "Link against Mac OSX 10.5 SDK if building on 10.6." into gingerbread

Merge commit '7eaa4dc2fbc3d7b3d8a0a2576a6fc14507e176a8' into gingerbread-plus-aosp

* commit '7eaa4dc2fbc3d7b3d8a0a2576a6fc14507e176a8':
  Link against Mac OSX 10.5 SDK if building on 10.6.
This commit is contained in:
Ying Wang 2010-08-25 10:10:13 -07:00 committed by Android Git Automerger
commit f3a142b8d5

View file

@ -23,6 +23,21 @@
HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
# Use the Mac OSX SDK 10.5 if the build host is 10.6
build_mac_version := $(shell sw_vers -productVersion)
ifneq ($(filter 10.6.%, $(build_mac_version)),)
sdk_105_root := /Developer/SDKs/MacOSX10.5.sdk
ifeq ($(wildcard $(sdk_105_root)),)
$(warning *****************************************************)
$(warning * You are building on Mac OSX 10.6.)
$(warning * Can not find SDK 10.5 at $(sdk_105_root))
$(warning *****************************************************)
$(error Stop.)
endif
HOST_GLOBAL_CFLAGS += -isysroot $(sdk_105_root) -mmacosx-version-min=10.5
HOST_GLOBAL_LDFLAGS += -isysroot $(sdk_105_root) -mmacosx-version-min=10.5
endif # build_mac_version is 10.6
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error