LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 09-16-2009, 08:43 AM   #1
oblix
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 0
Question 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!

Last edited by oblix; 09-16-2009 at 08:56 AM. Reason: problem solved
 
Old 09-16-2009, 08:55 AM   #2
oblix
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
OK found answer, the path cannot be relative it has to be absolute path.
 
Old 09-17-2009, 07:35 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to add include path to kernel module Makefile oblix Linux - Kernel 2 09-16-2009 09:09 AM
need help in writing Makefile for module in 2.6 kernel videsh Programming 1 01-19-2006 07:35 AM
recompile kernel to include module samfrog88 Linux - Software 1 01-06-2005 06:28 PM
Use mkinitrd to include module in kernel Travers Linux - Newbie 1 07-23-2004 02:35 PM
module makefile for c++ in kernel 2.6 yuhuahe Linux - Software 0 04-14-2004 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration