title: C++ Makefile headers and cpp
body: <p>I am trying to create a Makefile but am really struggling. I have 3 files; main.cpp, garage.cpp, and garage.hpp. The following command works but I cannot figure out how to turn it into a makefile. Any help would be greatly appreciated. The -std=c++0x is important because if I remove that and replace it with something else it won't compile. Thanks again.</p>
  
  <p>Working</p>
  
  <pre><code>g++ -std=c++0x -Wall -o main main.cpp garage.hpp garage.cpp
  </code></pre>