title: ccflag option in Makefile
body: <p>I want to compile my c code (in kernel) which needs to include some header files from another directory. </p>
  
  <p>Instead of specifying the complete path to header files in c file, I would like to specify the include path in Makefile.</p>
  
  <p>My c file gets complied when the config option <code>CONFIG_FEATURE_X</code> is enabled.
  I have written the following in Makefile:</p>
  
  <pre><code>obj-$(CONFIG_FEATURE_X) += my_file.o
  
  ccflags-$(CONFIG_FEATURE_X) += -I$(obj)/../../path
  </code></pre>
  
  <ol>
  <li><p>When the <code>CONFIG_FEATURE_X</code>  is enabled (Y) in .config using make menuconfig, it works fine.</p></li>
  <li><p>But when the <code>CONFIG_FEATURE_X</code>  is enabled as module (m) in .config, this does not include the header files from the path specified and gives the file not found error.</p></li>
  </ol>
  
  <p>How can I do this?</p>