Reputation: 100023
I'm building a lib for iPhone SDK use using the SDK, and I use Makefiles, not xcode.
Consider this command line (or at least the beginning of a compile command line).
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv6 -pipe -no-cpp-precomp -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk
I thought to add -arch i386 to the command line, but that doesn't work, since the iPhone platform does not include the simulator headers, and vica versa. I know that there's a means with lipo to combine them after the fact, but that doesn't fit very cleanly into my situation. Is there a mechanism I'm missing, other than manually creating a merged platform directory?
Upvotes: 0
Views: 70
Reputation: 58448
As far as I know, you can't compile separate architectures from separate SDKs in one fell swoop.
I could be wrong, and I'd be happy to be corrected, but I think the only way is to compile it twice, once for arm6/7 and once for i386 and then lipo
the two resulting libraries.
Upvotes: 1