Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / auto / cc / msvc
blob1bf675e19e93cda8dae6ea6f345254bcbe9ee8b3
2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6 # MSVC 6.0 SP2
7 # MSVC Toolkit 2003 (7.1)
8 # MSVC 2005 Express Edition SP1 (8.0)
10 # optimizations
12 # maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy
13 CFLAGS="$CFLAGS -O2"
15 # enable global optimization
16 #CFLAGS="$CFLAGS -Og"
17 # enable intrinsic functions
18 #CFLAGS="$CFLAGS -Oi"
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"
27 # enable frame pointer omission
28 #CFLAGS="$CFLAGS -Oy"
29 # disable stack checking calls
30 #CFLAGS="$CFLAGS -Gs"
32 # pools strings as read/write
33 #CFLAGS="$CFLAGS -Gf"
34 # pools strings as read-only
35 #CFLAGS="$CFLAGS -GF"
38 case $CPU in
39     pentium)
40         # optimize for Pentium and Athlon
41         CPU_OPT="-G5"
42     ;;
44     pentiumpro)
45         # optimize for Pentium Pro, Pentium II and Pentium III
46         CPU_OPT="-G6"
47     ;;
49     pentium4)
50         # optimize for Pentium 4, MSVC 7
51         CPU_OPT="-G7"
52     ;;
53 esac
55 # __cdecl, default, must be used with OpenSSL, md5 asm, and sha1 asm
56 #CPU_OPT="$CPU_OPT -Gd"
57 # __stdcall
58 #CPU_OPT="$CPU_OPT -Gz"
59 # __fastcall
60 #CPU_OPT="$CPU_OPT -Gr"
63 CFLAGS="$CFLAGS $CPU_OPT"
66 # warnings
68 CFLAGS="$CFLAGS -W4"
70 # stop on warning
71 CFLAGS="$CFLAGS -WX"
73 # disable logo
74 CFLAGS="$CFLAGS -nologo"
76 # the link flags
77 CORE_LINK="$CORE_LINK -link -verbose:lib"
79 # link with libcmt.lib, multithreaded
80 LIBC="-MT"
81 # link with msvcrt.dll
82 # however, MSVC Toolkit 2003 has no MSVCRT.LIB
83 #LIBC="-MD"
85 CFLAGS="$CFLAGS $LIBC"
87 CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib"
89 # Win32 GUI mode application
90 #CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup"
92 # debug
93 # msvc8 under Wine issues
94 #     Program database manager mismatch; please check your installation
95 if [ $NGX_CC_NAME != msvc8 ]; then
96    CFLAGS="$CFLAGS -Zi"
97    CORE_LINK="$CORE_LINK -debug"
101 # MSVC 2005 supports C99 variadic macros
102 if [ $NGX_CC_NAME = msvc8 ]; then
103    have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have
107 # precompiled headers
108 CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
109 NGX_PCH="$NGX_OBJS/ngx_config.pch"
110 NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch"
111 NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch"
114 # the resource file
115 NGX_RES="$NGX_OBJS/nginx.res"
116 NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC"
117 CORE_LINK="$NGX_RES $CORE_LINK"
120 ngx_objout="-Fo"
121 ngx_binout="-Fe"
122 ngx_objext="obj"
123 ngx_binext=".exe"
125 ngx_long_start='@<<
126         '
127 ngx_long_end='<<'
128 ngx_long_regex_cont=' \
129         '
130 ngx_long_cont='
131         '
133 # MSVC understand / in path
134 #ngx_regex_dirsep='\\'
135 #ngx_dirsep="\\"