How to generate xcode project through terminal?

How can you generate a Makefile from an Xcode project?

  • 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 http://members.bellatlantic.net/%7Evze35xda/software.html, 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.

  • Answer:

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

Tim at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

GNUStep provides 'http://wiki.gnustep.org/index.php/Pbxbuild' to convert a .xcodeproj file into a GNUMakefile.

rage

You could try http://freshmeat.net/projects/mfg/?topic_id=46. It is template based and I think (I haven't played with it too much) you could get it to generate a suitable makefile.

unclerojelio

It's not an automated way of generating a Makefile, but I found it at least gets a list of source files that are built for a target. I'm using XCode 4.0.2 in this case.. select the project top node select the target in the target list. Choose "Build Phases" Open the "Compile Sources" Select one of the source files PRess Command-A to select all Press Command-C to copy Paste in your favorite text editor and Regex away to restructure. The pasted output is FULL pathnames to each source file.

Urkle

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.