My project uses a library, which itself is configured using
autoconf (./configure blabla). In order to build a universal
library, I generated, once on a PowerPC box, once on a Intel
box, the config.h file for the respective build.
(In other words, I went for the approach where you build the
library twice; doing all in one step using "-arch ppc -arch i386"
did not work for me as some files need not even be compiled
in one build...)
What is the best way to implement something like this in Xcode?
I have the following in mind:
- add two subprojects, one generating the ppc library,
one the intel library
- add a shell script phase that calls lipo to unify them
Is this the way to go?
You could just add the -arch ppc -arch i386 flags to your ./configure files. But you'd really need to make sure that the built product ends up in a common directory where the application target can find it.