tags:

views:

310

answers:

3

(This was asked before but the answers were not conclusive) While I love development using Xcode (3.2.1), I have the need to port some projects to other UNIX systems, and even Windows. The code is all C++ but fairly complex. I'm looking for a way to automated / semi-automated generation of equivalent Makefiles out of my Xcode projects, after getting tired to do this by manual trial-and-error.

Thanks for any hints.

Manfred

+1  A: 

If you need to go cross-platform then it's probably better to use a makefile for all platforms. Xcode supports makefile builds as "legacy projects" - you lose some functionality/flexibility when you do this, but you still get the same code browsing, source level debugging, etc.

Paul R
A: 

Have you tried Pbxbuild?

Pbxbuild is used to take Xcode project files and build the code. It does this by creating GNUmakefiles, and using Make to build those.

Macmade
+1  A: 

You should probably switch to CMake for all your platforms. CMake, in turn, can generate Makefile, Xcode, Visual Studio, and KDevelop projects/builds using the CMake project description. You will, at first, need to create a CMake description for your project, but then if you only update the CMake project, going from CMake to Xcode is very easy. Or you can use the Makefile generator and create a Makefile-based Xcode project. To get started using CMake, you should read the the CMake wiki, look at the CMake Manual, and -- if you like -- you can look at my C++ Application Project Template and C++ Library Project Template which use CMake (although I have tested them only with the Makefile generator and not with the Xcode generator).

Michael Aaron Safyan