title: Fail to build makefile in eclipse cdt
body: <p>I keep getting error </p>
  
  <pre><code>make: *** No rule to make target `all'.  Stop.
  </code></pre>
  
  <p>I am sure my makefile works perfectly, because I did run it on the terminal and everything fine. But when I try to import everything into eclispe by create an Empty Makefile Project, I couldn't compile the program. So did I miss something in eclipse configuration ?</p>
  
  <p>Anyway, this is my makefile, please take a look, and correct me. Thanks</p>
  
  <pre><code>CC = g++
  prog: legrec.o game.o board.o piece.o 
      $(CC) legrec.o game.o board.o piece.o -Wall -Werror -pedantic -o legrec
  legrec.o: legrec.cpp game.h
      $(CC) -Wall -Werror -pedantic -c legrec.cpp
  game.o: game.cpp game.h board.h piece.h move.h player.h
      $(CC) -Wall -Werror -pedantic -c game.cpp
  board.o: board.cpp board.h piece.h move.h player.h
      $(CC) -Wall -Werror -pedantic -c board.cpp
  piece.o: piece.cpp piece.h board.h move.h player.h
      $(CC) -Wall -Werror -pedantic -c piece.cpp
  </code></pre>
  
  <p>EDIT: Thanks for all replies, I did change the first line into all:legrec, and the previous error message was gone, however another errors came out </p>
  
  <pre><code>     cc   legrec.o   -o legrec
   Undefined symbols for architecture x86_64:
      "game::game()", referenced from:
           _main in legrec.o
      "game::printMenu()", referenced from:
           _main in legrec.o
      "game::printBoard()", referenced from:
           _main in legrec.o
      "game::nextMove()", referenced from:
           _main in legrec.o
      "game::ended()", referenced from:
           _main in legrec.o
      "game::printWinner()", referenced from:
           _main in legrec.o
      "game::~game()", referenced from:
           _main in legrec.o
      "std::terminate()", referenced from:
           _main in legrec.o
      "std::ios_base::Init::Init()", referenced from:
           __static_initialization_and_destruction_0(int, int)in legrec.o
      "std::ios_base::Init::~Init()", referenced from:
           ___tcf_0 in legrec.o
      "___gxx_personality_v0", referenced from:
           Dwarf Exception Unwind Info (__eh_frame) in legrec.o
   ld: symbol(s) not found for architecture x86_64
   collect2: ld returned 1 exit status
   make: *** [legrec] Error 1
  </code></pre>
  
  <p>I just don't understand why running same platform but the program performs differently. Before I was run on the terminal and edit on there that seems very well, but after porting into Eclipse, it drives me insance with the weird errors.</p>