I want to generate a Makefile from an existing Xcode project on the Mac. Specifically, an existing iPhone, Objective-C program on the Mac.

I found PBToMake, but it looks like it is for Xcode 2.1 and when I tried using it, it did not work for an Xcode 3.1 project.

+2  A: 

To build your project outside of the IDE, check out the xcodebuild command-line tool.

Chris Hanson
This looks like it builds a project, but doesn't convert an existing project to a standard makefile like the questioner asked. Am I mistaken in this? If so, would you mind editing editing your answer to include how you can use xcodebuild to generate the makefile?
It doesn't generate a makefile - there isn't a way to do so. Usually when I've heard people ask "How do I generate a makefile?" it's because they want to build their project from the command line, and just start out assuming that's the way to do so.
Chris Hanson

You could try mfg. It is template based and I think (I haven't played with it too much) you could get it to generate a suitable makefile.