1 # $FreeBSD: src/share/mk/bsd.sys.mk,v 1.3.2.5 2002/07/03 16:59:14 des Exp $
3 # This file contains common settings used for building FreeBSD
6 # Enable various levels of compiler warning checks. These may be
7 # overridden (e.g. if using a non-gcc compiler) by defining NO_WARNS.
12 CFLAGS += -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
13 # XXX Delete -Wuninitialized by default for now -- the compiler doesn't
14 # XXX always get it right.
15 CFLAGS += -Wno-uninitialized
16 . if defined(WARNS_WERROR) && !defined(NO_WERROR)
21 CFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow
25 . if defined(FORMAT_AUDIT)
30 CFLAGS += -Wnon-const-format -Wno-format-extra-args
31 . if defined(WARNS_WERROR) && !defined(NO_WERROR)
38 # Allow user-specified additional warning flags
39 CFLAGS += ${CWARNFLAGS}
41 # FreeBSD prior to 4.5 didn't have the __FBSDID() macro in <sys/cdefs.h>.
42 .if defined(BOOTSTRAPPING)
43 CFLAGS+= -D__FBSDID=__RCSID