Skip to content

Commit

Permalink
nginx-0.0.2-2004-03-10-20:55:19 import
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsysoev committed Mar 10, 2004
1 parent fc5a10a commit 24b56c9
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 34 deletions.
67 changes: 52 additions & 15 deletions auto/cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,20 @@ case $CC in

# optimization
#CFLAGS="$CFLAGS -O2 -fomit-frame-pointer"
# optimize for Pentium Pro, Pentium II and Pentium III
#CFLAGS="$CFLAGS -march=pentiumpro"
# optimize for Pentium 4, gcc 3.x
#CFLAGS="$CFLAGS -march=pentium4"

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"

# warnings
CFLAGS="$CFLAGS -O -W"
Expand Down Expand Up @@ -47,10 +57,19 @@ case $CC in

# optimization
CFLAGS="$CFLAGS -O"
# optimize for Pentium Pro, Pentium II and Pentium III
CFLAGS="$CFLAGS -mcpu=pentiumpro -march=pentiumpro"
# optimize for Pentium 4, default
#CFLAGS="$CFLAGS -march=pentium4"

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"

# warnings
CFLAGS="$CFLAGS -w1"
Expand Down Expand Up @@ -88,8 +107,19 @@ case $CC in
CFLAGS="$CFLAGS -Oy"
# disable stack checking calls
CFLAGS="$CFLAGS -Gs"
# optimize for Pentium Pro
CFLAGS="$CFLAGS -G6"

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"

# warnings
CFLAGS="$CFLAGS -W3"
Expand Down Expand Up @@ -153,11 +183,18 @@ case $CC in
CFLAGS="$CFLAGS -oe"
# disable stack checking calls
CFLAGS="$CFLAGS -s"
# optimize for Pentium Pro, register-based arguments
OWC_OPT="-6r"
# optimize for Pentium Pro, stack-based arguments
#OWC_OPT="-6s"
CFLAGS="$CFLAGS $OWC_OPT"

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"

# warnings
#CFLAGS="$CFLAGS -w3"
Expand Down
4 changes: 2 additions & 2 deletions auto/lib/md5/make
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ case $PLATFORM in

cp auto/lib/md5/$makefile $MD5
echo " cd $MD5" >> $MAKEFILE
echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE
echo " \$(MAKE) -f $makefile LIB_OPT=$LIB_OPT" >> $MAKEFILE
echo " cd ..\\..\\.." >> $MAKEFILE
;;

SunOS:*:i386)
SunOS:*:i86pc)
echo " cd $MD5 && \$(MAKE) x86-solaris" >> $MAKEFILE
;;

Expand Down
2 changes: 1 addition & 1 deletion auto/lib/md5/makefile.msvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs -D MD5_ASM -D L_ENDIAN
CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs $(LIB_OPT) -D MD5_ASM -D L_ENDIAN

md5.lib:
cl $(CFLAGS) md5_dgst.c
Expand Down
10 changes: 2 additions & 8 deletions auto/lib/md5/makefile.owc
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@

CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s $(OWC_OPT)
CFLAGS = -c -zq -bt=nt -bm -ot -op -oi -oe -s $(LIB_OPT)

md5.lib:
wcl386 $(CFLAGS) -bm -dL_ENDIAN md5_dgst.c
wcl386 $(CFLAGS) -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
5 changes: 3 additions & 2 deletions auto/lib/pcre/make
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ case $PLATFORM in
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 " \$(MAKE) -f $makefile LIB_OPT=$LIB_OPT" >> $MAKEFILE
echo " cd ..\\..\\.." >> $MAKEFILE
;;

*)
echo " cd $PCRE \\" >> $MAKEFILE
echo " && ./configure --disable-shared \\" >> $MAKEFILE
echo $ngx_n " && CFLAGS=\"-O2 $LIB_OPT\"" $ngx_c >> $MAKEFILE
echo " ./configure --disable-shared \\" >> $MAKEFILE
echo " && \$(MAKE)" >> $MAKEFILE
;;

Expand Down
2 changes: 1 addition & 1 deletion auto/lib/pcre/makefile.msvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

CFLAGS = -O2 -Ob1 -Oi -Gs -MT
CFLAGS = -O2 -Ob1 -Oi -Gs -MT $(LIB_OPT)
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10


Expand Down
2 changes: 1 addition & 1 deletion auto/lib/pcre/makefile.owc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(OWC_OPT)
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(LIB_OPT)
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10


Expand Down
4 changes: 2 additions & 2 deletions auto/lib/zlib/make
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ case $PLATFORM in

cp auto/lib/zlib/$makefile $ZLIB
echo " cd $ZLIB" >> $MAKEFILE
echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE
echo " \$(MAKE) -f $makefile LIB_OPT=$LIB_OPT" >> $MAKEFILE
echo " cd ..\\..\\.." >> $MAKEFILE
;;


*:i386)
*:i386 | *:i686)
echo " cd $ZLIB \\" >> $MAKEFILE
echo " && cp contrib/asm686/match.S . \\" >> $MAKEFILE
echo " && CFLAGS=\"-O3 -DASMV\" ./configure \\" >> $MAKEFILE
Expand Down
2 changes: 1 addition & 1 deletion auto/lib/zlib/makefile.msvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs
CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs $(LIB_OPT)

zlib.lib:
cl $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c
Expand Down
2 changes: 1 addition & 1 deletion auto/lib/zlib/makefile.owc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(OWC_OPT)
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(LIB_OPT)

zlib.lib:
wcl386 $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c
Expand Down
4 changes: 4 additions & 0 deletions auto/options
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ help=no
CC=gcc
OBJS=objs

CPU_OPT=NO

TEST_BUILD_DEVPOLL=NO
TEST_BUILD_EPOLL=NO
TEST_BUILD_RTSIG=NO
Expand Down Expand Up @@ -62,11 +64,13 @@ do
--without-http_proxy_module) HTTP_PROXY=NO ;;

--with-cc=*) CC="$value" ;;
--with-cpu=*) CPU_OPT="$value" ;;

--without-pcre) USE_PCRE=DISABLED ;;
--with-pcre=*) PCRE="$value" ;;
--with-md5=*) MD5="$value" ;;
--with-zlib=*) ZLIB="$value" ;;
--with-zlib-opt=*) ZLIB_OPT="$value" ;;

--test-build-devpoll) TEST_BUILD_DEVPOLL=YES ;;
--test-build-epoll) TEST_BUILD_EPOLL=YES ;;
Expand Down
2 changes: 2 additions & 0 deletions auto/os/freebsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ CORE_INCS="$UNIX_INCS"
CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"

CFLAGS="$CFLAGS -pipe"


# __FreeBSD_version is the best way to determine whether
# some capability exists and is safe to use
Expand Down
2 changes: 2 additions & 0 deletions auto/os/linux
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ CORE_DEPS="$UNIX_DEPS $LINUX_DEPS"
CORE_SRCS="$UNIX_SRCS $LINUX_SRCS"
EVENT_MODULES="$EVENT_MODULES"

CFLAGS="$CFLAGS -pipe"


CC_TEST_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"

Expand Down
13 changes: 13 additions & 0 deletions auto/os/solaris
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ MAKE_SL=YES

CC_TEST_FLAGS="-D_FILE_OFFSET_BITS=64"

case $PLATFORM in

SunOS:5.[89]:* | SunOS:5.10:*)
CFLAGS="$CFLAGS -pipe"
;;

*)
# Solaris 7's gcc does not support "-pipe"
;;

esac



ngx_inc="sys/devpoll.h"; . auto/inc

Expand Down

0 comments on commit 24b56c9

Please sign in to comment.