Alex Rivera | Logout

How can you generate a Makefile from an Xcode project?

Asked 2008-09-18T18:17:39.163
18

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.

Edit
Report

1 Answer

2

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.

answered 2012-01-06T14:26:15.723

Your Answer