title: Makefile for compiling a number of .cpp and .h into a lib
body: <p>I am running Windows 7 with gcc/g++ under Cygwin. What would be the Makefile format (and extension, I think it's .mk?) for compiling a set of .cpp (C++ source) and .h (header) files into a static library (.dll). Say I have a variable set of files:</p>
  
  <ul>
  <li>file1.cpp</li>
  <li><p>file1.h</p></li>
  <li><p>file2.cpp</p></li>
  <li><p>file2.h</p></li>
  <li><p>file3.cpp</p></li>
  <li><p>file3.h</p></li>
  <li><p>....  </p></li>
  </ul>
  
  <p>What would be the makefile format (and extension) for compiling these into a static library? (I'm very new to makefiles) What would be the fastest way to do this?</p>