diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-03-09 22:47:07 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-03-09 22:47:07 +0300 |
commit | fc5a10aedcdd8cf261ecc164941562bc52fe415d (patch) | |
tree | dc6ad97805a315afca82e852717f84debb30eb54 /auto | |
parent | 833823cbb89482710779c59206b77c197c3747d2 (diff) |
nginx-0.0.2-2004-03-09-22:47:07 import
Diffstat (limited to 'auto')
-rw-r--r-- | auto/cc | 48 | ||||
-rw-r--r-- | auto/init | 3 | ||||
-rw-r--r-- | auto/lib/make | 22 | ||||
-rw-r--r-- | auto/lib/md5/conf | 26 | ||||
-rw-r--r-- | auto/lib/md5/make | 44 | ||||
-rw-r--r-- | auto/lib/md5/makefile.msvc | 8 | ||||
-rw-r--r-- | auto/lib/md5/makefile.owc | 12 | ||||
-rw-r--r-- | auto/lib/pcre/conf | 63 | ||||
-rw-r--r-- | auto/lib/pcre/make | 50 | ||||
-rw-r--r-- | auto/lib/pcre/makefile.msvc | 14 | ||||
-rw-r--r-- | auto/lib/pcre/makefile.owc | 14 | ||||
-rw-r--r-- | auto/lib/pcre/patch.config | 11 | ||||
-rw-r--r-- | auto/lib/pcre/patch.pcre | 15 | ||||
-rw-r--r-- | auto/lib/zlib/conf | 26 | ||||
-rw-r--r-- | auto/lib/zlib/make | 47 | ||||
-rw-r--r-- | auto/lib/zlib/makefile.msvc | 8 | ||||
-rw-r--r-- | auto/lib/zlib/makefile.owc | 6 | ||||
-rw-r--r-- | auto/make | 63 | ||||
-rw-r--r-- | auto/os/conf | 4 | ||||
-rw-r--r-- | auto/sources | 2 | ||||
-rw-r--r-- | auto/summary | 1 |
21 files changed, 387 insertions, 100 deletions
@@ -31,8 +31,10 @@ case $CC in have=HAVE_GCC_VARIADIC_MACROS . auto/have + LINK="\$(CC)" + OBJEXT=o - COMPILEONLY="-c " + COMPILEONLY="-c" OBJOUT="-o " BINOUT="-o " @@ -58,8 +60,10 @@ case $CC in have=HAVE_C99_VARIADIC_MACROS . auto/have + LINK="\$(CC)" + OBJEXT=o - COMPILEONLY="-c " + COMPILEONLY="-c" OBJOUT="-o " BINOUT="-o " @@ -100,11 +104,14 @@ case $CC in # 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" @@ -115,16 +122,23 @@ case $CC in 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 " + COMPILEONLY="-c" OBJOUT="-Fo" BINOUT="-Fe" + BINEXT=.exe CC_STRONG="$CC -W3 -WX" ;; - wcc386) + wcl386) # Open Watcom 1.0 # optimization @@ -139,16 +153,18 @@ case $CC in CFLAGS="$CFLAGS -oe" # disable stack checking calls CFLAGS="$CFLAGS -s" - # optimize for Pentium Pro - #CFLAGS="$CFLAGS -6r" - CFLAGS="$CFLAGS -6s" + # optimize for Pentium Pro, register-based arguments + OWC_OPT="-6r" + # optimize for Pentium Pro, stack-based arguments + #OWC_OPT="-6s" + CFLAGS="$CFLAGS $OWC_OPT" # warnings #CFLAGS="$CFLAGS -w3" CFLAGS="$CFLAGS -wx" # stop on warning - #CFLAGS="$CFLAGS -we" + CFLAGS="$CFLAGS -we" # built target is NT CFLAGS="$CFLAGS -bt=nt" @@ -162,13 +178,23 @@ case $CC in # quiet CFLAGS="$CFLAGS -zq" - # link traget is NT + # 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= + COMPILEONLY="-c" OBJOUT="-fo" - BINOUT="-fo" + BINOUT="-fe=" + BINEXT=.exe + INC_EQ=YES MAKE_BS=YES MAKE_SL=YES @@ -9,7 +9,10 @@ NGX_ERR=$OBJS/autoconf.err CC_WARN=$CC +PCH=NO +USEPCH= +BINEXT= INC_EQ=NO MAKE_BS=NO MAKE_SL=NO diff --git a/auto/lib/make b/auto/lib/make index 8bb32ca35..66568e6f5 100644 --- a/auto/lib/make +++ b/auto/lib/make @@ -1,18 +1,12 @@ -if [ "$PLATFORM" != "win32" ]; then - - if [ $PCRE != NO ]; then - . auto/lib/pcre/make - fi - - - if [ $MD5 != NO ]; then - . auto/lib/md5/make - fi - +if [ $MD5 != NO ]; then + . auto/lib/md5/make +fi - if [ $ZLIB != NO ]; then - . auto/lib/zlib/make - fi +if [ $ZLIB != NO ]; then + . auto/lib/zlib/make +fi +if [ $PCRE != NO ]; then + . auto/lib/pcre/make fi diff --git a/auto/lib/md5/conf b/auto/lib/md5/conf index 06006e456..3c7878382 100644 --- a/auto/lib/md5/conf +++ b/auto/lib/md5/conf @@ -12,13 +12,25 @@ if [ $MD5 != NONE ]; then CORE_INCS="$CORE_INCS -I $MD5" - if [ "$PLATFORM" = "win32" ]; then - CORE_LIBS="$CORE_LIBS md5.lib" - CORE_LINK="$CORE_LINK -libpath:$MD5" - else - LINK_DEPS="$LINK_DEPS $MD5/libmd5.a" - CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5" - fi + case $CC in + + cl) + LINK_DEPS="$LINK_DEPS $MD5/md5.lib" + CORE_LIBS="$CORE_LIBS md5.lib" + CORE_LINK="$CORE_LINK -libpath:$MD5" + ;; + + wcl386) + LINK_DEPS="$LINK_DEPS $MD5/md5.lib" + CORE_LIBS="$CORE_LIBS $MD5/md5.lib" + ;; + + *) + LINK_DEPS="$LINK_DEPS $MD5/libmd5.a" + CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5" + ;; + + esac else diff --git a/auto/lib/md5/make b/auto/lib/md5/make index 0b4d92773..43d35bf6a 100644 --- a/auto/lib/md5/make +++ b/auto/lib/md5/make @@ -1,24 +1,56 @@ -echo "$MD5/libmd5.a:" >> $MAKEFILE +case $CC in + + cl) + makefile=makefile.msvc + ;; + + wcl386) + makefile=makefile.owc + ;; + +esac + + +case $PLATFORM in + + win32) + echo "$MD5/md5.lib:" >> $MAKEFILE + ;; + + *) + echo "$MD5/libmd5.a:" >> $MAKEFILE + ;; + +esac + case $PLATFORM in + win32) + + cp auto/lib/md5/$makefile $MD5 + echo " cd $MD5" >> $MAKEFILE + echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE + echo " cd ..\\..\\.." >> $MAKEFILE + ;; + SunOS:*:i386) - echo " cd $MD5 && \$(MAKE) x86-solaris" >> $MAKEFILE + echo " cd $MD5 && \$(MAKE) x86-solaris" >> $MAKEFILE ;; *:i386) - echo " cd $MD5 && \$(MAKE) x86-elf" >> $MAKEFILE + echo " cd $MD5 && \$(MAKE) x86-elf" >> $MAKEFILE ;; *) if [ $CC = gcc ]; then - echo " cd $MD5 && \$(MAKE) gcc" >> $MAKEFILE + echo " cd $MD5 && \$(MAKE) gcc" >> $MAKEFILE else - echo " cd $MD5 && \$(MAKE) cc" >> $MAKEFILE + echo " cd $MD5 && \$(MAKE) cc" >> $MAKEFILE fi ;; esac -echo >> $MAKEFILE +echo >> $MAKEFILE diff --git a/auto/lib/md5/makefile.msvc b/auto/lib/md5/makefile.msvc index a45fc52eb..3dbda09ee 100644 --- a/auto/lib/md5/makefile.msvc +++ b/auto/lib/md5/makefile.msvc @@ -1,6 +1,6 @@ -all: - cl -nologo -c -MT -O2 -Ob1 -Oi -Gs -D MD5_ASM -D L_ENDIAN \ - md5_dgst.c md5_one.c +CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs -D MD5_ASM -D L_ENDIAN - link -lib -out:md5.lib md5_dgst.obj md5_one.obj asm/m-win32.obj +md5.lib: + cl $(CFLAGS) md5_dgst.c + link -lib -out:md5.lib md5_dgst.obj asm/m-win32.obj diff --git a/auto/lib/md5/makefile.owc b/auto/lib/md5/makefile.owc new file mode 100644 index 000000000..f3209409e --- /dev/null +++ b/auto/lib/md5/makefile.owc @@ -0,0 +1,12 @@ + +CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s $(OWC_OPT) + +md5.lib: + wcl386 $(CFLAGS) -bm -dL_ENDIAN md5_dgst.c + wlib -n md5.lib md5_dgst.obj + +#md5.lib: +asm: + wcl386 $(CFLAGS) -bm -dMD5_ASM -dL_ENDIAN md5_dgst.c + wcl386 $(CFLAGS) asm\m-win32.asm + wlib -n md5.lib md5_dgst.obj m-win32.obj diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf index 436bee2dd..6d4b53806 100644 --- a/auto/lib/pcre/conf +++ b/auto/lib/pcre/conf @@ -4,37 +4,54 @@ if [ $PCRE != NONE ]; then CORE_DEPS="$CORE_DEPS $REGEX_DEPS" CORE_SRCS="$CORE_SRCS $REGEX_SRCS" - if [ "$PLATFORM" = "win32" ]; then - have=HAVE_PCRE . auto/have - have=PCRE_STATIC . auto/have - CORE_LIBS="$CORE_LIBS pcre.lib" - CORE_LINK="$CORE_LINK -libpath:$PCRE" - else - have=HAVE_PCRE . auto/have - CORE_DEPS="$CORE_DEPS $PCRE/.libs/libpcre.a" - CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre" - fi + case $CC in + + cl) + have=HAVE_PCRE . auto/have + have=PCRE_STATIC . auto/have + CORE_DEPS="$CORE_DEPS $PCRE/pcre.lib" + #CORE_DEPS="$PCRE/pcre.lib $CORE_DEPS" + CORE_LIBS="$CORE_LIBS pcre.lib" + CORE_LINK="$CORE_LINK -libpath:$PCRE" + ;; + + wcl386) + have=HAVE_PCRE . auto/have + have=PCRE_STATIC . auto/have + CORE_DEPS="$CORE_DEPS $PCRE/pcre.lib" + CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib" + ;; + + *) + have=HAVE_PCRE . auto/have + CORE_DEPS="$CORE_DEPS $PCRE/.libs/libpcre.a" + CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre" + ;; + + esac else - ngx_lib_inc="#include <pcre.h>" + if [ $PLATFORM != win32 ]; then + ngx_lib_inc="#include <pcre.h>" - ngx_lib="PCRE" - ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)" - ngx_libs=-lpcre - . auto/lib/test + ngx_lib="PCRE" + ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)" + ngx_libs=-lpcre + . auto/lib/test - if [ $ngx_found = yes ]; then - have=HAVE_PCRE . auto/have + if [ $ngx_found = yes ]; then + have=HAVE_PCRE . auto/have - CORE_DEPS="$CORE_DEPS $REGEX_DEPS" - CORE_SRCS="$CORE_SRCS $REGEX_SRCS" - CORE_LIBS="$CORE_LIBS $ngx_libs" + CORE_DEPS="$CORE_DEPS $REGEX_DEPS" + CORE_SRCS="$CORE_SRCS $REGEX_SRCS" + CORE_LIBS="$CORE_LIBS $ngx_libs" - PCRE=YES - else - PCRE=NO + PCRE=YES + else + PCRE=NO + fi fi fi diff --git a/auto/lib/pcre/make b/auto/lib/pcre/make index 836668619..6ea086da6 100644 --- a/auto/lib/pcre/make +++ b/auto/lib/pcre/make @@ -1,7 +1,47 @@ -echo "$PCRE/.libs/libpcre.a:" >> $MAKEFILE -echo " cd $PCRE \\" >> $MAKEFILE -echo " && ./configure --disable-shared \\" >> $MAKEFILE -echo " && \$(MAKE)" >> $MAKEFILE -echo >> $MAKEFILE +case $CC in + cl) + makefile=makefile.msvc + ;; + + wcl386) + makefile=makefile.owc + ;; + +esac + + +case $PLATFORM in + + win32) + echo "$PCRE/pcre.lib:" >> $MAKEFILE + ;; + + *) + echo "$PCRE/.libs/libpcre.a:" >> $MAKEFILE + ;; + +esac + + +case $PLATFORM in + + win32) + cp auto/lib/pcre/patch.pcre $PCRE + cp auto/lib/pcre/patch.config $PCRE + cp auto/lib/pcre/$makefile $PCRE + echo " cd $PCRE" >> $MAKEFILE + echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE + echo " cd ..\\..\\.." >> $MAKEFILE + ;; + + *) + echo " cd $PCRE \\" >> $MAKEFILE + echo " && ./configure --disable-shared \\" >> $MAKEFILE + echo " && \$(MAKE)" >> $MAKEFILE + ;; + +esac + +echo >> $MAKEFILE diff --git a/auto/lib/pcre/makefile.msvc b/auto/lib/pcre/makefile.msvc index e5c2aec29..0eeb310ab 100644 --- a/auto/lib/pcre/makefile.msvc +++ b/auto/lib/pcre/makefile.msvc @@ -1,18 +1,18 @@ -CC = cl CFLAGS = -O2 -Ob1 -Oi -Gs -MT -LINK = link - PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 -all: - $(CC) -Fedftables dftables.c +pcre.lib: + patch -o pcre.h pcre.in patch.pcre + patch -o config.h config.in patch.config + + cl -Fedftables dftables.c dftables > chartables.c - $(CC) -nologo -c $(CFLAGS) $(PCREFLAGS) \ + cl -nologo -c $(CFLAGS) $(PCREFLAGS) \ maketables.c get.c study.c pcre.c - $(LINK) -lib -out:pcre.lib -verbose:lib \ + link -lib -out:pcre.lib -verbose:lib \ maketables.obj get.obj study.obj pcre.obj diff --git a/auto/lib/pcre/makefile.owc b/auto/lib/pcre/makefile.owc new file mode 100644 index 000000000..f4244a6c0 --- /dev/null +++ b/auto/lib/pcre/makefile.owc @@ -0,0 +1,14 @@ + +CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(OWC_OPT) +PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 + + +pcre.lib: + patch -o pcre.h pcre.in patch.pcre + patch -o config.h config.in patch.config + + wcl386 -zq -bt=nt -l=nt -fe=dftables dftables.c + dftables > chartables.c + + wcl386 $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c + wlib -n pcre.lib maketables.obj get.obj study.obj pcre.obj diff --git a/auto/lib/pcre/patch.config b/auto/lib/pcre/patch.config new file mode 100644 index 000000000..f2c48c281 --- /dev/null +++ b/auto/lib/pcre/patch.config @@ -0,0 +1,11 @@ +--- config.in.orig Thu Aug 21 14:43:07 2003 ++++ config.in Sun Mar 7 02:37:24 2004 +@@ -28,7 +28,7 @@ + found. */ + + #define HAVE_STRERROR 0 +-#define HAVE_MEMMOVE 0 ++#define HAVE_MEMMOVE 1 + + /* There are some non-Unix systems that don't even have bcopy(). If this macro + is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of diff --git a/auto/lib/pcre/patch.pcre b/auto/lib/pcre/patch.pcre new file mode 100644 index 000000000..3406548b5 --- /dev/null +++ b/auto/lib/pcre/patch.pcre @@ -0,0 +1,15 @@ +--- pcre.in.orig Thu Aug 21 14:43:07 2003 ++++ pcre.in Sun Mar 7 02:10:11 2004 +@@ -10,9 +10,9 @@ + /* The file pcre.h is build by "configure". Do not edit it; instead + make changes to pcre.in. */ + +-#define PCRE_MAJOR @PCRE_MAJOR@ +-#define PCRE_MINOR @PCRE_MINOR@ +-#define PCRE_DATE @PCRE_DATE@ ++#define PCRE_MAJOR 4 ++#define PCRE_MINOR 4 ++#define PCRE_DATE 21-August-2003 + + /* Win32 uses DLL by default */ + diff --git a/auto/lib/zlib/conf b/auto/lib/zlib/conf index 60fd8d880..a779b21b6 100644 --- a/auto/lib/zlib/conf +++ b/auto/lib/zlib/conf @@ -2,13 +2,25 @@ if [ $ZLIB != NONE ]; then CORE_INCS="$CORE_INCS -I $ZLIB" - if [ "$PLATFORM" = "win32" ]; then - CORE_LIBS="$CORE_LIBS zlib.lib" - CORE_LINK="$CORE_LINK -libpath:$ZLIB" - else - LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" - CORE_LIBS="$CORE_LIBS -L $ZLIB -lz" - fi + case $CC in + + cl) + LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib" + CORE_LIBS="$CORE_LIBS zlib.lib" + CORE_LINK="$CORE_LINK -libpath:$ZLIB" + ;; + + wcl386) + LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib" + CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib" + ;; + + *) + LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" + CORE_LIBS="$CORE_LIBS -L $ZLIB -lz" + ;; + + esac else diff --git a/auto/lib/zlib/make b/auto/lib/zlib/make index 78022c379..05b2e86fa 100644 --- a/auto/lib/zlib/make +++ b/auto/lib/zlib/make @@ -1,19 +1,52 @@ -echo "$ZLIB/libz.a:" >> $MAKEFILE +case $CC in + + cl) + makefile=makefile.msvc + ;; + + wcl386) + makefile=makefile.owc + ;; + +esac + case $PLATFORM in + win32) + echo "$ZLIB/zlib.lib:" >> $MAKEFILE + ;; + + *) + echo "$ZLIB/libz.a:" >> $MAKEFILE + ;; + +esac + + +case $PLATFORM in + + win32) + + cp auto/lib/zlib/$makefile $ZLIB + echo " cd $ZLIB" >> $MAKEFILE + echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE + echo " cd ..\\..\\.." >> $MAKEFILE + ;; + + *:i386) - echo " cd $ZLIB \\" >> $MAKEFILE - echo " && cp contrib/asm686/match.S . \\" >> $MAKEFILE - echo " && CFLAGS=\"-O3 -DASMV\" ./configure \\" >> $MAKEFILE - echo " && \$(MAKE) OBJA=match.o" >> $MAKEFILE + echo " cd $ZLIB \\" >> $MAKEFILE + echo " && cp contrib/asm686/match.S . \\" >> $MAKEFILE + echo " && CFLAGS=\"-O3 -DASMV\" ./configure \\" >> $MAKEFILE + echo " && \$(MAKE) OBJA=match.o" >> $MAKEFILE ;; *) - echo " cd $ZLIB && ./configure && \$(MAKE)" >> $MAKEFILE + echo " cd $ZLIB && ./configure && \$(MAKE)" >> $MAKEFILE ;; esac -echo >> $MAKEFILE +echo >> $MAKEFILE diff --git a/auto/lib/zlib/makefile.msvc b/auto/lib/zlib/makefile.msvc new file mode 100644 index 000000000..69f0c1897 --- /dev/null +++ b/auto/lib/zlib/makefile.msvc @@ -0,0 +1,8 @@ + +CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs + +zlib.lib: + cl $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c + + link -lib -out:zlib.lib adler32.obj crc32.obj deflate.obj \ + trees.obj zutil.obj diff --git a/auto/lib/zlib/makefile.owc b/auto/lib/zlib/makefile.owc new file mode 100644 index 000000000..3fa026040 --- /dev/null +++ b/auto/lib/zlib/makefile.owc @@ -0,0 +1,6 @@ + +CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(OWC_OPT) + +zlib.lib: + wcl386 $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c + wlib -n zlib.lib adler32.obj crc32.obj deflate.obj trees.obj zutil.obj @@ -5,10 +5,31 @@ mkdir -p $OBJS/src/core $OBJS/src/event $OBJS/src/event/modules \ echo "CC = $CC" > $MAKEFILE +echo "LINK = $LINK" >> $MAKEFILE +if [ $CC = wcl386 ]; then + echo MAKE = wmake >> $MAKEFILE +fi echo "CFLAGS = $CFLAGS" >> $MAKEFILE echo >> $MAKEFILE +if [ $MAKE_SL = YES ]; then + echo >> $MAKEFILE +fi + +all_inc="$CORE_INCS -I $OBJS $HTTP_INCS" +if [ $INC_EQ = YES ]; then + all_inc=`echo $all_inc | sed -e "s/-I /-i=/g"` +fi + +if [ $MAKE_BS = YES ]; then + all_inc=`echo $all_inc | sed -e "s/\//\\\\\\/g"` +fi + +echo "ALL_INCS = $all_inc" >> $MAKEFILE +echo >> $MAKEFILE + + # CORE_DEPS if [ $MAKE_SL = YES ]; then @@ -96,9 +117,9 @@ echo >> $MAKEFILE # nginx if [ $MAKE_SL = YES ]; then - echo $ngx_n "nginx: " $ngx_c >> $MAKEFILE + echo $ngx_n "nginx$BINEXT: " $ngx_c >> $MAKEFILE else - echo "nginx: \\" >> $MAKEFILE + echo "nginx$BINEXT: \\" >> $MAKEFILE fi @@ -140,9 +161,9 @@ echo >> $MAKEFILE # nginx build if [ $MAKE_SL = YES ]; then - echo $ngx_n " \$(CC) ${BINOUT}nginx" $ngx_c >> $MAKEFILE + echo $ngx_n " \$(LINK) ${BINOUT}nginx" $ngx_c >> $MAKEFILE else - echo " \$(CC) ${BINOUT}nginx \\" >> $MAKEFILE + echo " \$(LINK) ${BINOUT}nginx \\" >> $MAKEFILE fi @@ -190,7 +211,12 @@ fi # ngx_modules.c deps="\$(CORE_DEPS)" -args="\$(CFLAGS) \$(CORE_INCS)" + +if [ $PCH != NO ]; then + args="\$(CFLAGS) $USEPCH \$(ALL_INCS)" +else + args="\$(CFLAGS) $USEPCH \$(CORE_INCS)" +fi if [ $MAKE_SL = YES ]; then echo "$obj: $NGX_MODULES_C $deps" >> $MAKEFILE @@ -237,7 +263,12 @@ done # http sources deps="\$(CORE_DEPS) \$(HTTP_DEPS)" -args="\$(CFLAGS) \$(CORE_INCS) \$(HTTP_INCS)" + +if [ $PCH != NO ]; then + args="\$(CFLAGS) $USEPCH \$(ALL_INCS)" +else + args="\$(CFLAGS) $USEPCH \$(CORE_INCS) \$(HTTP_INCS)" +fi for src in $HTTP_SRCS do @@ -262,3 +293,23 @@ do echo >> $MAKEFILE fi done + + +# precompiled headers + +if [ $PCH != NO ]; then + echo "#include <ngx_config.h>" > $OBJS/pch.c + + pch="$PCH: src/core/ngx_config.h $OS_CONFIG $OBJS/ngx_auto_config.h" + src="\$(CC) \$(CFLAGS) $BUILDPCH $COMPILEONLY \$(ALL_INCS)" + src="$src $OBJOUT$OBJS/pch.obj $OBJS/pch.c" + + if [ $MAKE_BS = YES ]; then + pch=`echo $pch | sed -e "s/\//\\\\\\/g"` + src=`echo $src | sed -e "s/\//\\\\\\/g"` + fi + + echo "$pch" >> $MAKEFILE + echo " $src" >> $MAKEFILE + echo >> $MAKEFILE +fi diff --git a/auto/os/conf b/auto/os/conf index 4ae08e856..2a6f99e8c 100644 --- a/auto/os/conf +++ b/auto/os/conf @@ -31,15 +31,13 @@ case $PLATFORM in CORE_INCS="$WIN32_INCS" CORE_DEPS="$WIN32_DEPS" CORE_SRCS="$WIN32_SRCS $SELECT_SRCS $IOCP_SRCS" + OS_CONFIG="$WIN32_CONFIG" EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE $IOCP_MODULE" EVENT_FOUND=YES have=HAVE_AIO . auto/have have=HAVE_IOCP . auto/have CORE_LIBS="$CORE_LIBS ws2_32.lib" - - # msvcrt.dll - CORE_LIBS="$CORE_LIBS msvcrt.lib" ;; esac diff --git a/auto/sources b/auto/sources index 026a5e0c5..f744ac537 100644 --- a/auto/sources +++ b/auto/sources @@ -148,6 +148,8 @@ WIN32_DEPS="$CORE_DEPS $EVENT_DEPS \ src/os/win32/ngx_os.h \ src/os/win32/ngx_process_cycle.h" +WIN32_CONFIG=src/os/win32/ngx_win32_config.h + WIN32_SRCS="$CORE_SRCS $EVENT_SRCS \ src/os/win32/ngx_errno.c \ src/os/win32/ngx_files.c \ diff --git a/auto/summary b/auto/summary index 5dacfc140..e0d8b2664 100644 --- a/auto/summary +++ b/auto/summary @@ -8,6 +8,7 @@ if [ $USE_PCRE = DISABLED ]; then else case $PCRE in YES) echo " + using system PCRE library" ;; + NONE) echo " + PCRE library is not used" ;; NO) echo " + PCRE library is not found" ;; *) echo " + using PCRE library: $PCRE" ;; esac |