lkml.org 
[lkml]   [2008]   [Jan]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
    /
    DateThu, 3 Jan 2008 09:19:40 +0100
    FromSam Ravnborg <>
    SubjectRe: Linux 2.6 KBUILD Help Required.
    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
    
    
    
    \
     
     \ /
      Last update: 2008-01-03 09:21    [from the cache]
    ©2003-2008