Creating a Makefile from an Xcode Project to Port the Project to Other UNIX Systems

(they asked about this before, but the answers were not final) Although I like the development using Xcode (3.2.1), I need to transfer some projects to other UNIX systems and even to Windows. The code is all C ++, but rather complicated. I am looking for a way to automatically / semi-automatically generate equivalent Makefiles from my Xcode projects, after you get tired of doing this with a manual trial and error.

Thanks for any tips.

Manfred

+4
source share
3 answers

You should probably upgrade to CMake for all of your platforms. CMake, in turn, can create Makefile, Xcode, Visual Studio, and KDevelop / builds projects using the CMake project description. First you need to create a CMake description for your project, but if you just upgrade the CMake project, the transition from CMake to Xcode is very simple. Or you can use the Makefile generator and create an Xcode project based on the Makefile. To get started with CMake, you should read the CMake wiki , see the CMake Manual , and - if you want - you can see my C ++ Application Project Template and C ++ Library Project Template that use CMake (although I tested them only with a generator Makefile, not with the Xcode generator).

+5
source

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

+2
source

Have you tried Pbxbuild ?

Pbxbuild is used to create Xcode project files and create code. He does this by creating GNUmakefiles and using Make to create them.

0
source

Source: https://habr.com/ru/post/1304480/


All Articles