Klaus Demo nginx / ac64333
delete the auto/cc file to create the auto/cc directory Igor Sysoev 15 years ago
1 changed file(s) with 0 addition(s) and 376 deletion(s). Raw diff Collapse all Expand all
+0
-376
auto/cc less more
0
1 # Copyright (C) Igor Sysoev
2
3
4 CFLAGS="$CFLAGS $CC_OPT"
5
6 case $CC in
7
8 *gcc*)
9 # gcc 2.7.2.3, 2.8.1, 2.95.4,
10 # 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4
11
12 # optimizations
13 #CFLAGS="$CFLAGS -O2 -fomit-frame-pointer"
14
15 case $CPU in
16 pentium)
17 # optimize for Pentium and Athlon
18 CPU_OPT="-march=pentium"
19 ;;
20
21 pentiumpro)
22 # optimize for Pentium Pro, Pentium II and Pentium III
23 CPU_OPT="-march=pentiumpro"
24 ;;
25
26 pentium4)
27 # optimize for Pentium 4, gcc 3.x
28 CPU_OPT="-march=pentium4"
29 ;;
30 esac
31
32 # STUB for batch builds
33 if [ $CC = gcc27 ]; then CPU_OPT=; fi
34
35 CFLAGS="$CFLAGS $PIPE $CPU_OPT"
36
37 if [ ".$PCRE_OPT" = "." ]; then
38 PCRE_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
39 else
40 PCRE_OPT="$PCRE_OPT $PIPE"
41 fi
42
43 if [ ".$MD5_OPT" = "." ]; then
44 MD5_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
45 else
46 MD5_OPT="$MD5_OPT $PIPE"
47 fi
48
49 if [ ".$ZLIB_OPT" = "." ]; then
50 ZLIB_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
51 else
52 ZLIB_OPT="$ZLIB_OPT $PIPE"
53 fi
54
55 # warnings
56 CFLAGS="$CFLAGS -O -W"
57 CFLAGS="$CFLAGS -Wall -Wpointer-arith"
58 #CFLAGS="$CFLAGS -Wconversion"
59 #CFLAGS="$CFLAGS -Winline"
60
61 # we have a lot of the unused function arguments
62 CFLAGS="$CFLAGS -Wno-unused"
63
64 # stop on warning
65 CFLAGS="$CFLAGS -Werror"
66
67 # ANSI C warnings
68 #CFLAGS="$CFLAGS -pedantic"
69
70 # debug
71 CFLAGS="$CFLAGS -g"
72
73 # DragonFly's gcc3 generates DWARF
74 #CFLAGS="$CFLAGS -g -gstabs"
75
76 have=HAVE_GCC_VARIADIC_MACROS . auto/have
77
78 if [ ".$CPP" = "." ]; then
79 CPP="$CC -E"
80 fi
81
82 LINK="\$(CC)"
83
84 INCOPT="-I "
85 COMPOPT="-c"
86 OBJOUT="-o "
87 BINOUT="-o "
88 OBJEXT="o"
89
90 CC_STRONG="$CC -Wall -Werror"
91 ;;
92
93
94 *icc)
95 # Intel C++ compiler 7.1, 8.0
96
97 # optimizations
98 CFLAGS="$CFLAGS -O"
99 # inline functions declared with __inline
100 #CFLAGS="$CFLAGS -Ob1"
101 # inline any function, at the compiler's discretion
102 CFLAGS="$CFLAGS -Ob2"
103
104 # single-file IP optimizations
105 #IPO="-ip"
106 # multi-file IP optimizations
107 IPO="-ipo -ipo_obj"
108 CFLAGS="$CFLAGS $IPO"
109 CORE_LINK="$CORE_LINK $IPO"
110 CORE_LINK="$CORE_LINK -opt_report_file=$OBJS/opt_report_file"
111
112 case $CPU in
113 pentium)
114 # optimize for Pentium and Athlon
115 CPU_OPT="-march=pentium"
116 ;;
117
118 pentiumpro)
119 # optimize for Pentium Pro, Pentium II and Pentium III
120 CPU_OPT="-mcpu=pentiumpro -march=pentiumpro"
121 ;;
122
123 pentium4)
124 # optimize for Pentium 4, default
125 CPU_OPT="-march=pentium4"
126 ;;
127 esac
128
129 CFLAGS="$CFLAGS $CPU_OPT"
130
131 if [ ".$PCRE_OPT" = "." ]; then
132 PCRE_OPT="-O $IPO $CPU_OPT"
133 fi
134
135 if [ ".$MD5_OPT" = "." ]; then
136 MD5_OPT="-O $IPO $CPU_OPT"
137 fi
138
139 if [ ".$ZLIB_OPT" = "." ]; then
140 ZLIB_OPT="-O $IPO $CPU_OPT"
141 fi
142
143 # warnings
144 CFLAGS="$CFLAGS -w1"
145 #CFLAGS="$CFLAGS -w2"
146
147 # stop on warning
148 CFLAGS="$CFLAGS -Werror"
149
150 # debug
151 CFLAGS="$CFLAGS -g"
152
153 have=HAVE_C99_VARIADIC_MACROS . auto/have
154
155 LINK="\$(CC)"
156
157 INCOPT="-I "
158 COMPOPT="-c"
159 OBJOUT="-o "
160 BINOUT="-o "
161 OBJEXT="o"
162
163 CC_STRONG="$CC -w1 -Werror"
164 ;;
165
166
167 cl)
168 # MSVC 6.0 SP2
169
170 # optimizations
171
172 # maximize speed
173 CFLAGS="$CFLAGS -O2"
174 # enable global optimization
175 CFLAGS="$CFLAGS -Og"
176 # enable intrinsic functions
177 CFLAGS="$CFLAGS -Oi"
178 # inline expansion
179 CFLAGS="$CFLAGS -Ob1"
180 # enable frame pointer omission
181 CFLAGS="$CFLAGS -Oy"
182 # disable stack checking calls
183 CFLAGS="$CFLAGS -Gs"
184
185 case $CPU in
186 pentium)
187 # optimize for Pentium and Athlon
188 CPU_OPT="-G5"
189 ;;
190
191 pentiumpro)
192 # optimize for Pentium Pro, Pentium II and Pentium III
193 CPU_OPT="-G6"
194 ;;
195
196 pentium4)
197 # optimize for Pentium 4
198 #CPU_OPT="-G7"
199 ;;
200 esac
201
202 CFLAGS="$CFLAGS $CPU_OPT"
203
204 # warnings
205 #CFLAGS="$CFLAGS -W3"
206 CFLAGS="$CFLAGS -W4"
207
208 # stop on warning
209 CFLAGS="$CFLAGS -WX"
210
211 # link with libcmt.lib, multithreaded
212 #LIBC="-MT"
213 # link with msvcrt.dll
214 LIBC="-MD"
215
216 CFLAGS="$CFLAGS $LIBC"
217
218 # disable logo
219 CFLAGS="$CFLAGS -nologo"
220
221 LINK="\$(CC)"
222
223 # link flags
224 CORE_LINK="$CORE_LINK -link -verbose:lib"
225
226 # debug
227 CFLAGS="$CFLAGS -Yd"
228 CORE_LINK="$CORE_LINK -debug -debugtype:coff"
229
230 # precompiled headers
231 CORE_DEPS="$CORE_DEPS ngx_config.pch"
232 PCH="ngx_config.pch"
233 BUILDPCH="-Ycngx_config.h"
234 USEPCH="-Yungx_config.h"
235
236 INCOPT="-I "
237 COMPOPT="-c"
238 OBJOUT="-Fo"
239 BINOUT="-Fe"
240 OBJEXT="obj"
241 BINEXT=".exe"
242 #DIRSEP='\\'
243 ;;
244
245
246 wcl386)
247 # Open Watcom C 1.0, 1.2
248
249 # optimizations
250
251 # maximize speed
252 CFLAGS="$CFLAGS -ot"
253 # reorder instructions for best pipeline usage
254 CFLAGS="$CFLAGS -op"
255 # inline intrinsic functions
256 CFLAGS="$CFLAGS -oi"
257 # inline expansion
258 CFLAGS="$CFLAGS -oe"
259 # disable stack checking calls
260 CFLAGS="$CFLAGS -s"
261
262 case $CPU in
263 pentium)
264 # optimize for Pentium and Athlon
265 # register-based arguments passing conventions
266 CPU_OPT="-5r"
267 # stack-based arguments passing conventions
268 #CPU_OPT="-5s"
269 ;;
270
271 pentiumpro)
272 # optimize for Pentium Pro, Pentium II and Pentium III
273 # register-based arguments passing conventions
274 CPU_OPT="-6r"
275 # stack-based arguments passing conventions
276 #CPU_OPT="-6s"
277 ;;
278 esac
279
280 CFLAGS="$CFLAGS $CPU_OPT"
281
282 # warnings
283 #CFLAGS="$CFLAGS -w3"
284 CFLAGS="$CFLAGS -wx"
285
286 # stop on warning
287 CFLAGS="$CFLAGS -we"
288
289 # built target is NT
290 CFLAGS="$CFLAGS -bt=nt"
291
292 # multithreaded
293 CFLAGS="$CFLAGS -bm"
294
295 # debug
296 CFLAGS="$CFLAGS -d2"
297
298 # quiet
299 CFLAGS="$CFLAGS -zq"
300
301 # Open Watcom C 1.2
302 #have=HAVE_C99_VARIADIC_MACROS . auto/have
303
304 # precompiled headers
305 CORE_DEPS="$CORE_DEPS $OBJS\\ngx_config.pch"
306 PCH="$OBJS\\ngx_config.pch"
307 BUILDPCH="-fhq=$OBJS\\ngx_config.pch"
308 USEPCH="-fh=$OBJS\\ngx_config.pch"
309
310 LINK="\$(CC)"
311
312 # link flags
313 CORE_LINK="$CORE_LINK -l=nt"
314
315 INCOPT="-i="
316 COMPOPT="-c"
317 OBJOUT="-fo"
318 BINOUT="-fe="
319 OBJEXT="obj"
320 BINEXT=".exe"
321 DIRSEP='\\'
322
323 MAKE_SL=YES
324 ;;
325
326
327 bcc32)
328 # Borland C++ 5.5
329
330 # optimizations
331
332 # maximize speed
333 CFLAGS="$CFLAGS -O2"
334
335 case $CPU in
336 pentium)
337 # optimize for Pentium and Athlon
338 CPU_OPT="-5"
339 ;;
340
341 pentiumpro)
342 # optimize for Pentium Pro, Pentium II and Pentium III
343 CPU_OPT="-6"
344 ;;
345 esac
346
347 CFLAGS="$CFLAGS $CPU_OPT"
348
349 # multithreaded
350 CFLAGS="$CFLAGS -tWM"
351
352 # stop on warning
353 CFLAGS="$CFLAGS -w!"
354
355 # disable logo
356 CFLAGS="$CFLAGS -q"
357
358 # precompiled headers
359 CORE_DEPS="$CORE_DEPS $OBJS\\ngx_config.csm"
360 PCH="$OBJS\\ngx_config.csm"
361 BUILDPCH="-H=$OBJS\\ngx_config.csm"
362 USEPCH="-Hu -H=$OBJS\\ngx_config.csm"
363
364 LINK="\$(CC)"
365
366 INCOPT="-I"
367 COMPOPT="-c"
368 OBJOUT="-o"
369 BINOUT="-e"
370 OBJEXT="obj"
371 BINEXT=".exe"
372 DIRSEP='\\'
373 ;;
374
375 esac