You need to change your project settings so that Eclipse-CDT manages your Makefiles for you.
- Select Project->Properties from the menu bar.
- Click C/C++ Build on the left in the dialog that comes up.
- Under the Builder Settings tab on the right, select “Generate Makefiles automatically” under the Makefile generation section.
- Hit OK and build again.