case $CC in *gcc) # gcc 2.95.4, 3.3.2 # optimization #CFLAGS="$CFLAGS -O2 -fomit-frame-pointer" case $CPU in pentiumpro) # optimize for Pentium Pro, Pentium II and Pentium III CPU_OPT="-march=pentiumpro" ;; pentium4) # optimize for Pentium 4, gcc 3.x CPU_OPT="-march=pentium4" ;; esac CFLAGS="$CFLAGS $CPU_OPT" if [ $PCRE_OPT = NO ]; then PCRE_OPT="CFLAGS=\"-O2 -fomit-frame-pointer $CPU_OPT\"" fi if [ $MD5_OPT = NO ]; then MD5_OPT="CFLAGS=\"-O2 -fomit-frame-pointer $CPU_OPT\"" fi if [ $ZLIB_OPT = NO ]; then ZLIB_OPT="CFLAGS=\"-O2 -fomit-frame-pointer $CPU_OPT $ZLIB_ASMV\"" fi # 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" have=HAVE_GCC_VARIADIC_MACROS . auto/have LINK="\$(CC)" OBJEXT=o COMPILEONLY="-c" OBJOUT="-o " BINOUT="-o " CC_STRONG="$CC -Wall -Werror" ;; *icc) # Intel C++ compiler 7.1 # optimization CFLAGS="$CFLAGS -O" # inline functions declared with __inline CFLAGS="$CFLAGS -Ob1" # inline any function, at the compiler's discretion #CFLAGS="$CFLAGS -Ob2" case $CPU in pentiumpro) # optimize for Pentium Pro, Pentium II and Pentium III CPU_OPT="-mcpu=pentiumpro -march=pentiumpro" ;; pentium4) # optimize for Pentium 4, default CPU_OPT="-march=pentium4" ;; esac CFLAGS="$CFLAGS $CPU_OPT" if [ $PCRE_OPT = NO ]; then PCRE_OPT="CFLAGS=\"-O $CPU_OPT\"" fi if [ $MD5_OPT = NO ]; then MD5_OPT="CFLAGS=\"-O $CPU_OPT\"" fi if [ $ZLIB_OPT = NO ]; then ZLIB_OPT="CFLAGS=\"-O $CPU_OPT $ZLIB_ASMV\"" fi # warnings CFLAGS="$CFLAGS -w1" # stop on warning CFLAGS="$CFLAGS -Werror" have=HAVE_C99_VARIADIC_MACROS . auto/have LINK="\$(CC)" OBJEXT=o COMPILEONLY="-c" 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" case $CPU in pentiumpro) # optimize for Pentium Pro, Pentium II and Pentium III CPU_OPT="-G6" ;; pentium4) # optimize for Pentium 4 #CPU_OPT="-G7" ;; esac CFLAGS="$CFLAGS $CPU_OPT" # warnings CFLAGS="$CFLAGS -W3" #CFLAGS="$CFLAGS -W4" # stop on warning CFLAGS="$CFLAGS -WX" # multithreaded CFLAGS="$CFLAGS -MT" # disable logo CFLAGS="$CFLAGS -nologo" LINK="\$(CC)" # link flags CORE_LINK="$CORE_LINK -link" # msvcrt.dll CORE_LINK="$CORE_LINK -nodefaultlib:libcmt" CORE_LIBS="$CORE_LIBS msvcrt.lib" # static libc #CORE_LINK="$CORE_LINK -nodefaultlib:msvcrt" CORE_LINK="$CORE_LINK -verbose:lib" # debug CFLAGS="$CFLAGS -Yd" CORE_LINK="$CORE_LINK -debug -debugtype:coff" # precompiled headers CORE_DEPS="$CORE_DEPS ngx_config.pch" PCH="ngx_config.pch" BUILDPCH="-Ycngx_config.h" USEPCH="-Yungx_config.h" OBJEXT=obj COMPILEONLY="-c" OBJOUT="-Fo" BINOUT="-Fe" BINEXT=.exe CC_STRONG="$CC -W3 -WX" ;; wcl386) # Open Watcom 1.0 # 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" case $CPU in pentiumpro) # optimize for Pentium Pro, Pentium II and Pentium III # register-based arguments passing conventions CPU_OPT="-6r" # stack-based arguments passing conventions #CPU_OPT="-6s" ;; esac CFLAGS="$CFLAGS $CPU_OPT" # warnings #CFLAGS="$CFLAGS -w3" CFLAGS="$CFLAGS -wx" # stop on warning CFLAGS="$CFLAGS -we" # built target is NT CFLAGS="$CFLAGS -bt=nt" # multithreaded CFLAGS="$CFLAGS -bm" # debug CFLAGS="$CFLAGS -d2" # quiet CFLAGS="$CFLAGS -zq" # 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 CORE_LINK="$CORE_LINK -l=nt" OBJEXT=obj COMPILEONLY="-c" OBJOUT="-fo" BINOUT="-fe=" BINEXT=.exe INC_EQ=YES MAKE_BS=YES MAKE_SL=YES ;; esac