mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Linux 2.6  KBUILD Help Required.
@ 2008-01-03  8:15 murtuja bharmal
  2008-01-03  8:19 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: murtuja bharmal @ 2008-01-03  8:15 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

Hello,

          I have a one question.
          If I have to add  additional external flag on my external kernel module source during compilation with KBUILD.
          lest say I have one kernel module file hello.c
          and I want to add one flag -D testdebug.
         
        suppose this is my makefile.

obj-m += hello.o
all:
 make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
 make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

where I can add this flag.

Any help will be appreciated.

Thanks and Regards

----- Original Message ----
From: murtuja bharmal <murtuja_bharmal@yahoo.com>
To: Sam Ravnborg <sam@ravnborg.org>
Sent: Wednesday, 28 November, 2007 11:30:59 PM
Subject: Re: Linux 2.6 kernel module compilation without using KBUILD


> Try disabling Module version support - then you do
> not
> see the .tmp_<modulename>.o
> When you have understood this simpler case you can
> move
> on and try enabling module versioning.
> 
> But again - you really do not need to understand all
> this
> kernel internal stuff to build a module.
> If your real goal is to build a module without
> use of kbuild you are on the wrong track.
> 
> Please enligthing us why you need all this deep
> internal
> knowledge to build your module and we may be able to
> tell
> you how to use kbuild top do so.
> 
> What you are heading at now looks like waste of time
> for all parties.
> 
>     Sam
>

Hello sam,

Thanks for your time.
Any way, we already had a lot discussion.
It just matter of interest nothing else.
Actually it is just a curiosity to know little bit 
Internals of KBUILD and module versioning.
You can say, it is my bad habit when I start work on
something.
I want to understand it from base.
Unfortunately this time I didn’t get much information
from google.
Neither from kernel documentation.
I don’t have any issue on using KBUILD.

Sorry again.
Thanks for your suggestion and view.

Murtuja Bharmal






      ____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs


      Save all your chat conversations. Find them online at http://in.messenger.yahoo.com/webmessengerpromo.php

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Linux 2.6  KBUILD Help Required.
  2008-01-03  8:15 Linux 2.6 KBUILD Help Required murtuja bharmal
@ 2008-01-03  8:19 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2008-01-03  8:19 UTC (permalink / raw)
  To: murtuja bharmal; +Cc: linux-kernel

On Thu, Jan 03, 2008 at 01:45:32PM +0530, murtuja bharmal wrote:
> Hello,
> 
>           I have a one question.
>           If I have to add  additional external flag on my external kernel module source during compilation with KBUILD.
>           lest say I have one kernel module file hello.c
>           and I want to add one flag -D testdebug.
>          
>         suppose this is my makefile.
> 
> obj-m += hello.o
> all:
>  make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
> clean:
>  make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
> 
> where I can add this flag.

>From Documentation/kbuild/makefile.txt:
--- 3.7 Compilation flags

    ccflags-y, asflags-y and ldflags-y
        The three flags listed above applies only to the kbuild makefile
        where they are assigned. They are used for all the normal
        cc, as and ld invocation happenign during a recursive build.
        Note: Flags with the same behaviour were previously named:
        EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
        They are yet supported but their use are deprecated.

        ccflags-y specifies options for compiling C files with $(CC).

        Example:
                # drivers/sound/emu10k1/Makefile
                ccflags-y += -I$(obj)
                ccflags-$(DEBUG) += -DEMU10K1_DEBUG


	Sam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-03  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-03  8:15 Linux 2.6 KBUILD Help Required murtuja bharmal
2008-01-03  8:19 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®