How can I build a makefile project with Xcode 5?

c++, xcode

Solution

Here are the steps

1) create a new project using the following a) go to OS X other b) Create an empty project

2) create a blank file (under OS X other again) and call it Makefile

3) create a new target (file -> new -> target - call it whatever you want) go to OS X target and select external build system

4) If you want a particular PATH variable you can Add a new user define setting (under editor -> add Build Setting -> Add user defined setting

5) This should enable your target to be the makefile

Problem

I would like to use Xcode to debug a C++ program step by step. The project can be build using make. How can I build it using Xcode 5?

Original source