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

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


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.


Just for your reference, there is a way to configure the CDT build options. I had this same error message (although I did have a make target - just not named "all") and found this solution (for Galileo + CDT):

Right click your project and choose Properties. The Properties dialog will appear and you should see a C/C++ Build option where you can set specific build options. Highlight this item, and the Properties page will appear. Choose the configuration you wish to modify, and then in the section below that you should see 2 tabs: Builder Settings and Behavior. It is the Behavior tab you want. In this section you can set preferences for build settings and workbench settings, including specifying a target name (default is "all") or turning off automatic builds.

This was incredibly helpful to me when I started using the CDT. My source code is separate from the build area, and until I configure, no makefiles exist. When I configured, my default target name is explicitly "default", not "all". It was annoying to have Eclipse report an error in my project before I did anything. Setting up the environment to match my development worked wonders. HTH.


right click the project Properties->C/C++ Build, in the "Builder Settings" check the "Generate Makefiles automatically" option, and then select the "Builder type" option to "Internal builder", and then click ok, the problem was solved!