The previous project was developed on Linux platform, which I plan to move to Xcode IDE.
Other things aside, I want to know how to quickly set up the project in Xcode.
Ideally, it should just take the top-most Makefile and carry out automatically (e.g. indexing, auto-completion, jump to definition etc.). For Eclipse, it is pretty much like that. But I could not find similar functionality in Xcode (not expert as you can tell).
Really appreciate your help.
There is no way to “import” the makefile into an Xcode project, but you can make Xcode run your makefile for you by using an external build tool. When you create your project, choose the Other category under Mac OS X, then choose External Build Tool and click the Next button. The next screen will have a text field at the bottom which allows you to enter the command to run. Make sure it is
/usr/bin/make. Then, finish creating your project. Now, whenever you build, Xcode will run make from the project directory.Note that this is not a “native” Xcode project, so you will have to do more manually. For example, you are still responsible for updating the makefile when you add/remove files, and the build settings in Xcode will be ignored unless you customize your makefile to use them. If you want to do more than build from Xcode, you will also have to edit your scheme and set up the other actions, such as specifying the executable for running.
Even though the external build tool option is not available in the iOS categories, you can use the Mac OS X version, since your makefile defines what gets built. I don’t know if Xcode will attempt to analyze/complete your code, but you may want to update your SDK and target version settings, just in case.