Re: Per-architecture -D options?
Re: Per-architecture -D options?
- Subject: Re: Per-architecture -D options?
- From: Dave McCaldon <email@hidden>
- Date: Fri, 10 Feb 2006 11:55:27 -0500
I've been trying to avoid that. There are a number of projects here
and we tend to avoid "central" header files where possible because it
really slows down the compilation.
I would have to make a fair number of changes to do something like this.
Thanks though!
On Feb 10, 2006, at 11:51 AM, Clark Cox wrote:
On 2/10/06, Dave McCaldon <email@hidden> wrote:>> We have
a #define that we use across many platforms, MY_BIG_ENDIAN, for
big> endian platforms, we pass it via -D in the makefile. For
Universal Builds,> this of course complicates things because all of
the -D args get passed to> both compiler passes (i.e. the one for
ppc and the one for i386).>> Is there a way to have architecture
specific -D options, for example:>> gcc .... -DMY_BIG_ENDIAN_ppc -
DMY_LITTLE_ENDIAN_i386
Not if you're running the compiler with a single command like that.
Ifyou run the compiler as two separate invocations (one for each
arch)and then lipo the results together, you can accomplish this,
but thatdepends on how your makefiles are set up and how much
control you haveover them.
If possible, you could add the following to some central header
filein your project (__BIG_ENDIAN__ and __LITTLE_ENDIAN__ are
alreadydefined by gcc automatically):
#ifdef __BIG_ENDIAN__#define MY_BIG_ENDIAN#elif defined
(__LITTLE_ENDIAN__)#define MY_LITTLE_ENDIAN#endif
--Clark S. Cox email@hidden CV/Resume:http://
homepage.mac.com/clarkcox3/files/Resume.pdfhttp://homepage.mac.com/
clarkcox3/files/Resume.html
_______________________________________________
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