Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Some Makefile Enhancements #1

Open
Lunat1k opened this Issue May 10, 2012 · 0 comments

Comments

Projects
None yet
1 participant

Lunat1k commented May 10, 2012

Here is some Enhancements for Makefile.common. It will do the following

  1. 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
  2. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment