1 # -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
6 # ***** BEGIN GPL LICENSE BLOCK *****
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation; either version 2
11 # of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 # All rights reserved.
25 # The Original Code is: all of this file.
29 # ***** END GPL LICENSE BLOCK *****
31 # NaN compiler and linker warning levels
32 # On some platforms, you will be flooded with system include file warnings.
33 # Use hmake to filter those away.
36 # Force the correct redefinition
37 LEVEL_1_C_WARNINGS = -FIX_NAN_WARN
38 LEVEL_1_CPP_WARNINGS = -FIX_NAN_WARN
39 LEVEL_2_C_WARNINGS = -FIX_NAN_WARN
40 LEVEL_2_CPP_WARNINGS = -FIX_NAN_WARN
41 FIX_STUBS_WARNINGS = -FIX_NAN_WARN
43 ########################################################################
44 # Level 1: basic C warnings.
46 LEVEL_1_C_WARNINGS = -Wall
47 LEVEL_1_C_WARNINGS += -Wno-char-subscripts
55 # 1001 # the source file does not end w/ a newline
56 # 1110 # unreachable statement
57 # 1201 # trailing comma in enums is nonstandard
58 # 1209 # constant controlling expressions
59 # 1355 # extra semicolon is ignored
60 # 1424 # unreferenced template paramaters
61 # 1681 # virtual function override
62 # 3201 # unreferenced formal paramaters
65 LEVEL_1_C_WARNINGS = -fullwarn -woff 1001,1110,1201,1209,1355,1424,1681,3201
69 # Microsoft Compilers and cl_wrapper.pl
70 LEVEL_1_C_WARNINGS = -Wall
74 # Level 1: basic CPP warnings.
76 LEVEL_1_CPP_WARNINGS = -Wall
77 LEVEL_1_CPP_WARNINGS += -Wno-reorder
82 # see warning descriptions above
83 LEVEL_1_CPP_WARNINGS = -woff 1001,1110,1201,1209,1355,1424,1681,3201
87 # Microsoft Compilers and cl_wrapper.pl
88 LEVEL_1_CPP_WARNINGS = -Wall
92 ########################################################################
93 # Level 2: paranoia level C warnings.
94 # DO NOT REUSE LEVEL_1_ DEFINES.
96 LEVEL_2_C_WARNINGS = -Wall
97 LEVEL_2_C_WARNINGS += -W
98 # deliberately enable char-subscript warnings
99 LEVEL_2_C_WARNINGS += -Wshadow
100 LEVEL_2_C_WARNINGS += -Wpointer-arith
101 LEVEL_2_C_WARNINGS += -Wbad-function-cast
102 LEVEL_2_C_WARNINGS += -Wcast-qual
103 LEVEL_2_C_WARNINGS += -Wcast-align
104 LEVEL_2_C_WARNINGS += -Waggregate-return
105 LEVEL_2_C_WARNINGS += -Wstrict-prototypes
106 LEVEL_2_C_WARNINGS += -Wmissing-prototypes
107 LEVEL_2_C_WARNINGS += -Wmissing-declarations
108 LEVEL_2_C_WARNINGS += -Wnested-externs
109 LEVEL_2_C_WARNINGS += -Wredundant-decls
114 # see warning descriptions above
115 LEVEL_2_C_WARNINGS = -fullwarn -woff 1001,1209,1424,3201
118 # Forte / Sun WorkShop Compilers
119 LEVEL_2_C_WARNINGS = -v
123 # Microsoft Compilers and cl_wrapper.pl
124 LEVEL_2_C_WARNINGS = -Wall
128 # Level 2: paranoia level CPP warnings.
129 # DO NOT REUSE LEVEL_1_ DEFINES.
131 LEVEL_2_CPP_WARNINGS = -Wall
132 LEVEL_2_CPP_WARNINGS += -W
133 # deliberately enable char-subscript warnings
134 LEVEL_2_CPP_WARNINGS += -Wshadow
135 LEVEL_2_CPP_WARNINGS += -Wpointer-arith
136 LEVEL_2_CPP_WARNINGS += -Wcast-qual
137 LEVEL_2_CPP_WARNINGS += -Wcast-align
138 # deliberately disable aggregate-return warnings
139 LEVEL_2_CPP_WARNINGS += -Wredundant-decls
140 LEVEL_2_CPP_WARNINGS += -Wreorder
141 LEVEL_2_CPP_WARNINGS += -Wctor-dtor-privacy
142 LEVEL_2_CPP_WARNINGS += -Wnon-virtual-dtor
143 #LEVEL_2_CPP_WARNINGS += -Wold-style-cast
144 LEVEL_2_CPP_WARNINGS += -Woverloaded-virtual
145 LEVEL_2_CPP_WARNINGS += -Wsign-promo
146 LEVEL_2_CPP_WARNINGS += -Wsynth
151 # see warning descriptions above
152 LEVEL_2_CPP_WARNINGS = -fullwarn -woff 1209,1424,3201
156 # Microsoft Compilers and cl_wrapper.pl
157 LEVEL_2_CPP_WARNINGS = -Wall
161 ########################################################################
164 FIX_STUBS_WARNINGS = -Wno-unused