X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/412ebb8e3cc35d457058c31310d89ef96b7c416d..2fd3f4e8fd2c2f2c7d149fbea471d8b3fb56f15a:/unit-tests/include/common.makefile diff --git a/unit-tests/include/common.makefile b/unit-tests/include/common.makefile index 461ebb0..36b4ed9 100644 --- a/unit-tests/include/common.makefile +++ b/unit-tests/include/common.makefile @@ -6,28 +6,36 @@ SHELL = /bin/sh OS_NAME ?= MacOSX ifeq "$(OS_NAME)" "iPhoneOS" OS_VERSION ?= 3.1 - ifeq "$(OS_VERSION)" "4.3" - OS_BAROLO_FEATURES = 1 + ifeq "$(findstring -$(OS_VERSION)-,-3.0-3.1-3.2-4.0-4.1-4.2-4.3-)" "" + OS_LION_FEATURES = 1 endif - ARCH ?= armv6 - VALID_ARCHS ?= armv6 + ARCH ?= armv7 + VALID_ARCHS ?= armv7 else OS_VERSION ?= 10.7 - ifeq "$(OS_VERSION)" "10.7" - OS_BAROLO_FEATURES = 1 + ifeq "$(findstring -$(OS_VERSION)-,-10.4-10.5-10.6-)" "" + OS_LION_FEATURES = 1 endif - ARCH ?= $(shell arch) + ARCH ?= x86_64 VALID_ARCHS ?= "i386 x86_64" endif +IOSROOT = + ifeq "$(OS_NAME)" "iPhoneOS" - CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.Internal.sdk - CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.Internal.sdk -# CC = gcc-4.2 -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -# CXX = g++-4.2 -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) + #IOSROOT = $(shell xcodebuild -version -sdk iphoneos.internal Path) + IOSROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.Internal.sdk + CC = $(shell xcrun -sdk iphoneos.internal -find cc) -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -isysroot $(IOSROOT) + CXX = $(shell xcrun -sdk iphoneos.internal -find c++) -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -isysroot $(IOSROOT) + LIPO = $(shell xcrun -sdk iphoneos.internal -find lipo) + STRIP = $(shell xcrun -sdk iphoneos.internal -find strip) + INSTALL_NAME_TOOL = $(shell xcrun -sdk iphoneos.internal -find install_name_tool) else - CC = gcc-4.2 -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) - CXX = g++-4.2 -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) + CC = $(shell xcrun -find cc) -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) + CXX = $(shell xcrun -find c++) -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) + LIPO = $(shell xcrun -find lipo) + STRIP = $(shell xcrun -find strip) + INSTALL_NAME_TOOL = $(shell xcrun -find install_name_tool) endif CCFLAGS = -Wall -std=c99 @@ -65,3 +73,4 @@ ifeq ($(ARCH),thumb2) else FILEARCH = $(ARCH) endif +