OpenSSL building by MSVC and BCC from sources

This commit is contained in:
Igor Sysoev 2009-04-15 19:46:24 +00:00
parent 5234b9c6a8
commit 60798fbea5
4 changed files with 52 additions and 8 deletions

View File

@ -24,7 +24,7 @@ esac
# __stdcall
#CPU_OPT="$CPU_OPT -ps"
# __fastcall
CPU_OPT="$CPU_OPT -pr"
#CPU_OPT="$CPU_OPT -pr"
CFLAGS="$CFLAGS $CPU_OPT"

View File

@ -51,12 +51,12 @@ case $CPU in
;;
esac
# __cdecl, use with OpenSSL, md5 asm, and sha1 asm
# __cdecl, default, must be used with OpenSSL, md5 asm, and sha1 asm
#CPU_OPT="$CPU_OPT -Gd"
# __stdcall
#CPU_OPT="$CPU_OPT -Gz"
# __fastcall
CPU_OPT="$CPU_OPT -Gr"
#CPU_OPT="$CPU_OPT -Gr"
CFLAGS="$CFLAGS $CPU_OPT"

View File

@ -6,6 +6,21 @@ if [ $OPENSSL != NONE ]; then
CORE_INCS="$CORE_INCS $OPENSSL/include"
case "$CC" in
cl|bcc32)
have=NGX_OPENSSL . auto/have
have=NGX_SSL . auto/have
LINK_DEPS="$LINK_DEPS $OPENSSL/out32/ssleay32.lib"
CORE_LIBS="$CORE_LIBS $OPENSSL/out32/ssleay32.lib"
LINK_DEPS="$LINK_DEPS $OPENSSL/out32/libeay32.lib"
CORE_LIBS="$CORE_LIBS $OPENSSL/out32/libeay32.lib"
# libeay32.lib requires gdi32.lib and advapi32.lib
CORE_LIBS="$CORE_LIBS gdi32.lib advapi32.lib"
;;
*)
have=NGX_OPENSSL . auto/have
have=NGX_SSL . auto/have
@ -34,10 +49,8 @@ else
CORE_LIBS="$CORE_LIBS c:/openssl/ssleay32.lib"
CORE_LIBS="$CORE_LIBS c:/openssl/libeay32.lib"
# libeay32.lib requires gdi32.lib
CORE_LIBS="$CORE_LIBS gdi32.lib"
# OpenSSL 0.8's libeay32.lib requires advapi32.lib
CORE_LIBS="$CORE_LIBS advapi32.lib"
# libeay32.lib requires gdi32.lib and advapi32.lib
CORE_LIBS="$CORE_LIBS gdi32.lib advapi32.lib"
;;
*)

View File

@ -13,7 +13,38 @@ case $USE_THREADS in
*) NGX_OPENSSL_CONFIG="$NGX_OPENSSL_CONFIG threads" ;;
esac
case "$NGX_PLATFORM" in
case "$CC" in
cl)
cat << END >> $NGX_MAKEFILE
$OPENSSL/out32/ssleay32.lib:
cd $OPENSSL
perl Configure VC-WIN32 no-shared
ms\\do_ms
\$(MAKE) -f ms\\nt.mak
cd ..\\..\\..
END
;;
bcc32)
cat << END >> $NGX_MAKEFILE
`echo "$OPENSSL\\out32\\libeay32.lib: $OPENSSL\\out32\\ssleay32.lib" \
| sed -e "s/\//$ngx_regex_dirsep/g"`
`echo "$OPENSSL\\out32\\ssleay32.lib:" | sed -e "s/\//$ngx_regex_dirsep/g"`
cd `echo "$OPENSSL" | sed -e "s/\//$ngx_regex_dirsep/g"`
perl Configure BC-32 no-shared
ms\\do_nasm
\$(MAKE) -f ms\\bcb.mak
cd ..\\..\\..
END
;;
*)
cat << END >> $NGX_MAKEFILE