Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2013 11:57:12 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-drivers@freebsd.org
Subject:   Re: Newbie question - Custom compiler flags in Makefile
Message-ID:  <201307101157.13096.jhb@freebsd.org>
In-Reply-To: <CAEaYdZdDtcQ0O3deQvCnPgtf_7YYtV3G0ZJf8Wy76iXPD%2B9Emw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On Tuesday, July 02, 2013 4:53:50 am Arjun wrote:
> Hey,
> 
> I am writing a memory driver and i am using the standard freebsd driver
> Makefile which includes .bsd.kmod.mk
> 
> So, this comes with its own compiler flags. Specifically, i dont want the
> -Wmissing-prototypes option. How do i remove it.
> 
> In general, how can one change the default compiler flags for compilation. ?
> 
> I read bsd.sys.mk file and it seems that for the above option to be
> removed, i need to have WARNS <3. But i want all other -W options except
> for this.
> 
> How do i do this.?
> 
> Any help is appreciated.

Well, you could just add the missing prototypes. :)

However, you can probably manipulate CFLAGS using the modifiers make supports?

Something like:

CFLAGS = ${CFLAGS:N-Wmissing-prototype}

(might need := rather than =)

-- 
John Baldwin


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307101157.13096.jhb>