• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Converting a Makefile project to Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a Makefile project to Xcode


  • Subject: Re: Converting a Makefile project to Xcode
  • From: Mike Jackson <email@hidden>
  • Date: Wed, 13 Jun 2007 10:28:08 -0400



On Jun 12, 2007, at 10:56 PM, Adam Mercer wrote:

On 12/06/07, Fritz Anderson <email@hidden> wrote:

Let me open the bidding with a couple of dumb questions...

Umbrella question: Have you determined that it will be too hard to do
by hand?

At the moment the Makefile is very complicated (as it handles building on virtually every platform you can think of), so it would be hard to do by hand. Although looking at in more detail I should be able to simplify it quite a bit... then doing it by hand should be a lot simpler.

Create a new Xcode project for the intended end product of your
build. Add the whole source tree to the project. Does that do the
right thing? Xcode goes a surprisingly long way just by inference.

Okay, so you have intermediate products, like libraries. For Library
X, add a target for the library, select all the sources for it
(simultaneously), open an Info window and change the target for those
files from End Product to Library X. Repeat for each library. If your
source tree was organized so each library had its own source
directory, all you'd have to do is select the relevant folder in the
Groups & Files view.

Each library has its own compiler flags? Each target has its own
build settings. Checking all the boxes could get tedious. You could
cheat and set the "extra flags" entries to match your flag strings.
Or it might be easier to drag all the Xcode settings into an xcconfig
file, edit that, and base the target settings on the contents of the
file. (Look up xcconfig by doing a text search on that string in the
Xcode Help window.)

But your case is probably much harder than I suppose.

Thanks, I'll give that a go.

Cheers

Adam


I'll continue the bidding and suggest if this is a cross platform project that you might want to look into using CMake (www.cmake.org) as your "project" file. CMake has a simple and easy to understand syntax and generates native build systems depending on what platform it is running on (Xcode and makefiles on OS X). I have used it successfully on OS X, Windows, IRIX and SUSE to build the same project without all the continuous tinkering that a makefile project needed. CMake takes care of all the nuances of each platform for you. The Xcode project files that are produced are pretty good and are immediately useful.
Just as an example, one of the projects that I use it for depends on 4 3rd party libs (Qt, HDF5, Boost, Tiff) and creates 1 intermediate library, 4 unit tests (using Boost unit test), and 2 Qt GUI Applications. Cmake handles all this perfectly on each platform. And I get to use Xcode on OS X when I need those facilities.


Just my 2 cents.

--
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Converting a Makefile project to Xcode (From: "Adam Mercer" <email@hidden>)
 >Re: Converting a Makefile project to Xcode (From: Fritz Anderson <email@hidden>)
 >Re: Converting a Makefile project to Xcode (From: "Adam Mercer" <email@hidden>)

  • Prev by Date: Re: Unknown escape sequence '\/'
  • Next by Date: Xcode and SCM
  • Previous by thread: Re: Converting a Makefile project to Xcode
  • Next by thread: How do I get Xcode to not pre-build header files?
  • Index(es):
    • Date
    • Thread