From: Sam Ravnborg <sam@ravnborg.org>
To: murtuja bharmal <murtuja_bharmal@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.6 KBUILD Help Required.
Date: Thu, 3 Jan 2008 09:19:40 +0100 [thread overview]
Message-ID: <20080103081940.GA16597@uranus.ravnborg.org> (raw)
In-Reply-To: <127978.95127.qm@web95102.mail.in2.yahoo.com>
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
prev parent reply other threads:[~2008-01-03 8:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-03 8:15 murtuja bharmal
2008-01-03 8:19 ` Sam Ravnborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080103081940.GA16597@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=murtuja_bharmal@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®