title: Running make for a C++ project under Eclipse
body: <p>I am developing a C++ application under Ubuntu 10.10, using g++ and automake. For this program I have two cpp files (main.cpp and forward.cpp, the latter one is a test class), and forward.h; I also have the following makefile:</p>
  
  <pre><code>main: \
  forward.o
      g++ -fPIC -g -Wall -D_REENTRANT  -fno-exceptions  -I/usr/local/Aria/include/ -L/usr/local/Aria/lib -lAria -lpthread -ldl -lrt \
      -o simple_controller \
      main.cpp \
      forward.o
  
  %.o : %.cpp
      g++ -c -g -Wall -D_REENTRANT -fno-exceptions  -I/usr/local/Aria/include/ $&lt; -o $@
  
  clean:
      rm -fv *.o
      rm -fv */*.o
  </code></pre>
  
  <p>When I copy all those four files into the same directory and call "make" from command line (bash) then g++ is called and my program will be compiled correctly.</p>
  
  <p>Ok, now I wanted to achieve the same under Eclipse. So I created a new unmanaged C++ project under Eclipse, so that I can provide my own makefile (the same as listed above). Unfortunately, when I now use the "Build all" option under Eclipse I can see the following console output:</p>
  
  <pre><code>make 
  make: *** No rule to make target `forward.o', needed by `main'.  Stop.
  </code></pre>
  
  <p>Since I am new to C++ development under Linux, using g++ and makefiles, I do not really understand the problem. I thought that everything that is needed to compile my application correctly is written in the makefile, as it works perfectly from the command line. But it seems I cannot copy the same makefile 1:1 into my Eclipse project.</p>
  
  <p>Any ideas what I am missing here?<br>
  Thanks in advance for your help!</p>