LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to add include path to kernel module Makefile (https://www.linuxquestions.org/questions/linux-software-2/how-to-add-include-path-to-kernel-module-makefile-755616/)

oblix 09-16-2009 08:43 AM

How to add include path to kernel module Makefile
 
(SOLVED)
Hello

I have probably a stupid question. How do I add an include path for kernel module makefile? I want to include "test_kernel.h" in test_module.c
test_kernel.h resides in a different directory with relative path "../../common/" . I can include the file specifying the relative path, which works OK:

#include "../../common/test_kernel.h"

I would like include it without the relative path and specify path in Makefile similar to -I option available in application makefiles. I have tried EXTRA_CFLAGS += -I../../common/ in the makefile but no use. Any suggestions?

Thanks!

oblix 09-16-2009 08:55 AM

OK found answer, the path cannot be relative it has to be absolute path.

pixellany 09-17-2009 07:35 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Glad you solved it---next time, only one thread, please


All times are GMT -5. The time now is 11:17 PM.