X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/832b6fce7c321434378950ecd081b6c34cc3a24f..df9d6cf7fb01f4e3d4128fe7a687984fe0b45584:/unit-tests/include/common.makefile diff --git a/unit-tests/include/common.makefile b/unit-tests/include/common.makefile index ba256c8..3d6535a 100644 --- a/unit-tests/include/common.makefile +++ b/unit-tests/include/common.makefile @@ -23,12 +23,22 @@ endif IOSROOT = ifeq "$(OS_NAME)" "iPhoneOS" - IOSROOT = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.Internal.sdk - CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cc -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -isysroot $(IOSROOT) - CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/c++ -arch ${ARCH} -miphoneos-version-min=$(OS_VERSION) -isysroot $(IOSROOT) + #IOSROOT = $(shell xcodebuild -version -sdk iphoneos.internal Path) + IOSROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.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 = cc -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) - CXX = c++ -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) + ifeq "$(OSX_SDK_ROOT)" "" + OSX_SDK_ROOT = $(shell xcodebuild -version -sdk macosx.internal Path) + endif + CC = $(shell xcrun -find cc) -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) -isysroot $(OSX_SDK_ROOT) + CXX = $(shell xcrun -find c++) -arch ${ARCH} -mmacosx-version-min=$(OS_VERSION) -isysroot $(OSX_SDK_ROOT) + LIPO = $(shell xcrun -find lipo) + STRIP = $(shell xcrun -find strip) + INSTALL_NAME_TOOL = $(shell xcrun -find install_name_tool) endif CCFLAGS = -Wall -std=c99 @@ -66,3 +76,4 @@ ifeq ($(ARCH),thumb2) else FILEARCH = $(ARCH) endif +