1 # $FreeBSD: src/share/mk/bsd.sys.mk,v 1.3.2.5 2002/07/03 16:59:14 des Exp $
2 # $DragonFly: src/share/mk/bsd.sys.mk,v 1.4 2004/07/22 13:41:25 asmodai Exp $
4 # This file contains common settings used for building FreeBSD
7 # Enable various levels of compiler warning checks. These may be
8 # overridden (e.g. if using a non-gcc compiler) by defining NO_WARNS.
10 .if !defined(NO_WARNS)
13 CFLAGS += -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
14 # XXX Delete -Wuninitialized by default for now -- the compiler doesn't
15 # XXX always get it right.
16 CFLAGS += -Wno-uninitialized
17 . if defined(WARNS_WERROR) && !defined(NO_WERROR)
25 CFLAGS += -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
28 CFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align
31 CFLAGS += -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
35 . if defined(FORMAT_AUDIT)
40 CFLAGS += -Wnon-const-format -Wno-format-extra-args
41 . if defined(WARNS_WERROR) && !defined(NO_WERROR)
48 # Allow user-specified additional warning flags
49 CFLAGS += ${CWARNFLAGS}