title: Makefile: Efficient way to make all '.c' files depend on a header file with the same name?
body: <p>I have a directory with 50 <code>.c</code> source files and each one of these <code>.c</code> files depends on a <code>.h</code> file with the same name plus a common header file.</p>
  <p>Example:</p>
  <pre><code>foo.c depends on foo.h and common.h
  bar.c depends on bar.h and common.h
  baz.c depends on baz.h and common.h
  </code></pre>
  <p>Is it possible to setup this dependency without having to make a separate target for each .c file?</p>
  <p>In case it matters, the ultimate output of this Makefile will be a <code>libfoo.a</code> library containing each of these <code>.o</code> files.</p>
  <h3>Edit</h3>
  <p>If at all possible I would like to do this with <code>gnu make</code> syntax and not have a target for each file whether or not that target was created manually or by something like <code>makedepend</code>.</p>