Mercurial > hg > nginx
annotate auto/cc/msvc @ 2641:3a79007edf41 stable-0.6
r2371 merge:
allow POST without Content-Length
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 01 Apr 2009 16:01:01 +0000 |
parents | 7d125a707158 |
children | 73a132c47076 |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
1638 | 5 # MSVC 6.0 SP2, MSVC Toolkit 2003 (7.1), MSVC 2005 Express Edition SP1 (8.0) |
455 | 6 |
7 # optimizations | |
8 | |
509 | 9 # maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy |
455 | 10 CFLAGS="$CFLAGS -O2" |
509 | 11 |
455 | 12 # enable global optimization |
509 | 13 #CFLAGS="$CFLAGS -Og" |
455 | 14 # enable intrinsic functions |
509 | 15 #CFLAGS="$CFLAGS -Oi" |
16 | |
17 # disable inline expansion | |
18 #CFLAGS="$CFLAGS -Ob0" | |
19 # explicit inline expansion | |
20 #CFLAGS="$CFLAGS -Ob1" | |
21 # explicit and implicit inline expansion | |
22 #CFLAGS="$CFLAGS -Ob2" | |
23 | |
455 | 24 # enable frame pointer omission |
509 | 25 #CFLAGS="$CFLAGS -Oy" |
455 | 26 # disable stack checking calls |
509 | 27 #CFLAGS="$CFLAGS -Gs" |
28 | |
29 # pools strings as read/write | |
30 #CFLAGS="$CFLAGS -Gf" | |
31 # pools strings as read-only | |
32 #CFLAGS="$CFLAGS -GF" | |
33 | |
455 | 34 |
35 case $CPU in | |
36 pentium) | |
37 # optimize for Pentium and Athlon | |
38 CPU_OPT="-G5" | |
39 ;; | |
40 | |
41 pentiumpro) | |
42 # optimize for Pentium Pro, Pentium II and Pentium III | |
43 CPU_OPT="-G6" | |
44 ;; | |
45 | |
46 pentium4) | |
461 | 47 # optimize for Pentium 4, MSVC 7 |
48 CPU_OPT="-G7" | |
455 | 49 ;; |
50 esac | |
51 | |
653 | 52 # __cdecl, use with OpenSSL, md5 asm, and sha1 asm |
583 | 53 #CPU_OPT="$CPU_OPT -Gd" |
503 | 54 # __stdcall |
55 #CPU_OPT="$CPU_OPT -Gz" | |
56 # __fastcall | |
57 CPU_OPT="$CPU_OPT -Gr" | |
58 | |
59 | |
455 | 60 CFLAGS="$CFLAGS $CPU_OPT" |
61 | |
62 | |
63 # warnings | |
64 | |
65 CFLAGS="$CFLAGS -W4" | |
66 | |
67 # stop on warning | |
68 CFLAGS="$CFLAGS -WX" | |
69 | |
461 | 70 # disable logo |
71 CFLAGS="$CFLAGS -nologo" | |
72 | |
73 | |
74 LINK="\$(CC)" | |
75 | |
76 # the link flags | |
77 CORE_LINK="$CORE_LINK -link -verbose:lib" | |
78 | |
79 if [ $NGX_CC_NAME = msvc7 ]; then | |
80 # link with libcmt.lib, multithreaded | |
81 LIBC="-MT" | |
82 else | |
83 # link with msvcrt.dll | |
84 LIBC="-MD" | |
85 fi | |
455 | 86 |
87 CFLAGS="$CFLAGS $LIBC" | |
88 | |
461 | 89 # Win32 GUI mode application |
90 CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib" | |
91 CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup" | |
455 | 92 |
93 # debug | |
1639
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
94 if [ $NGX_CC_NAME != msvc8 ]; then |
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
95 CFLAGS="$CFLAGS -Zi" |
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
96 CORE_LINK="$CORE_LINK -debug" |
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
97 fi |
455 | 98 |
461 | 99 |
455 | 100 # precompiled headers |
1636
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
101 CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
102 NGX_PCH="$NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
103 NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
104 NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch" |
461 | 105 |
106 | |
107 # the resource file | |
469 | 108 NGX_RES="$NGX_OBJS/nginx.res" |
461 | 109 NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC" |
110 CORE_LINK="$NGX_RES $CORE_LINK" | |
111 | |
455 | 112 |
113 ngx_objout="-Fo" | |
114 ngx_binout="-Fe" | |
115 ngx_objext="obj" | |
116 ngx_binext=".exe" | |
117 | |
633 | 118 if [ "$BMAKE" = nmake ]; then |
119 # MS nmake | |
631 | 120 |
633 | 121 ngx_long_start='@<< |
573 | 122 ' |
633 | 123 ngx_long_end='<<' |
124 ngx_long_regex_cont=' \ | |
125 ' | |
126 ngx_long_cont=' | |
573 | 127 ' |
633 | 128 |
129 else | |
130 # Borland make | |
131 | |
132 ngx_long_start='@&&| | |
133 ' | |
134 ngx_long_end='|' | |
135 fi | |
136 | |
631 | 137 # MSVC understand / in path |
455 | 138 #ngx_regex_dirsep='\\' |
139 #ngx_dirsep="\\" |