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.9 2006/08/12 22:34:23 swildner Exp $
4 # This file contains common settings used for building DragonFly
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)
12 # XXX Delete -Wuninitialized by default for now -- the compiler doesn't
13 # XXX always get it right.
15 CFLAGS += -Wno-uninitialized
17 . if defined(WARNS_WERROR) && !defined(NO_WERROR)
21 CFLAGS += -Wunknown-pragmas -Wsystem-headers
27 CFLAGS += -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
30 CFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align
33 CFLAGS += -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
37 . if defined(FORMAT_AUDIT)
42 CFLAGS += -Wno-format-extra-args
43 . if defined(WARNS_WERROR) && !defined(NO_WERROR)
50 .if defined(WARNS_NO_UNUSED_PARAMETERS)
51 CFLAGS+= -Wno-unused-parameters
54 # Allow user-specified additional warning flags
55 CFLAGS += ${CWARNFLAGS}