2004-03-02 04:00:04 +08:00
|
|
|
|
2004-09-30 00:00:49 +08:00
|
|
|
# Copyright (C) Igor Sysoev
|
2012-01-18 23:07:43 +08:00
|
|
|
# Copyright (C) Nginx, Inc.
|
2004-09-30 00:00:49 +08:00
|
|
|
|
|
|
|
|
2004-11-21 03:52:20 +08:00
|
|
|
case "$NGX_CC_NAME" in
|
2004-03-10 03:47:07 +08:00
|
|
|
|
2016-02-13 11:47:34 +08:00
|
|
|
msvc)
|
2004-11-21 03:52:20 +08:00
|
|
|
ngx_makefile=makefile.msvc
|
2005-03-23 00:02:46 +08:00
|
|
|
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC"
|
2009-05-12 21:15:43 +08:00
|
|
|
ngx_zlib="ZLIB=\"$ZLIB\""
|
2004-03-30 01:43:58 +08:00
|
|
|
|
2004-03-10 03:47:07 +08:00
|
|
|
;;
|
|
|
|
|
2016-02-13 11:47:34 +08:00
|
|
|
owc)
|
2004-11-21 03:52:20 +08:00
|
|
|
ngx_makefile=makefile.owc
|
2005-03-23 00:02:46 +08:00
|
|
|
ngx_opt="CPU_OPT=\"$CPU_OPT\""
|
2009-05-12 21:15:43 +08:00
|
|
|
ngx_zlib=`echo ZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
2004-03-30 01:43:58 +08:00
|
|
|
;;
|
|
|
|
|
2004-11-21 03:52:20 +08:00
|
|
|
bcc)
|
|
|
|
ngx_makefile=makefile.bcc
|
2005-03-23 00:02:46 +08:00
|
|
|
ngx_opt="-DCPU_OPT=\"$CPU_OPT\""
|
2009-05-12 21:15:43 +08:00
|
|
|
ngx_zlib=`echo \-DZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
2004-03-10 03:47:07 +08:00
|
|
|
;;
|
|
|
|
|
2013-09-05 00:48:28 +08:00
|
|
|
*)
|
|
|
|
ngx_makefile=
|
|
|
|
;;
|
|
|
|
|
2004-03-10 03:47:07 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
|
2004-03-12 05:34:52 +08:00
|
|
|
done=NO
|
|
|
|
|
|
|
|
|
2005-02-22 22:40:13 +08:00
|
|
|
case "$NGX_PLATFORM" in
|
2004-03-10 03:47:07 +08:00
|
|
|
|
|
|
|
win32)
|
2013-09-05 00:48:28 +08:00
|
|
|
|
|
|
|
if [ -n "$ngx_makefile" ]; then
|
|
|
|
cat << END >> $NGX_MAKEFILE
|
2004-03-10 03:47:07 +08:00
|
|
|
|
2004-11-21 03:52:20 +08:00
|
|
|
`echo "$ZLIB/zlib.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
2009-05-12 21:15:43 +08:00
|
|
|
\$(MAKE) -f auto/lib/zlib/$ngx_makefile $ngx_opt $ngx_zlib
|
2004-11-21 03:52:20 +08:00
|
|
|
|
|
|
|
END
|
2004-03-12 05:34:52 +08:00
|
|
|
|
2013-09-05 00:48:28 +08:00
|
|
|
else
|
|
|
|
|
|
|
|
cat << END >> $NGX_MAKEFILE
|
|
|
|
|
|
|
|
$ZLIB/libz.a: $NGX_MAKEFILE
|
|
|
|
cd $ZLIB \\
|
|
|
|
&& \$(MAKE) distclean \\
|
|
|
|
&& \$(MAKE) -f win32/Makefile.gcc \\
|
|
|
|
CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
|
|
|
|
libz.a
|
|
|
|
|
|
|
|
END
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2004-03-12 05:34:52 +08:00
|
|
|
done=YES
|
2004-03-10 03:47:07 +08:00
|
|
|
;;
|
|
|
|
|
2004-03-13 00:57:08 +08:00
|
|
|
# FreeBSD: i386
|
|
|
|
# Linux: i686
|
2004-03-10 03:47:07 +08:00
|
|
|
|
2004-03-11 01:55:19 +08:00
|
|
|
*:i386 | *:i686)
|
2004-03-13 00:57:08 +08:00
|
|
|
case $ZLIB_ASM in
|
|
|
|
pentium)
|
2004-11-21 03:52:20 +08:00
|
|
|
|
|
|
|
cat << END >> $NGX_MAKEFILE
|
|
|
|
|
|
|
|
$ZLIB/libz.a: $NGX_MAKEFILE
|
|
|
|
cd $ZLIB \\
|
2010-03-25 18:07:38 +08:00
|
|
|
&& \$(MAKE) distclean \\
|
2004-11-21 03:52:20 +08:00
|
|
|
&& cp contrib/asm586/match.S . \\
|
|
|
|
&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
|
|
|
|
./configure \\
|
|
|
|
&& \$(MAKE) OBJA=match.o libz.a
|
|
|
|
|
|
|
|
END
|
2004-03-13 00:57:08 +08:00
|
|
|
|
|
|
|
done=YES
|
|
|
|
;;
|
|
|
|
|
|
|
|
pentiumpro)
|
2004-11-21 03:52:20 +08:00
|
|
|
|
|
|
|
cat << END >> $NGX_MAKEFILE
|
|
|
|
|
|
|
|
$ZLIB/libz.a: $NGX_MAKEFILE
|
|
|
|
cd $ZLIB \\
|
2010-03-25 18:07:38 +08:00
|
|
|
&& \$(MAKE) distclean \\
|
2004-11-21 03:52:20 +08:00
|
|
|
&& cp contrib/asm686/match.S . \\
|
|
|
|
&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
|
|
|
|
./configure \\
|
|
|
|
&& \$(MAKE) OBJA=match.o libz.a
|
|
|
|
|
|
|
|
END
|
2004-03-13 00:57:08 +08:00
|
|
|
|
|
|
|
done=YES
|
|
|
|
;;
|
2004-04-13 00:38:09 +08:00
|
|
|
|
2004-04-19 03:06:02 +08:00
|
|
|
NO)
|
|
|
|
;;
|
|
|
|
|
2004-04-13 00:38:09 +08:00
|
|
|
*)
|
2004-04-19 03:06:02 +08:00
|
|
|
echo "$0: error: invalid --with-zlib-asm=$ZLIB_ASM option."
|
2004-04-13 00:38:09 +08:00
|
|
|
echo "The valid values are \"pentium\" and \"pentiumpro\" only".
|
|
|
|
echo
|
|
|
|
|
|
|
|
exit 1;
|
|
|
|
;;
|
2004-03-13 00:57:08 +08:00
|
|
|
esac
|
2004-03-02 04:00:04 +08:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
2004-03-12 05:34:52 +08:00
|
|
|
|
|
|
|
if [ $done = NO ]; then
|
|
|
|
|
2004-11-21 03:52:20 +08:00
|
|
|
cat << END >> $NGX_MAKEFILE
|
|
|
|
|
|
|
|
$ZLIB/libz.a: $NGX_MAKEFILE
|
|
|
|
cd $ZLIB \\
|
2010-03-25 18:07:38 +08:00
|
|
|
&& \$(MAKE) distclean \\
|
2004-11-21 03:52:20 +08:00
|
|
|
&& CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
|
|
|
|
./configure \\
|
|
|
|
&& \$(MAKE) libz.a
|
2004-03-12 05:34:52 +08:00
|
|
|
|
2004-11-21 03:52:20 +08:00
|
|
|
END
|
|
|
|
|
|
|
|
fi
|