4
|
1
|
|
2 # Copyright (C) Igor Sysoev
|
660
|
3 # Copyright (C) Nginx, Inc.
|
4
|
4
|
|
5
|
470
|
6 # MSVC 6.0 SP2
|
|
7 # MSVC Toolkit 2003 (7.1)
|
|
8 # MSVC 2005 Express Edition SP1 (8.0)
|
4
|
9
|
|
10 # optimizations
|
|
11
|
58
|
12 # maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy
|
4
|
13 CFLAGS="$CFLAGS -O2"
|
58
|
14
|
4
|
15 # enable global optimization
|
58
|
16 #CFLAGS="$CFLAGS -Og"
|
4
|
17 # enable intrinsic functions
|
58
|
18 #CFLAGS="$CFLAGS -Oi"
|
|
19
|
|
20 # disable inline expansion
|
|
21 #CFLAGS="$CFLAGS -Ob0"
|
|
22 # explicit inline expansion
|
|
23 #CFLAGS="$CFLAGS -Ob1"
|
|
24 # explicit and implicit inline expansion
|
|
25 #CFLAGS="$CFLAGS -Ob2"
|
|
26
|
4
|
27 # enable frame pointer omission
|
58
|
28 #CFLAGS="$CFLAGS -Oy"
|
4
|
29 # disable stack checking calls
|
58
|
30 #CFLAGS="$CFLAGS -Gs"
|
|
31
|
|
32 # pools strings as read/write
|
|
33 #CFLAGS="$CFLAGS -Gf"
|
|
34 # pools strings as read-only
|
|
35 #CFLAGS="$CFLAGS -GF"
|
|
36
|
4
|
37
|
|
38 case $CPU in
|
|
39 pentium)
|
|
40 # optimize for Pentium and Athlon
|
|
41 CPU_OPT="-G5"
|
|
42 ;;
|
|
43
|
|
44 pentiumpro)
|
|
45 # optimize for Pentium Pro, Pentium II and Pentium III
|
|
46 CPU_OPT="-G6"
|
|
47 ;;
|
|
48
|
|
49 pentium4)
|
10
|
50 # optimize for Pentium 4, MSVC 7
|
|
51 CPU_OPT="-G7"
|
4
|
52 ;;
|
|
53 esac
|
|
54
|
480
|
55 # __cdecl, default, must be used with OpenSSL, md5 asm, and sha1 asm
|
132
|
56 #CPU_OPT="$CPU_OPT -Gd"
|
52
|
57 # __stdcall
|
|
58 #CPU_OPT="$CPU_OPT -Gz"
|
|
59 # __fastcall
|
480
|
60 #CPU_OPT="$CPU_OPT -Gr"
|
52
|
61
|
|
62
|
4
|
63 CFLAGS="$CFLAGS $CPU_OPT"
|
|
64
|
|
65
|
|
66 # warnings
|
|
67
|
|
68 CFLAGS="$CFLAGS -W4"
|
|
69
|
|
70 # stop on warning
|
|
71 CFLAGS="$CFLAGS -WX"
|
|
72
|
10
|
73 # disable logo
|
|
74 CFLAGS="$CFLAGS -nologo"
|
|
75
|
|
76
|
|
77 LINK="\$(CC)"
|
|
78
|
|
79 # the link flags
|
|
80 CORE_LINK="$CORE_LINK -link -verbose:lib"
|
|
81
|
470
|
82 # link with libcmt.lib, multithreaded
|
|
83 LIBC="-MT"
|
|
84 # link with msvcrt.dll
|
|
85 # however, MSVC Toolkit 2003 has no MSVCRT.LIB
|
|
86 #LIBC="-MD"
|
4
|
87
|
|
88 CFLAGS="$CFLAGS $LIBC"
|
|
89
|
480
|
90 CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib"
|
|
91
|
10
|
92 # Win32 GUI mode application
|
480
|
93 #CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup"
|
4
|
94
|
|
95 # debug
|
480
|
96 # msvc8 under Wine issues
|
|
97 # Program database manager mismatch; please check your installation
|
346
|
98 if [ $NGX_CC_NAME != msvc8 ]; then
|
|
99 CFLAGS="$CFLAGS -Zi"
|
|
100 CORE_LINK="$CORE_LINK -debug"
|
|
101 fi
|
4
|
102
|
10
|
103
|
480
|
104 # MSVC 2005 supports C99 variadic macros
|
|
105 if [ $NGX_CC_NAME = msvc8 ]; then
|
|
106 have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have
|
|
107 fi
|
|
108
|
|
109
|
4
|
110 # precompiled headers
|
346
|
111 CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
|
|
112 NGX_PCH="$NGX_OBJS/ngx_config.pch"
|
|
113 NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch"
|
|
114 NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch"
|
10
|
115
|
|
116
|
|
117 # the resource file
|
18
|
118 NGX_RES="$NGX_OBJS/nginx.res"
|
10
|
119 NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC"
|
|
120 CORE_LINK="$NGX_RES $CORE_LINK"
|
|
121
|
4
|
122
|
|
123 ngx_objout="-Fo"
|
|
124 ngx_binout="-Fe"
|
|
125 ngx_objext="obj"
|
|
126 ngx_binext=".exe"
|
|
127
|
488
|
128 ngx_long_start='@<<
|
496
|
129 '
|
488
|
130 ngx_long_end='<<'
|
|
131 ngx_long_regex_cont=' \
|
182
|
132 '
|
488
|
133 ngx_long_cont='
|
122
|
134 '
|
182
|
135
|
180
|
136 # MSVC understand / in path
|
4
|
137 #ngx_regex_dirsep='\\'
|
|
138 #ngx_dirsep="\\"
|