2 # $Id: nan_warn.mk 3919 2005-03-09 19:45:59Z lukep $
4 # ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version. The Blender
10 # Foundation also sells licenses for use in proprietary software under
11 # the Blender License. See http://www.blender.org/BL/ for information
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software Foundation,
21 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
24 # All rights reserved.
26 # The Original Code is: all of this file.
28 # Contributor(s): none yet.
30 # ***** END GPL/BL DUAL LICENSE BLOCK *****
32 # NaN compiler and linker warning levels
33 # On some platforms, you will be flooded with system include file warnings.
34 # Use hmake to filter those away.
37 # Force the correct redefinition
38 LEVEL_1_C_WARNINGS
= -FIX_NAN_WARN
39 LEVEL_1_CPP_WARNINGS
= -FIX_NAN_WARN
40 LEVEL_2_C_WARNINGS
= -FIX_NAN_WARN
41 LEVEL_2_CPP_WARNINGS
= -FIX_NAN_WARN
42 FIX_STUBS_WARNINGS
= -FIX_NAN_WARN
44 ########################################################################
45 # Level 1: basic C warnings.
47 LEVEL_1_C_WARNINGS
= -Wall
48 LEVEL_1_C_WARNINGS
+= -Wno-char-subscripts
56 # 1001 # the source file does not end w/ a newline
57 # 1110 # unreachable statement
58 # 1201 # trailing comma in enums is nonstandard
59 # 1209 # constant controlling expressions
60 # 1355 # extra semicolon is ignored
61 # 1424 # unreferenced template paramaters
62 # 1681 # virtual function override
63 # 3201 # unreferenced formal paramaters
66 LEVEL_1_C_WARNINGS
= -fullwarn
-woff
1001,1110,1201,1209,1355,1424,1681,3201
70 # Microsoft Compilers and cl_wrapper.pl
71 LEVEL_1_C_WARNINGS
= -Wall
75 # Level 1: basic CPP warnings.
77 LEVEL_1_CPP_WARNINGS
= -Wall
78 LEVEL_1_CPP_WARNINGS
+= -Wno-reorder
83 # see warning descriptions above
84 LEVEL_1_CPP_WARNINGS
= -woff
1001,1110,1201,1209,1355,1424,1681,3201
88 # Microsoft Compilers and cl_wrapper.pl
89 LEVEL_1_CPP_WARNINGS
= -Wall
93 ########################################################################
94 # Level 2: paranoia level C warnings.
95 # DO NOT REUSE LEVEL_1_ DEFINES.
97 LEVEL_2_C_WARNINGS
= -Wall
98 LEVEL_2_C_WARNINGS
+= -W
99 # deliberately enable char-subscript warnings
100 LEVEL_2_C_WARNINGS
+= -Wshadow
101 LEVEL_2_C_WARNINGS
+= -Wpointer-arith
102 LEVEL_2_C_WARNINGS
+= -Wbad-function-cast
103 LEVEL_2_C_WARNINGS
+= -Wcast-qual
104 LEVEL_2_C_WARNINGS
+= -Wcast-align
105 LEVEL_2_C_WARNINGS
+= -Waggregate-return
106 LEVEL_2_C_WARNINGS
+= -Wstrict-prototypes
107 LEVEL_2_C_WARNINGS
+= -Wmissing-prototypes
108 LEVEL_2_C_WARNINGS
+= -Wmissing-declarations
109 LEVEL_2_C_WARNINGS
+= -Wnested-externs
110 LEVEL_2_C_WARNINGS
+= -Wredundant-decls
115 # see warning descriptions above
116 LEVEL_2_C_WARNINGS
= -fullwarn
-woff
1001,1209,1424,3201
119 # Forte / Sun WorkShop Compilers
120 LEVEL_2_C_WARNINGS
= -v
124 # Microsoft Compilers and cl_wrapper.pl
125 LEVEL_2_C_WARNINGS
= -Wall
129 # Level 2: paranoia level CPP warnings.
130 # DO NOT REUSE LEVEL_1_ DEFINES.
132 LEVEL_2_CPP_WARNINGS
= -Wall
133 LEVEL_2_CPP_WARNINGS
+= -W
134 # deliberately enable char-subscript warnings
135 LEVEL_2_CPP_WARNINGS
+= -Wshadow
136 LEVEL_2_CPP_WARNINGS
+= -Wpointer-arith
137 LEVEL_2_CPP_WARNINGS
+= -Wcast-qual
138 LEVEL_2_CPP_WARNINGS
+= -Wcast-align
139 # deliberately disable aggregate-return warnings
140 LEVEL_2_CPP_WARNINGS
+= -Wredundant-decls
141 LEVEL_2_CPP_WARNINGS
+= -Wreorder
142 LEVEL_2_CPP_WARNINGS
+= -Wctor-dtor-privacy
143 LEVEL_2_CPP_WARNINGS
+= -Wnon-virtual-dtor
144 #LEVEL_2_CPP_WARNINGS += -Wold-style-cast
145 LEVEL_2_CPP_WARNINGS
+= -Woverloaded-virtual
146 LEVEL_2_CPP_WARNINGS
+= -Wsign-promo
147 LEVEL_2_CPP_WARNINGS
+= -Wsynth
152 # see warning descriptions above
153 LEVEL_2_CPP_WARNINGS
= -fullwarn
-woff
1209,1424,3201
157 # Microsoft Compilers and cl_wrapper.pl
158 LEVEL_2_CPP_WARNINGS
= -Wall
162 ########################################################################
165 FIX_STUBS_WARNINGS
= -Wno-unused