Re: Select SDK in a Makefile?
Re: Select SDK in a Makefile?
- Subject: Re: Select SDK in a Makefile?
- From: Jason Stephenson <email@hidden>
- Date: Wed, 07 May 2008 20:33:27 -0400
Michael Crawford wrote:
Hi Again,
Some of our projects just use Makefiles, and don't have .xcodeproj
files. The Makefiles have the SDK paths hardcoded in them like this:
/Developer/SDKs/10.4u.sdk
That breaks when XCode 2.5 is used on Leopard.
Is there a way to have a Makefile find the SDK when building on both
Leopard and Tiger? Under Tiger the SDK would be in the usual location
in /Developer.
In just playing around with this in some of my own Makefiles, I found
that I had to add
-iframework/System/Library/Frameworks/<Framework>.framework to the
compiler options to get a working compile against the 10.4u.sdk on Leopard.
So, for a command dylib that one of my command line tools relies on, if
I want to compile for 10.4 on Leopard the whole command line looks like
this:
MACOSX_DEPLOYMENT_TARGET=10.4 \
gcc -dynamiclib -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk \
-iframework/System/Library/Frameworks/Foundation.framework \
-framework Foundation TaggableObject.m \
-current_version 1.0 -compatibility_version 1.0 \
-o libTagging.A.dylib
The actual command line tool uses the same options, more or less. I
gather that you'd need to add
-iframework/System/Library/Frameworks/<Framework>.framework for each
framework that you use.
Hope that helps,
Jason
Thanks!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden