2003-11-26 04:44:56 +08:00
|
|
|
|
|
|
|
case $CC in
|
|
|
|
|
|
|
|
*gcc)
|
|
|
|
|
|
|
|
# optimization
|
|
|
|
#CFLAGS="$CFLAGS -O2 -fomit-frame-pointer"
|
2004-03-01 05:03:02 +08:00
|
|
|
# optimize for Pentium Pro, Pentium II and Pentium III
|
2004-03-03 05:14:37 +08:00
|
|
|
#CFLAGS="$CFLAGS -march=pentiumpro"
|
2004-03-01 05:03:02 +08:00
|
|
|
# optimize for Pentium 4, gcc 3.x
|
2004-03-03 05:14:37 +08:00
|
|
|
#CFLAGS="$CFLAGS -march=pentium4"
|
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
|
|
|
|
2003-11-26 04:44:56 +08:00
|
|
|
OBJEXT=o
|
|
|
|
OBJOUT="-o "
|
|
|
|
BINOUT="-o "
|
|
|
|
|
|
|
|
CC_STRONG="$CC -Wall -Werror"
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
*icc)
|
|
|
|
# Intel C++ compiler 7.1
|
|
|
|
|
|
|
|
# optimization
|
|
|
|
CFLAGS="$CFLAGS -O"
|
|
|
|
# optimize for Pentium Pro, Pentium II and Pentium III
|
2004-03-03 05:14:37 +08:00
|
|
|
CFLAGS="$CFLAGS -mcpu=pentiumpro -march=pentiumpro"
|
2003-11-26 04:44:56 +08:00
|
|
|
# optimize for Pentium 4, default
|
2004-03-03 05:14:37 +08:00
|
|
|
#CFLAGS="$CFLAGS -march=pentium4"
|
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
|
|
|
|
2003-11-26 04:44:56 +08:00
|
|
|
OBJEXT=o
|
|
|
|
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"
|
|
|
|
# optimize for Pentium Pro
|
|
|
|
CFLAGS="$CFLAGS -G6"
|
|
|
|
|
|
|
|
# warnings
|
|
|
|
CFLAGS="$CFLAGS -W3"
|
|
|
|
#CFLAGS="$CFLAGS -W4"
|
|
|
|
|
|
|
|
# stop on warning
|
|
|
|
CFLAGS="$CFLAGS -WX"
|
|
|
|
|
|
|
|
# multithreaded
|
|
|
|
CFLAGS="$CFLAGS -MT"
|
|
|
|
|
|
|
|
# disable logo
|
|
|
|
CFLAGS="$CFLAGS -nologo"
|
|
|
|
|
|
|
|
# link flags
|
|
|
|
CORE_LINK="$CORE_LINK -link"
|
2003-12-05 15:11:46 +08:00
|
|
|
|
|
|
|
# msvcrt.dll
|
|
|
|
CORE_LINK="$CORE_LINK -nodefaultlib:libcmt"
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
OBJEXT=obj
|
|
|
|
OBJOUT="-Fo"
|
|
|
|
BINOUT="-Fe"
|
|
|
|
|
|
|
|
CC_STRONG="$CC -W3 -WX"
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|