title: How To Include Files From Multiple Directories In C on Linux?
body: <pre><code>       gcc main.c -o main -I include 
  </code></pre>
  <p>I am creating a small c application with following directory structure:</p>
  <p><em>app</em>=&gt;</p>
  <ul>
  <li>=&gt;<em>src</em> (a directory, with all source files)</li>
  <li>=&gt;<em>include</em> (a directory, with all header files)</li>
  <li>=&gt;<em>common</em> (a directory, with all common files)</li>
  <li>=&gt;<em>main.c</em></li>
  </ul>
  <p>Now I am trying to run <em>main.c</em> which contains <em>#include</em> directive to include header files from <em>include</em> directory and function calls to <em>.c</em> files in both <em>common</em> and <em>src</em> directories. I am using <em>-I</em> option but it is useful only for one directory path indication.
  How does the compiler will look in all <em>src</em>, <em>common</em> and <em>include</em> directories to resolve the calls.
  Kindly suggest me a command or <em>make</em> file to provide path of multiple directories while compiling with <em>gcc</em>.</p>