nginx/auto/cc

241 lines
5.3 KiB
Plaintext
Raw Normal View History

2003-11-26 04:44:56 +08:00
case $CC in
*gcc)
2004-03-05 16:34:24 +08:00
# gcc 2.95.4, 3.3.2
2003-11-26 04:44:56 +08:00
# optimization
#CFLAGS="$CFLAGS -O2 -fomit-frame-pointer"
2004-03-11 01:55:19 +08:00
case $CPU_OPT in
pentiumpro)
# optimize for Pentium Pro, Pentium II and Pentium III
LIB_OPT="-march=pentiumpro"
;;
pentium4)
# optimize for Pentium 4, gcc 3.x
LIB_OPT="-march=pentium4"
;;
esac
CFLAGS="$CFLAGS $LIB_OPT"
ZLIB_OPT="-O2 -fomit-frame-pointer $LIB_OPT"
2003-11-26 04:44:56 +08:00
# warnings
CFLAGS="$CFLAGS -O -W"
CFLAGS="$CFLAGS -Wall -Wpointer-arith"
#CFLAGS="$CFLAGS -Wconversion"
#CFLAGS="$CFLAGS -Winline"
# we have a lot of the unused function arguments
CFLAGS="$CFLAGS -Wno-unused"
# stop on warning
CFLAGS="$CFLAGS -Werror"
# ANSI C warnings
#CFLAGS="$CFLAGS -pedantic"
# debug
CFLAGS="$CFLAGS -g"
2004-02-18 23:45:21 +08:00
have=HAVE_GCC_VARIADIC_MACROS . auto/have
2003-12-01 04:03:18 +08:00
2004-03-10 03:47:07 +08:00
LINK="\$(CC)"
2003-11-26 04:44:56 +08:00
OBJEXT=o
2004-03-10 03:47:07 +08:00
COMPILEONLY="-c"
2003-11-26 04:44:56 +08:00
OBJOUT="-o "
BINOUT="-o "
CC_STRONG="$CC -Wall -Werror"
;;
*icc)
# Intel C++ compiler 7.1
# optimization
CFLAGS="$CFLAGS -O"
2004-03-11 01:55:19 +08:00
case $CPU_OPT in
pentiumpro)
# optimize for Pentium Pro, Pentium II and Pentium III
LIB_OUT="-mcpu=pentiumpro -march=pentiumpro"
;;
pentium4)
# optimize for Pentium 4, default
LIB_OPT="-march=pentium4"
;;
esac
CFLAGS="$CFLAGS $LIB_OUT"
2003-11-26 04:44:56 +08:00
# warnings
CFLAGS="$CFLAGS -w1"
# stop on warning
CFLAGS="$CFLAGS -Werror"
2004-02-18 23:45:21 +08:00
have=HAVE_C99_VARIADIC_MACROS . auto/have
2003-12-01 04:03:18 +08:00
2004-03-10 03:47:07 +08:00
LINK="\$(CC)"
2003-11-26 04:44:56 +08:00
OBJEXT=o
2004-03-10 03:47:07 +08:00
COMPILEONLY="-c"
2003-11-26 04:44:56 +08:00
OBJOUT="-o "
BINOUT="-o "
CC_STRONG="$CC -w1 -Werror"
;;
cl)
# MSVC 6.0 SP2
# optimization
# maximize speed
CFLAGS="$CFLAGS -O2"
# enable global optimization
CFLAGS="$CFLAGS -Og"
# enable intrinsic functions
CFLAGS="$CFLAGS -Oi"
# inline expansion
CFLAGS="$CFLAGS -Ob1"
# enable frame pointer omission
CFLAGS="$CFLAGS -Oy"
# disable stack checking calls
CFLAGS="$CFLAGS -Gs"
2004-03-11 01:55:19 +08:00
case $CPU_OPT in
pentiumpro)
# optimize for Pentium Pro, Pentium II and Pentium III
LIB_OUT="-G6"
;;
pentium4)
# optimize for Pentium 4
#LIB_OUT="-G7"
;;
esac
CFLAGS="$CFLAGS $LIB_OUT"
2003-11-26 04:44:56 +08:00
# warnings
CFLAGS="$CFLAGS -W3"
#CFLAGS="$CFLAGS -W4"
# stop on warning
CFLAGS="$CFLAGS -WX"
# multithreaded
CFLAGS="$CFLAGS -MT"
# disable logo
CFLAGS="$CFLAGS -nologo"
2004-03-10 03:47:07 +08:00
LINK="\$(CC)"
2003-11-26 04:44:56 +08:00
# link flags
CORE_LINK="$CORE_LINK -link"
2003-12-05 15:11:46 +08:00
# msvcrt.dll
CORE_LINK="$CORE_LINK -nodefaultlib:libcmt"
2004-03-10 03:47:07 +08:00
CORE_LIBS="$CORE_LIBS msvcrt.lib"
2003-12-05 15:11:46 +08:00
# static libc
#CORE_LINK="$CORE_LINK -nodefaultlib:msvcrt"
2003-11-26 04:44:56 +08:00
CORE_LINK="$CORE_LINK -verbose:lib"
# debug
CFLAGS="$CFLAGS -Yd"
CORE_LINK="$CORE_LINK -debug -debugtype:coff"
2004-03-10 03:47:07 +08:00
# precompiled headers
CORE_DEPS="$CORE_DEPS ngx_config.pch"
PCH="ngx_config.pch"
BUILDPCH="-Ycngx_config.h"
USEPCH="-Yungx_config.h"
2003-11-26 04:44:56 +08:00
OBJEXT=obj
2004-03-10 03:47:07 +08:00
COMPILEONLY="-c"
2003-11-26 04:44:56 +08:00
OBJOUT="-Fo"
BINOUT="-Fe"
2004-03-10 03:47:07 +08:00
BINEXT=.exe
2003-11-26 04:44:56 +08:00
CC_STRONG="$CC -W3 -WX"
;;
2004-03-05 00:34:23 +08:00
2004-03-10 03:47:07 +08:00
wcl386)
2004-03-05 00:34:23 +08:00
# Open Watcom 1.0
2004-03-05 16:34:24 +08:00
# optimization
# maximize speed
CFLAGS="$CFLAGS -ot"
# reorder instructions for best pipeline usage
CFLAGS="$CFLAGS -op"
# inline intrinsic functions
CFLAGS="$CFLAGS -oi"
# inline expansion
CFLAGS="$CFLAGS -oe"
# disable stack checking calls
CFLAGS="$CFLAGS -s"
2004-03-11 01:55:19 +08:00
case $CPU_OPT in
pentiumpro)
# optimize for Pentium Pro, Pentium II and Pentium III
# register-based arguments passing conventions
LIB_OUT="-6r"
# stack-based arguments passing conventions
#LIB_OUT="-6s"
;;
esac
CFLAGS="$CFLAGS $LIB_OUT"
2004-03-05 16:34:24 +08:00
# warnings
#CFLAGS="$CFLAGS -w3"
CFLAGS="$CFLAGS -wx"
# stop on warning
2004-03-10 03:47:07 +08:00
CFLAGS="$CFLAGS -we"
2004-03-05 16:34:24 +08:00
# built target is NT
CFLAGS="$CFLAGS -bt=nt"
# multithreaded
CFLAGS="$CFLAGS -bm"
# debug
CFLAGS="$CFLAGS -d2"
# quiet
CFLAGS="$CFLAGS -zq"
2004-03-10 03:47:07 +08:00
# precompiled headers
CORE_DEPS="$CORE_DEPS $OBJS\\ngx_config.pch"
PCH="$OBJS\\ngx_config.pch"
BUILDPCH="-fhq=$OBJS\\ngx_config.pch"
USEPCH="-fh=$OBJS\\ngx_config.pch"
LINK="\$(CC)"
# link flags
2004-03-05 16:34:24 +08:00
CORE_LINK="$CORE_LINK -l=nt"
OBJEXT=obj
2004-03-10 03:47:07 +08:00
COMPILEONLY="-c"
2004-03-05 16:34:24 +08:00
OBJOUT="-fo"
2004-03-10 03:47:07 +08:00
BINOUT="-fe="
BINEXT=.exe
2004-03-05 16:34:24 +08:00
INC_EQ=YES
MAKE_BS=YES
MAKE_SL=YES
2004-03-05 00:34:23 +08:00
;;
2003-11-26 04:44:56 +08:00
esac