Windows – make: *** No rule to make target `all’. Stop. Eclipse error

eclipseeclipse-cdtmakefilewindows

I've just downloaded Eclipse CDT developer kit (87MB) for Windows. I've also installed MinGW, and msys.
I also added this to PATH: C:\msys\1.0\bin;C:\mingw\bin. and restarted computer after that. I've checked by type "make –version" in cmd and it works.

However, for some reason I cannot compile my C project. I don't get binary files and got only the following things in COnsole:

**** Build of configuration Default for project XXX ****

make all 
make: *** No rule to make target `all'.  Stop.

Could some one help me with this please?

Best Answer

For future reference, if you're trying to import an existing project with a makefile...

This message will still pop up if your makefile doesn't have an "all" rule. Using the "Generate Makefiles automatically" option should take care of this automatically. If you don't want makefiles made for you, you have at least 3 simple options...

Option 1

If you don't want to use a rule by that name, use twokats' solution. Here's a clarification.

  1. Go to Project Properties -> C/C++ Build -> Behaviour Tab.
  2. Leave Build (Incremental Build) Checked.
  3. Remove "all" from the text box next to Build (Incremental Build).

This lets Eclipse know you aren't trying to use a make target called "all". For some reason, that is the default.

Option 2

Use something similar to Etiennebr's makefile. Note, the all: $(TARGET) line is the rule that Eclipse is complaining it can't find.

Option 3

Substitute "all" with a rule name of your choice, and be sure to include that rule in your makefile.

Related Topic