Re: Per architecture file subsets in a Compile files build phase
Re: Per architecture file subsets in a Compile files build phase
- Subject: Re: Per architecture file subsets in a Compile files build phase
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 18 Mar 2009 09:17:09 +0100
Le 18 mars 09 à 00:38, Daniel Rodriguez Troitiño a écrit :
2009/3/17 Jim Correia <email@hidden>:
On Mar 17, 2009, at 6:28 PM, Daniel Rodriguez Troitiño wrote:
I'm trying to adapt a project to use Xcode. This project has to be
compiled for several architectures (PPC & x86), and both
architectures
have some files specific for the architecture (optimized version of
some functions, with some inline assembly). Then I have my target (a
library), which will be great if it can be a "fat" library.
How much source are we talking about?
Building a static library in a separate target is one route.
Another is to wrap arch specific functions in
#if __ARCH__
#endif
- Jim
A few dozen files in each architecture.
I have already though about the preprocessor, but it seems a little
bit dirty wrapping entire files in preprocessor conditionals. But yes,
that would be a solution.
An other solution (but maybe not applicable) is to use one file with
preprocessor conditions and includes.
#if __ppc__
#include "ppc_file1.c"
#include "ppc_file2.c"
#include "ppc_file3.c"
#else
...
#endif
And of course, not including ppc_filex.c in the compilation Build Step.
_______________________________________________
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