data
data copied to clipboard
Some Makefile Enhancements
Here is some Enhancements for Makefile.common. It will do the following
- Detect where xcode is installed. This is for those using xCode >= 4.3 or if someone wants to override the xcode path by using xcode-select -switch
- Detect latest SDK Version to use. It can be override by specifying SDK_VER=x.x on the command line. IE SDK_VER=5.0
SDK_ROOT = $(shell xcode-select -print-path) SDK_DIR := $(SDK_ROOT)/Platforms/iPhoneOS.platform/Developer/SDKs IOS_SDKS := $(sort $(patsubst $(SDK_DIR)/iPhoneOS%.sdk,%,$(wildcard $(SDK_DIR)/iPhoneOS*.sdk))) SDK_VER ?= $(word $(words $(IOS_SDKS)),$(IOS_SDKS)) SDK_SYSROOT = $(SDK_DIR)/iPhoneOS$(SDK_VER).sdk/ SDK_GCC = xcrun -sdk iphoneos gcc -isysroot $(SDK_SYSROOT) -miphoneos-version-min=4.0 -mapcs-frame -fomit-frame-pointer -mthumb