Getting UBs from makefiles
I'm trying to clean up my engine's dependencies on third party libraries, and decided to do it TEH TRVE UNIKS way, by actually installing them. Now, I wonder how to convince make to create universal binaries. I tried to just pass
in CFLAGS, but it doesn't seem to take...
Does anyone have a decent methodology for this?
Code:
-arch ppc -arch i386Does anyone have a decent methodology for this?
Build it 2-6 times with different settings and lipo the results. This tells you all you need to know ( I hope
): OneSadCookie: Universal Binaries from Autotool'd Projects
For examples of it in action, http://onesadcookie.com/svn/Third-Party
): OneSadCookie: Universal Binaries from Autotool'd ProjectsFor examples of it in action, http://onesadcookie.com/svn/Third-Party
I had to recently build a number of third party libraries from the command-line and found this tech note immensely helpful.
http://developer.apple.com/technotes/tn2005/tn2137.html
http://developer.apple.com/technotes/tn2005/tn2137.html
The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Their two approaches both have serious flaws. The first approach doesn't work for projects which care about byte order or type sizes (ie. everything), and their second requires a machine capable of running the code that's being compiled.
Mine (which is a refinement of their second, if you want to look at it that way) requires that the project support cross-compilation (which may not be true for all projects, and for some projects will require additional configure args - ruby is in this basket), but it allows you to build all six (currently-)possible architectures from a single machine.
Mine (which is a refinement of their second, if you want to look at it that way) requires that the project support cross-compilation (which may not be true for all projects, and for some projects will require additional configure args - ruby is in this basket), but it allows you to build all six (currently-)possible architectures from a single machine.

