LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-28-2009, 04:27 AM   #1
narender.d
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
Modifying EXTRA_CFLAGS for a single file without disturbing for the rest of the file


Hi,
I need to build an external kernel module for 2.6.18 kernel and reading the stuff on the web, I have writted my Makefile and it works perfectly for normal cases.
But Iam stuck with compilation of two .C files which requires a switch in the EXTRA_CFLAGS to be undefined but the other files require it as defined.

How can I modify (Eg:- undef KERNEL_WANTED switch) the EXTRA_CFLAGS for that one particular file alone keeping it defined for the rest of the source files.
For the 2.4 kernel I could have undefined the switch easily as we have a seperate compilation definition for each source file. How can I do this for 2.6 kernel where we need to only use the kbuild by just specifying the list of source files as below.

module-y = x.c
module-y += y.c
module-y += a.c
module-y += b.c

While Compiling a.c alone i want the switch to be undefined and for the rest it should be defined.

Regards
Narender
 
  


Reply


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
Is multiple owners of a single file possible? can user1 own a file that root also own dave247 Debian 3 10-09-2008 04:53 AM
Keep specific file types, delete the rest ? jchambers Programming 5 11-26-2007 06:25 PM
Grep string and redirect the rest to a file twantrd Programming 6 06-02-2006 07:37 PM
Modifying a .gif file kaplan71 Linux - General 2 06-29-2004 08:13 PM
Rest All file permissions Like a Fresh Install robinhood1995 Linux - Software 2 04-07-2002 04:41 PM

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

All times are GMT -5. The time now is 09:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration