Getting UBs from makefiles

Oldtimer
Posts: 834
Joined: 2002.09
Post: #1
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
Code:
-arch ppc -arch i386
in CFLAGS, but it doesn't seem to take...

Does anyone have a decent methodology for this?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Build it 2-6 times with different settings and lipo the results. This tells you all you need to know ( I hope Wink ): OneSadCookie: Universal Binaries from Autotool'd Projects

For examples of it in action, http://onesadcookie.com/svn/Third-Party
Quote this message in a reply
Member
Posts: 257
Joined: 2004.06
Post: #3
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

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
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.
Quote this message in a reply
Post Reply