title: Makefiles with source files in different directories
body: <p>I have a project where the directory structure is like this:</p>
  
  <pre><code>                         $projectroot
                                |
                +---------------+----------------+
                |               |                |
              part1/          part2/           part3/
                |               |                |
         +------+-----+     +---+----+       +---+-----+
         |      |     |     |        |       |         |
       data/   src/  inc/  src/     inc/   src/       inc/
  </code></pre>
  
  <p>How should I write a makefile that would be in part/src (or wherever really)  that could comple/link on the c/c++ source files in part?/src ?</p>
  
  <p>Can I do something like
  -I$projectroot/part1/src -I$projectroot/part1/inc -I$projectroot/part2/src ...</p>
  
  <p>If that would work, is there an easier way to do it.  I've seen projects where there is a makefile in each of the corresponding part? folders.  [in this post I used the question mark like in bash syntax]</p>