--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
PBTOMAKE claims it can do it, although I have no experience with it:
http://members.bellatlantic.net/%7Evze35xda/software.html
--
Michael Ash
Rogue Amoeba Software
Excellent, I'll give it a try. Thank you.
Along a similar direction, assuming the above doesn't already handle
it, does anyone have a link showing how to construct a simple makefile
for compiling a universal binary, for something like Hello World?
Do you have to build each individually, then manually use lipo to
stitch them together?
If you don't need different compiler flags for each architecture, you can
just add -arch ppc -arch i386 to your compiler flags and off you go.
> Do you have to build each individually, then manually use lipo to
> stitch them together?
If you need per-arch compiler flags, this is the only way to go. Note that
there's nothing which says the lipo step can't be handled by your
makefile, though. You could have a rule which takes source files, compiles
each one twice, then uses lipo to produce a .o, and the rest of the build
system won't have to be altered.
You can specify compiler/linker flags to pbotmake which will be built
into your make file so you can tweek things for a particular make
design. In our current project we do that but since we have two very
different targets & tool chains we use some awk magic to make the
required changes.
The thing you must do is to set each of your file references in the
project to project relative Path Type (in the General Tab of the Get
Info window). This is the only reference form that has enough
information for pbtomake to build the make. Not a big deal and
pbtomake will tell you which files have incorrect path types. But
XCode seems to like to switch the files to the "Relative to Enclosing
Group" form behind your back.
It's not a real user friendly program but it's for developers and ment
to run inside scripts, XCode project in -> make file out. I will have
to check if the latest version is out on the web, we added a bunch of
stuff to handle the project I mentioned which has a multiple target
project file. You get the program and source which has been useful
since others have contributed some neat things (like adding make clean
and make install).
If you have any more questions contact me at the above email address.
--jim
> If you have an existing Xcode project, using for example the "command
> line utility, Standard tool" option at new project creation, is there a
> way to "convert" that project to one using an external build utility,
> like standard make/makefile builds?
One way to do this is to write an AppleScript against Xcode that walks
your project, notes all of the important features about it, and
generates a Makefile from that.
-- Chris