title: Getting Started with Makefile for C++(CMake or GNUMake?)
body: <p>I have got my first project for this semester and I have been asked to submit it with a makefile. The literature available on the internet is a bit overwhelming and combined with my laziness, I came to stackoverflow for simple answers. I have found <a href="https://stackoverflow.com/questions/2481269/how-to-make-simple-c-makefile">this answer</a> by <a href="https://stackoverflow.com/users/212555/brendan-long">Brendan Long</a> as a good place to start with. </p>
  
  <p>The example he gives is:</p>
  
  <pre><code>all: a3driver.o
  g++ -o a3driver a3driver.o
  
  a3driver.o: a3driver.cpp
  g++ -c a3driver.cpp
  </code></pre>
  
  <p>which i understand. This looks exactly like the make files I have seen on a Unix system and which i used to compile c++ files(only used, did not need to understand).</p>
  
  <p>Then i search further and an answer to <a href="https://stackoverflow.com/questions/14681099/writing-a-makefile-for-a-c-program">this question</a> suggests using CMake which is completely different from the code I have pasted above. </p>
  
  <p>So my question at this stage is which direction should i take? Should I learn about the CMake or the GNUMake? I only intend to work on C++ files for now.</p>