diff options
Diffstat (limited to '')
24 files changed, 0 insertions, 3708 deletions
diff --git a/src/lib/libcrypto/util/bat.sh b/src/lib/libcrypto/util/bat.sh deleted file mode 100644 index 4d9a8287d0..0000000000 --- a/src/lib/libcrypto/util/bat.sh +++ /dev/null | |||
| @@ -1,134 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | $infile="/home/eay/ssl/SSLeay/MINFO"; | ||
| 4 | |||
| 5 | open(IN,"<$infile") || die "unable to open $infile:$!\n"; | ||
| 6 | $_=<IN>; | ||
| 7 | for (;;) | ||
| 8 | { | ||
| 9 | chop; | ||
| 10 | |||
| 11 | ($key,$val)=/^([^=]+)=(.*)/; | ||
| 12 | if ($key eq "RELATIVE_DIRECTORY") | ||
| 13 | { | ||
| 14 | if ($lib ne "") | ||
| 15 | { | ||
| 16 | $uc=$lib; | ||
| 17 | $uc =~ s/^lib(.*)\.a/$1/; | ||
| 18 | $uc =~ tr/a-z/A-Z/; | ||
| 19 | $lib_nam{$uc}=$uc; | ||
| 20 | $lib_obj{$uc}.=$libobj." "; | ||
| 21 | } | ||
| 22 | last if ($val eq "FINISHED"); | ||
| 23 | $lib=""; | ||
| 24 | $libobj=""; | ||
| 25 | $dir=$val; | ||
| 26 | } | ||
| 27 | |||
| 28 | if ($key eq "TEST") | ||
| 29 | { $test.=&var_add($dir,$val); } | ||
| 30 | |||
| 31 | if (($key eq "PROGS") || ($key eq "E_OBJ")) | ||
| 32 | { $e_exe.=&var_add($dir,$val); } | ||
| 33 | |||
| 34 | if ($key eq "LIB") | ||
| 35 | { | ||
| 36 | $lib=$val; | ||
| 37 | $lib =~ s/^.*\/([^\/]+)$/$1/; | ||
| 38 | } | ||
| 39 | |||
| 40 | if ($key eq "EXHEADER") | ||
| 41 | { $exheader.=&var_add($dir,$val); } | ||
| 42 | |||
| 43 | if ($key eq "HEADER") | ||
| 44 | { $header.=&var_add($dir,$val); } | ||
| 45 | |||
| 46 | if ($key eq "LIBSRC") | ||
| 47 | { $libsrc.=&var_add($dir,$val); } | ||
| 48 | |||
| 49 | if (!($_=<IN>)) | ||
| 50 | { $_="RELATIVE_DIRECTORY=FINISHED\n"; } | ||
| 51 | } | ||
| 52 | close(IN); | ||
| 53 | |||
| 54 | @a=split(/\s+/,$libsrc); | ||
| 55 | foreach (@a) | ||
| 56 | { | ||
| 57 | print "${_}.c\n"; | ||
| 58 | } | ||
| 59 | |||
| 60 | sub var_add | ||
| 61 | { | ||
| 62 | local($dir,$val)=@_; | ||
| 63 | local(@a,$_,$ret); | ||
| 64 | |||
| 65 | return("") if $no_engine && $dir =~ /\/engine/; | ||
| 66 | return("") if $no_idea && $dir =~ /\/idea/; | ||
| 67 | return("") if $no_rc2 && $dir =~ /\/rc2/; | ||
| 68 | return("") if $no_rc4 && $dir =~ /\/rc4/; | ||
| 69 | return("") if $no_rsa && $dir =~ /\/rsa/; | ||
| 70 | return("") if $no_rsa && $dir =~ /^rsaref/; | ||
| 71 | return("") if $no_dsa && $dir =~ /\/dsa/; | ||
| 72 | return("") if $no_dh && $dir =~ /\/dh/; | ||
| 73 | if ($no_des && $dir =~ /\/des/) | ||
| 74 | { | ||
| 75 | if ($val =~ /read_pwd/) | ||
| 76 | { return("$dir/read_pwd "); } | ||
| 77 | else | ||
| 78 | { return(""); } | ||
| 79 | } | ||
| 80 | return("") if $no_mdc2 && $dir =~ /\/mdc2/; | ||
| 81 | return("") if $no_sock && $dir =~ /\/proxy/; | ||
| 82 | return("") if $no_bf && $dir =~ /\/bf/; | ||
| 83 | return("") if $no_cast && $dir =~ /\/cast/; | ||
| 84 | |||
| 85 | $val =~ s/^\s*(.*)\s*$/$1/; | ||
| 86 | @a=split(/\s+/,$val); | ||
| 87 | grep(s/\.[och]$//,@a); | ||
| 88 | |||
| 89 | @a=grep(!/^e_.*_3d$/,@a) if $no_des; | ||
| 90 | @a=grep(!/^e_.*_d$/,@a) if $no_des; | ||
| 91 | @a=grep(!/^e_.*_i$/,@a) if $no_idea; | ||
| 92 | @a=grep(!/^e_.*_r2$/,@a) if $no_rc2; | ||
| 93 | @a=grep(!/^e_.*_bf$/,@a) if $no_bf; | ||
| 94 | @a=grep(!/^e_.*_c$/,@a) if $no_cast; | ||
| 95 | @a=grep(!/^e_rc4$/,@a) if $no_rc4; | ||
| 96 | |||
| 97 | @a=grep(!/(^s2_)|(^s23_)/,@a) if $no_ssl2; | ||
| 98 | @a=grep(!/(^s3_)|(^s23_)/,@a) if $no_ssl3; | ||
| 99 | |||
| 100 | @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock; | ||
| 101 | |||
| 102 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; | ||
| 103 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; | ||
| 104 | |||
| 105 | @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa; | ||
| 106 | @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa; | ||
| 107 | @a=grep(!/(^pem_seal$)/,@a) if $no_rsa; | ||
| 108 | |||
| 109 | @a=grep(!/(m_dss$)|(m_dss1$)/,@a) if $no_dsa; | ||
| 110 | @a=grep(!/(^d2i_s_)|(^i2d_s_)|(_dsap$)/,@a) if $no_dsa; | ||
| 111 | |||
| 112 | @a=grep(!/^n_pkey$/,@a) if $no_rsa || $no_rc4; | ||
| 113 | |||
| 114 | @a=grep(!/_dhp$/,@a) if $no_dh; | ||
| 115 | |||
| 116 | @a=grep(!/(^sha[^1])|(_sha$)|(m_dss$)/,@a) if $no_sha; | ||
| 117 | @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; | ||
| 118 | @a=grep(!/_mdc2$/,@a) if $no_mdc2; | ||
| 119 | |||
| 120 | @a=grep(!/^engine$/,@a) if $no_engine; | ||
| 121 | @a=grep(!/(^rsa$)|(^genrsa$)|(^req$)|(^ca$)/,@a) if $no_rsa; | ||
| 122 | @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa; | ||
| 123 | @a=grep(!/^gendsa$/,@a) if $no_sha1; | ||
| 124 | @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh; | ||
| 125 | |||
| 126 | @a=grep(!/(^dh)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; | ||
| 127 | |||
| 128 | grep($_="$dir/$_",@a); | ||
| 129 | @a=grep(!/(^|\/)s_/,@a) if $no_sock; | ||
| 130 | @a=grep(!/(^|\/)bio_sock/,@a) if $no_sock; | ||
| 131 | $ret=join(' ',@a)." "; | ||
| 132 | return($ret); | ||
| 133 | } | ||
| 134 | |||
diff --git a/src/lib/libcrypto/util/cygwin.sh b/src/lib/libcrypto/util/cygwin.sh deleted file mode 100644 index cfdb04d2a4..0000000000 --- a/src/lib/libcrypto/util/cygwin.sh +++ /dev/null | |||
| @@ -1,154 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # | ||
| 3 | # This script configures, builds and packs the binary package for | ||
| 4 | # the Cygwin net distribution version of OpenSSL | ||
| 5 | # | ||
| 6 | |||
| 7 | # Uncomment when debugging | ||
| 8 | #set -x | ||
| 9 | |||
| 10 | CONFIG_OPTIONS="--prefix=/usr shared zlib no-idea no-rc5" | ||
| 11 | INSTALL_PREFIX=/tmp/install/INSTALL | ||
| 12 | |||
| 13 | VERSION= | ||
| 14 | SHLIB_VERSION_NUMBER= | ||
| 15 | SUBVERSION=$1 | ||
| 16 | |||
| 17 | function cleanup() | ||
| 18 | { | ||
| 19 | rm -rf ${INSTALL_PREFIX}/etc | ||
| 20 | rm -rf ${INSTALL_PREFIX}/usr | ||
| 21 | } | ||
| 22 | |||
| 23 | function get_openssl_version() | ||
| 24 | { | ||
| 25 | eval `grep '^VERSION=' Makefile` | ||
| 26 | if [ -z "${VERSION}" ] | ||
| 27 | then | ||
| 28 | echo "Error: Couldn't retrieve OpenSSL version from Makefile." | ||
| 29 | echo " Check value of variable VERSION in Makefile." | ||
| 30 | exit 1 | ||
| 31 | fi | ||
| 32 | eval `grep '^SHLIB_VERSION_NUMBER=' Makefile` | ||
| 33 | if [ -z "${SHLIB_VERSION_NUMBER}" ] | ||
| 34 | then | ||
| 35 | echo "Error: Couldn't retrieve OpenSSL shared lib version from Makefile." | ||
| 36 | echo " Check value of variable SHLIB_VERSION_NUMBER in Makefile." | ||
| 37 | exit 1 | ||
| 38 | fi | ||
| 39 | } | ||
| 40 | |||
| 41 | function base_install() | ||
| 42 | { | ||
| 43 | mkdir -p ${INSTALL_PREFIX} | ||
| 44 | cleanup | ||
| 45 | make install INSTALL_PREFIX="${INSTALL_PREFIX}" | ||
| 46 | } | ||
| 47 | |||
| 48 | function doc_install() | ||
| 49 | { | ||
| 50 | DOC_DIR=${INSTALL_PREFIX}/usr/share/doc/openssl | ||
| 51 | |||
| 52 | mkdir -p ${DOC_DIR} | ||
| 53 | cp CHANGES CHANGES.SSLeay INSTALL LICENSE NEWS README ${DOC_DIR} | ||
| 54 | |||
| 55 | create_cygwin_readme | ||
| 56 | } | ||
| 57 | |||
| 58 | function certs_install() | ||
| 59 | { | ||
| 60 | CERTS_DIR=${INSTALL_PREFIX}/usr/ssl/certs | ||
| 61 | |||
| 62 | mkdir -p ${CERTS_DIR} | ||
| 63 | cp -rp certs/* ${CERTS_DIR} | ||
| 64 | } | ||
| 65 | |||
| 66 | function create_cygwin_readme() | ||
| 67 | { | ||
| 68 | README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin | ||
| 69 | README_FILE=${README_DIR}/openssl-${VERSION}.README | ||
| 70 | |||
| 71 | mkdir -p ${README_DIR} | ||
| 72 | cat > ${README_FILE} <<- EOF | ||
| 73 | The Cygwin version has been built using the following configure: | ||
| 74 | |||
| 75 | ./config ${CONFIG_OPTIONS} | ||
| 76 | |||
| 77 | The IDEA and RC5 algorithms are disabled due to patent and/or | ||
| 78 | licensing issues. | ||
| 79 | EOF | ||
| 80 | } | ||
| 81 | |||
| 82 | function create_profile_files() | ||
| 83 | { | ||
| 84 | PROFILE_DIR=${INSTALL_PREFIX}/etc/profile.d | ||
| 85 | |||
| 86 | mkdir -p $PROFILE_DIR | ||
| 87 | cat > ${PROFILE_DIR}/openssl.sh <<- "EOF" | ||
| 88 | export MANPATH="${MANPATH}:/usr/ssl/man" | ||
| 89 | EOF | ||
| 90 | cat > ${PROFILE_DIR}/openssl.csh <<- "EOF" | ||
| 91 | if ( $?MANPATH ) then | ||
| 92 | setenv MANPATH "${MANPATH}:/usr/ssl/man" | ||
| 93 | else | ||
| 94 | setenv MANPATH ":/usr/ssl/man" | ||
| 95 | endif | ||
| 96 | EOF | ||
| 97 | } | ||
| 98 | |||
| 99 | if [ -z "${SUBVERSION}" ] | ||
| 100 | then | ||
| 101 | echo "Usage: $0 subversion" | ||
| 102 | exit 1 | ||
| 103 | fi | ||
| 104 | |||
| 105 | if [ ! -f config ] | ||
| 106 | then | ||
| 107 | echo "You must start this script in the OpenSSL toplevel source dir." | ||
| 108 | exit 1 | ||
| 109 | fi | ||
| 110 | |||
| 111 | ./config ${CONFIG_OPTIONS} | ||
| 112 | |||
| 113 | get_openssl_version | ||
| 114 | |||
| 115 | make depend || exit 1 | ||
| 116 | |||
| 117 | make || exit 1 | ||
| 118 | |||
| 119 | base_install | ||
| 120 | |||
| 121 | doc_install | ||
| 122 | |||
| 123 | certs_install | ||
| 124 | |||
| 125 | create_cygwin_readme | ||
| 126 | |||
| 127 | create_profile_files | ||
| 128 | |||
| 129 | cd ${INSTALL_PREFIX} | ||
| 130 | chmod u+w usr/lib/engines/*.so | ||
| 131 | strip usr/bin/*.exe usr/bin/*.dll usr/lib/engines/*.so | ||
| 132 | chmod u-w usr/lib/engines/*.so | ||
| 133 | |||
| 134 | # Runtime package | ||
| 135 | tar cjf libopenssl${SHLIB_VERSION_NUMBER//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 \ | ||
| 136 | usr/bin/cyg*dll | ||
| 137 | # Base package | ||
| 138 | find etc usr/bin/openssl.exe usr/bin/c_rehash usr/lib/engines usr/share/doc \ | ||
| 139 | usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf \ | ||
| 140 | usr/ssl/private \ | ||
| 141 | -empty -o \! -type d | | ||
| 142 | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - | ||
| 143 | # Development package | ||
| 144 | find usr/include usr/lib/*.a usr/lib/pkgconfig usr/ssl/man/man3 \ | ||
| 145 | -empty -o \! -type d | | ||
| 146 | tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 - | ||
| 147 | |||
| 148 | ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2 | ||
| 149 | ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 | ||
| 150 | ls -l libopenssl${SHLIB_VERSION_NUMBER//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 | ||
| 151 | |||
| 152 | cleanup | ||
| 153 | |||
| 154 | exit 0 | ||
diff --git a/src/lib/libcrypto/util/do_ms.sh b/src/lib/libcrypto/util/do_ms.sh deleted file mode 100644 index 515b074cff..0000000000 --- a/src/lib/libcrypto/util/do_ms.sh +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # generate the Microsoft makefiles and .def files | ||
| 4 | # | ||
| 5 | |||
| 6 | PATH=util:../util:$PATH | ||
| 7 | |||
| 8 | # perl util/mk1mf.pl no-sock VC-MSDOS >ms/msdos.mak | ||
| 9 | # perl util/mk1mf.pl VC-W31-32 >ms/w31.mak | ||
| 10 | perl util/mk1mf.pl dll VC-WIN16 >ms/w31dll.mak | ||
| 11 | # perl util/mk1mf.pl VC-WIN32 >ms/nt.mak | ||
| 12 | perl util/mk1mf.pl dll VC-WIN32 >ms/ntdll.mak | ||
| 13 | perl util/mk1mf.pl Mingw32 >ms/mingw32.mak | ||
| 14 | perl util/mk1mf.pl Mingw32-files >ms/mingw32f.mak | ||
| 15 | |||
| 16 | perl util/mkdef.pl 16 libeay > ms/libeay16.def | ||
| 17 | perl util/mkdef.pl 32 libeay > ms/libeay32.def | ||
| 18 | perl util/mkdef.pl 16 ssleay > ms/ssleay16.def | ||
| 19 | perl util/mkdef.pl 32 ssleay > ms/ssleay32.def | ||
diff --git a/src/lib/libcrypto/util/fixNT.sh b/src/lib/libcrypto/util/fixNT.sh deleted file mode 100644 index ab9e766b86..0000000000 --- a/src/lib/libcrypto/util/fixNT.sh +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # clean up the mess that NT makes of my source tree | ||
| 4 | # | ||
| 5 | |||
| 6 | if [ -f makefile -a ! -f Makefile ]; then | ||
| 7 | /bin/mv makefile Makefile | ||
| 8 | fi | ||
| 9 | chmod +x Configure util/* | ||
| 10 | echo cleaning | ||
| 11 | /bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null | ||
| 12 | echo 'removing those damn ^M' | ||
| 13 | perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'` | ||
| 14 | make -f Makefile links | ||
diff --git a/src/lib/libcrypto/util/pl/BC-32.pl b/src/lib/libcrypto/util/pl/BC-32.pl deleted file mode 100644 index b41bb45e82..0000000000 --- a/src/lib/libcrypto/util/pl/BC-32.pl +++ /dev/null | |||
| @@ -1,139 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si> | ||
| 3 | # | ||
| 4 | |||
| 5 | $ssl= "ssleay32"; | ||
| 6 | $crypto="libeay32"; | ||
| 7 | |||
| 8 | $o='\\'; | ||
| 9 | $cp='copy'; | ||
| 10 | $rm='del'; | ||
| 11 | |||
| 12 | # C compiler stuff | ||
| 13 | $cc='bcc32'; | ||
| 14 | $lflags="-ap -Tpe -x -Gn "; | ||
| 15 | $mlflags=''; | ||
| 16 | |||
| 17 | $out_def="out32"; | ||
| 18 | $tmp_def="tmp32"; | ||
| 19 | $inc_def="inc32"; | ||
| 20 | #enable max error messages, disable most common warnings | ||
| 21 | $cflags="-DWIN32_LEAN_AND_MEAN -q -w-ccc -w-rch -w-pia -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp -D_strnicmp=strnicmp -D_timeb=timeb -D_ftime=ftime "; | ||
| 22 | if ($debug) | ||
| 23 | { | ||
| 24 | $cflags.="-Od -y -v -vi- -D_DEBUG"; | ||
| 25 | $mlflags.=' '; | ||
| 26 | } | ||
| 27 | else | ||
| 28 | { | ||
| 29 | $cflags.="-O2 -ff -fp"; | ||
| 30 | } | ||
| 31 | |||
| 32 | $obj='.obj'; | ||
| 33 | $ofile="-o"; | ||
| 34 | |||
| 35 | # EXE linking stuff | ||
| 36 | $link="ilink32"; | ||
| 37 | $efile=""; | ||
| 38 | $exep='.exe'; | ||
| 39 | if ($no_sock) | ||
| 40 | { $ex_libs=""; } | ||
| 41 | else { $ex_libs="cw32mt.lib import32.lib crypt32.lib ws2_32.lib"; } | ||
| 42 | |||
| 43 | # static library stuff | ||
| 44 | $mklib='tlib /P64'; | ||
| 45 | $ranlib=''; | ||
| 46 | $plib=""; | ||
| 47 | $libp=".lib"; | ||
| 48 | $shlibp=($shlib)?".dll":".lib"; | ||
| 49 | $lfile=''; | ||
| 50 | |||
| 51 | $shlib_ex_obj=""; | ||
| 52 | $app_ex_obj="c0x32.obj"; | ||
| 53 | |||
| 54 | $asm=(`nasm -v 2>NUL` ge `nasmw -v 2>NUL`?"nasm":"nasmw")." -f obj -d__omf__"; | ||
| 55 | $asm.=" -g" if $debug; | ||
| 56 | $afile='-o'; | ||
| 57 | |||
| 58 | $bn_mulw_obj=''; | ||
| 59 | $bn_mulw_src=''; | ||
| 60 | $des_enc_obj=''; | ||
| 61 | $des_enc_src=''; | ||
| 62 | $bf_enc_obj=''; | ||
| 63 | $bf_enc_src=''; | ||
| 64 | |||
| 65 | if (!$no_asm) | ||
| 66 | { | ||
| 67 | $bn_mulw_obj='crypto\bn\asm\bn_win32.obj'; | ||
| 68 | $bn_mulw_src='crypto\bn\asm\bn_win32.asm'; | ||
| 69 | $des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj'; | ||
| 70 | $des_enc_src='crypto\des\asm\d_win32.asm crypto\des\asm\y_win32.asm'; | ||
| 71 | $bf_enc_obj='crypto\bf\asm\b_win32.obj'; | ||
| 72 | $bf_enc_src='crypto\bf\asm\b_win32.asm'; | ||
| 73 | $cast_enc_obj='crypto\cast\asm\c_win32.obj'; | ||
| 74 | $cast_enc_src='crypto\cast\asm\c_win32.asm'; | ||
| 75 | $rc4_enc_obj='crypto\rc4\asm\r4_win32.obj'; | ||
| 76 | $rc4_enc_src='crypto\rc4\asm\r4_win32.asm'; | ||
| 77 | $rc5_enc_obj='crypto\rc5\asm\r5_win32.obj'; | ||
| 78 | $rc5_enc_src='crypto\rc5\asm\r5_win32.asm'; | ||
| 79 | $md5_asm_obj='crypto\md5\asm\m5_win32.obj'; | ||
| 80 | $md5_asm_src='crypto\md5\asm\m5_win32.asm'; | ||
| 81 | $sha1_asm_obj='crypto\sha\asm\s1_win32.obj'; | ||
| 82 | $sha1_asm_src='crypto\sha\asm\s1_win32.asm'; | ||
| 83 | $rmd160_asm_obj='crypto\ripemd\asm\rm_win32.obj'; | ||
| 84 | $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm'; | ||
| 85 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; | ||
| 86 | } | ||
| 87 | |||
| 88 | if ($shlib) | ||
| 89 | { | ||
| 90 | $mlflags.=" $lflags /dll"; | ||
| 91 | # $cflags =~ s| /MD| /MT|; | ||
| 92 | $lib_cflag=" /GD -D_WINDLL -D_DLL"; | ||
| 93 | $out_def="out32dll"; | ||
| 94 | $tmp_def="tmp32dll"; | ||
| 95 | } | ||
| 96 | |||
| 97 | sub do_lib_rule | ||
| 98 | { | ||
| 99 | local($objs,$target,$name,$shlib)=@_; | ||
| 100 | local($ret,$Name); | ||
| 101 | |||
| 102 | $taget =~ s/\//$o/g if $o ne '/'; | ||
| 103 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 104 | |||
| 105 | # $target="\$(LIB_D)$o$target"; | ||
| 106 | $ret.="$target: $objs\n"; | ||
| 107 | if (!$shlib) | ||
| 108 | { | ||
| 109 | $ret.=<<___; | ||
| 110 | -\$(RM) $lfile$target | ||
| 111 | \$(MKLIB) $lfile$target \@&&! | ||
| 112 | +\$(**: = &^ | ||
| 113 | +) | ||
| 114 | ! | ||
| 115 | ___ | ||
| 116 | } | ||
| 117 | else | ||
| 118 | { | ||
| 119 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; | ||
| 120 | $ex.=' ws2_32.lib gdi32.lib'; | ||
| 121 | $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; | ||
| 122 | } | ||
| 123 | $ret.="\n"; | ||
| 124 | return($ret); | ||
| 125 | } | ||
| 126 | |||
| 127 | sub do_link_rule | ||
| 128 | { | ||
| 129 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 130 | local($ret,$_); | ||
| 131 | |||
| 132 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 133 | $n=&bname($targer); | ||
| 134 | $ret.="$target: $files $dep_libs\n"; | ||
| 135 | $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; | ||
| 136 | return($ret); | ||
| 137 | } | ||
| 138 | |||
| 139 | 1; | ||
diff --git a/src/lib/libcrypto/util/pl/Mingw32.pl b/src/lib/libcrypto/util/pl/Mingw32.pl deleted file mode 100644 index fe3fb27a78..0000000000 --- a/src/lib/libcrypto/util/pl/Mingw32.pl +++ /dev/null | |||
| @@ -1,104 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # Mingw32.pl -- Mingw | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='cp'; | ||
| 8 | $rm='rm -f'; | ||
| 9 | $mkdir='gmkdir'; | ||
| 10 | |||
| 11 | $o='\\'; | ||
| 12 | $cp='copy'; | ||
| 13 | $rm='del'; | ||
| 14 | $mkdir='mkdir'; | ||
| 15 | |||
| 16 | # C compiler stuff | ||
| 17 | |||
| 18 | $cc='gcc'; | ||
| 19 | if ($debug) | ||
| 20 | { $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; } | ||
| 21 | else | ||
| 22 | { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; } | ||
| 23 | |||
| 24 | if ($gaswin and !$no_asm) | ||
| 25 | { | ||
| 26 | $bn_asm_obj='$(OBJ_D)\bn-win32.o'; | ||
| 27 | $bn_asm_src='crypto/bn/asm/bn-win32.s'; | ||
| 28 | $bnco_asm_obj='$(OBJ_D)\co-win32.o'; | ||
| 29 | $bnco_asm_src='crypto/bn/asm/co-win32.s'; | ||
| 30 | $des_enc_obj='$(OBJ_D)\d-win32.o $(OBJ_D)\y-win32.o'; | ||
| 31 | $des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s'; | ||
| 32 | $bf_enc_obj='$(OBJ_D)\b-win32.o'; | ||
| 33 | $bf_enc_src='crypto/bf/asm/b-win32.s'; | ||
| 34 | # $cast_enc_obj='$(OBJ_D)\c-win32.o'; | ||
| 35 | # $cast_enc_src='crypto/cast/asm/c-win32.s'; | ||
| 36 | $rc4_enc_obj='$(OBJ_D)\r4-win32.o'; | ||
| 37 | $rc4_enc_src='crypto/rc4/asm/r4-win32.s'; | ||
| 38 | $rc5_enc_obj='$(OBJ_D)\r5-win32.o'; | ||
| 39 | $rc5_enc_src='crypto/rc5/asm/r5-win32.s'; | ||
| 40 | $md5_asm_obj='$(OBJ_D)\m5-win32.o'; | ||
| 41 | $md5_asm_src='crypto/md5/asm/m5-win32.s'; | ||
| 42 | $rmd160_asm_obj='$(OBJ_D)\rm-win32.o'; | ||
| 43 | $rmd160_asm_src='crypto/ripemd/asm/rm-win32.s'; | ||
| 44 | $sha1_asm_obj='$(OBJ_D)\s1-win32.o'; | ||
| 45 | $sha1_asm_src='crypto/sha/asm/s1-win32.s'; | ||
| 46 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; | ||
| 47 | } | ||
| 48 | |||
| 49 | |||
| 50 | $obj='.o'; | ||
| 51 | $ofile='-o '; | ||
| 52 | |||
| 53 | # EXE linking stuff | ||
| 54 | $link='${CC}'; | ||
| 55 | $lflags='${CFLAGS}'; | ||
| 56 | $efile='-o '; | ||
| 57 | $exep=''; | ||
| 58 | $ex_libs="-lws2_32 -lgdi32"; | ||
| 59 | |||
| 60 | # static library stuff | ||
| 61 | $mklib='ar r'; | ||
| 62 | $mlflags=''; | ||
| 63 | $ranlib='ranlib'; | ||
| 64 | $plib='lib'; | ||
| 65 | $libp=".a"; | ||
| 66 | $shlibp=".a"; | ||
| 67 | $lfile=''; | ||
| 68 | |||
| 69 | $asm='as'; | ||
| 70 | $afile='-o '; | ||
| 71 | #$bn_asm_obj=""; | ||
| 72 | #$bn_asm_src=""; | ||
| 73 | #$des_enc_obj=""; | ||
| 74 | #$des_enc_src=""; | ||
| 75 | #$bf_enc_obj=""; | ||
| 76 | #$bf_enc_src=""; | ||
| 77 | |||
| 78 | sub do_lib_rule | ||
| 79 | { | ||
| 80 | local($obj,$target,$name,$shlib)=@_; | ||
| 81 | local($ret,$_,$Name); | ||
| 82 | |||
| 83 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 84 | $target="$target"; | ||
| 85 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 86 | |||
| 87 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 88 | $ret.="\tif exist $target \$(RM) $target\n"; | ||
| 89 | $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; | ||
| 90 | $ret.="\t\$(RANLIB) $target\n\n"; | ||
| 91 | } | ||
| 92 | |||
| 93 | sub do_link_rule | ||
| 94 | { | ||
| 95 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 96 | local($ret,$_); | ||
| 97 | |||
| 98 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 99 | $n=&bname($target); | ||
| 100 | $ret.="$target: $files $dep_libs\n"; | ||
| 101 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 102 | return($ret); | ||
| 103 | } | ||
| 104 | 1; | ||
diff --git a/src/lib/libcrypto/util/pl/OS2-EMX.pl b/src/lib/libcrypto/util/pl/OS2-EMX.pl deleted file mode 100644 index 28cd116907..0000000000 --- a/src/lib/libcrypto/util/pl/OS2-EMX.pl +++ /dev/null | |||
| @@ -1,120 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # OS2-EMX.pl - for EMX GCC on OS/2 | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='cp'; | ||
| 8 | $rm='rm -f'; | ||
| 9 | |||
| 10 | $preamble = "SHELL=sh\n"; | ||
| 11 | |||
| 12 | # C compiler stuff | ||
| 13 | |||
| 14 | $cc='gcc'; | ||
| 15 | $cflags="-DL_ENDIAN -O3 -fomit-frame-pointer -m486 -Zmtd -Wall "; | ||
| 16 | $cflags.="-Zomf " if $shlib; | ||
| 17 | $shl_cflag="-Zdll"; | ||
| 18 | |||
| 19 | if ($debug) { | ||
| 20 | $cflags.="-g "; | ||
| 21 | } | ||
| 22 | |||
| 23 | $obj=$shlib ? '.obj' : '.o'; | ||
| 24 | $ofile='-o '; | ||
| 25 | |||
| 26 | # EXE linking stuff | ||
| 27 | $link='${CC}'; | ||
| 28 | $lflags='${CFLAGS} -Zbsd-signals -s'; | ||
| 29 | $efile='-o '; | ||
| 30 | $exep='.exe'; | ||
| 31 | $ex_libs="-lsocket"; | ||
| 32 | |||
| 33 | # static library stuff | ||
| 34 | $mklib='ar r'; | ||
| 35 | $mlflags=''; | ||
| 36 | $ranlib="ar s"; | ||
| 37 | $plib=''; | ||
| 38 | $libp=$shlib ? ".lib" : ".a"; | ||
| 39 | $shlibp=$shlib ? ".dll" : ".a"; | ||
| 40 | $lfile=''; | ||
| 41 | |||
| 42 | $asm=$shlib ? 'as -Zomf' : 'as'; | ||
| 43 | $afile='-o '; | ||
| 44 | $bn_asm_obj=""; | ||
| 45 | $bn_asm_src=""; | ||
| 46 | $des_enc_obj=""; | ||
| 47 | $des_enc_src=""; | ||
| 48 | $bf_enc_obj=""; | ||
| 49 | $bf_enc_src=""; | ||
| 50 | |||
| 51 | if (!$no_asm) | ||
| 52 | { | ||
| 53 | $bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj"; | ||
| 54 | $bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm"; | ||
| 55 | $des_enc_obj="crypto/des/asm/d-os2$obj crypto/des/asm/y-os2$obj"; | ||
| 56 | $des_enc_src="crypto/des/asm/d-os2.asm crypto/des/asm/y-os2.asm"; | ||
| 57 | $bf_enc_obj="crypto/bf/asm/b-os2$obj"; | ||
| 58 | $bf_enc_src="crypto/bf/asm/b-os2.asm"; | ||
| 59 | $cast_enc_obj="crypto/cast/asm/c-os2$obj"; | ||
| 60 | $cast_enc_src="crypto/cast/asm/c-os2.asm"; | ||
| 61 | $rc4_enc_obj="crypto/rc4/asm/r4-os2$obj"; | ||
| 62 | $rc4_enc_src="crypto/rc4/asm/r4-os2.asm"; | ||
| 63 | $rc5_enc_obj="crypto/rc5/asm/r5-os2$obj"; | ||
| 64 | $rc5_enc_src="crypto/rc5/asm/r5-os2.asm"; | ||
| 65 | $md5_asm_obj="crypto/md5/asm/m5-os2$obj"; | ||
| 66 | $md5_asm_src="crypto/md5/asm/m5-os2.asm"; | ||
| 67 | $sha1_asm_obj="crypto/sha/asm/s1-os2$obj"; | ||
| 68 | $sha1_asm_src="crypto/sha/asm/s1-os2.asm"; | ||
| 69 | $rmd160_asm_obj="crypto/ripemd/asm/rm-os2$obj"; | ||
| 70 | $rmd160_asm_src="crypto/ripemd/asm/rm-os2.asm"; | ||
| 71 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; | ||
| 72 | } | ||
| 73 | |||
| 74 | if ($shlib) | ||
| 75 | { | ||
| 76 | $mlflags.=" $lflags -Zdll"; | ||
| 77 | $lib_cflag=" -D_DLL"; | ||
| 78 | $out_def="out_dll"; | ||
| 79 | $tmp_def="tmp_dll"; | ||
| 80 | } | ||
| 81 | |||
| 82 | sub do_lib_rule | ||
| 83 | { | ||
| 84 | local($obj,$target,$name,$shlib)=@_; | ||
| 85 | local($ret,$_,$Name); | ||
| 86 | |||
| 87 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 88 | $target="$target"; | ||
| 89 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 90 | |||
| 91 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 92 | if (!$shlib) | ||
| 93 | { | ||
| 94 | $ret.="\t\$(RM) $target\n"; | ||
| 95 | $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; | ||
| 96 | $ret.="\t\$(RANLIB) $target\n\n"; | ||
| 97 | } | ||
| 98 | else | ||
| 99 | { | ||
| 100 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; | ||
| 101 | $ex.=' -lsocket'; | ||
| 102 | $ret.="\t\$(LINK) \$(SHLIB_CFLAGS) \$(MLFLAGS) $efile$target \$(SHLIB_EX_OBJ) \$(${Name}OBJ) $ex os2/${Name}.def\n"; | ||
| 103 | $ret.="\temximp -o $out_def/$name.a os2/${Name}.def\n"; | ||
| 104 | $ret.="\temximp -o $out_def/$name.lib os2/${Name}.def\n\n"; | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 108 | sub do_link_rule | ||
| 109 | { | ||
| 110 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 111 | local($ret,$_); | ||
| 112 | |||
| 113 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 114 | $n=&bname($target); | ||
| 115 | $ret.="$target: $files $dep_libs\n"; | ||
| 116 | $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n\n"; | ||
| 117 | return($ret); | ||
| 118 | } | ||
| 119 | |||
| 120 | 1; | ||
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl deleted file mode 100644 index 3705fc73b7..0000000000 --- a/src/lib/libcrypto/util/pl/VC-32.pl +++ /dev/null | |||
| @@ -1,400 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # VC-32.pl - unified script for Microsoft Visual C++, covering Win32, | ||
| 3 | # Win64 and WinCE [follow $FLAVOR variable to trace the differences]. | ||
| 4 | # | ||
| 5 | |||
| 6 | $ssl= "ssleay32"; | ||
| 7 | $crypto="libeay32"; | ||
| 8 | |||
| 9 | if ($fips && !$shlib) | ||
| 10 | { | ||
| 11 | $crypto="libeayfips32"; | ||
| 12 | $crypto_compat = "libeaycompat32.lib"; | ||
| 13 | } | ||
| 14 | else | ||
| 15 | { | ||
| 16 | $crypto="libeay32"; | ||
| 17 | } | ||
| 18 | |||
| 19 | $o='\\'; | ||
| 20 | $cp='$(PERL) util/copy.pl'; | ||
| 21 | $mkdir='$(PERL) util/mkdir-p.pl'; | ||
| 22 | $rm='del /Q'; | ||
| 23 | |||
| 24 | $zlib_lib="zlib1.lib"; | ||
| 25 | |||
| 26 | # Santize -L options for ms link | ||
| 27 | $l_flags =~ s/-L("\[^"]+")/\/libpath:$1/g; | ||
| 28 | $l_flags =~ s/-L(\S+)/\/libpath:$1/g; | ||
| 29 | |||
| 30 | my $ff = ""; | ||
| 31 | |||
| 32 | # C compiler stuff | ||
| 33 | $cc='cl'; | ||
| 34 | if ($FLAVOR =~ /WIN64/) | ||
| 35 | { | ||
| 36 | # Note that we currently don't have /WX on Win64! There is a lot of | ||
| 37 | # warnings, but only of two types: | ||
| 38 | # | ||
| 39 | # C4344: conversion from '__int64' to 'int/long', possible loss of data | ||
| 40 | # C4267: conversion from 'size_t' to 'int/long', possible loss of data | ||
| 41 | # | ||
| 42 | # Amount of latter type is minimized by aliasing strlen to function of | ||
| 43 | # own desing and limiting its return value to 2GB-1 (see e_os.h). As | ||
| 44 | # per 0.9.8 release remaining warnings were explicitly examined and | ||
| 45 | # considered safe to ignore. | ||
| 46 | # | ||
| 47 | $base_cflags= " $mf_cflag"; | ||
| 48 | my $f = $shlib || $fips ?' /MD':' /MT'; | ||
| 49 | $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib | ||
| 50 | $opt_cflags=$f.' /Ox'; | ||
| 51 | $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; | ||
| 52 | $lflags="/nologo /subsystem:console /opt:ref"; | ||
| 53 | |||
| 54 | *::perlasm_compile_target = sub { | ||
| 55 | my ($target,$source,$bname)=@_; | ||
| 56 | my $ret; | ||
| 57 | |||
| 58 | $bname =~ s/(.*)\.[^\.]$/$1/; | ||
| 59 | $ret=<<___; | ||
| 60 | \$(TMP_D)$o$bname.asm: $source | ||
| 61 | set ASM=\$(ASM) | ||
| 62 | \$(PERL) $source \$\@ | ||
| 63 | |||
| 64 | $target: \$(TMP_D)$o$bname.asm | ||
| 65 | \$(ASM) $afile\$\@ \$(TMP_D)$o$bname.asm | ||
| 66 | |||
| 67 | ___ | ||
| 68 | } | ||
| 69 | } | ||
| 70 | elsif ($FLAVOR =~ /CE/) | ||
| 71 | { | ||
| 72 | # sanity check | ||
| 73 | die '%OSVERSION% is not defined' if (!defined($ENV{'OSVERSION'})); | ||
| 74 | die '%PLATFORM% is not defined' if (!defined($ENV{'PLATFORM'})); | ||
| 75 | die '%TARGETCPU% is not defined' if (!defined($ENV{'TARGETCPU'})); | ||
| 76 | |||
| 77 | # | ||
| 78 | # Idea behind this is to mimic flags set by eVC++ IDE... | ||
| 79 | # | ||
| 80 | $wcevers = $ENV{'OSVERSION'}; # WCENNN | ||
| 81 | die '%OSVERSION% value is insane' if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/); | ||
| 82 | $wcecdefs = "-D_WIN32_WCE=$1$2 -DUNDER_CE=$1$2"; # -D_WIN32_WCE=NNN | ||
| 83 | $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN | ||
| 84 | |||
| 85 | $wceplatf = $ENV{'PLATFORM'}; | ||
| 86 | $wceplatf =~ tr/a-z0-9 /A-Z0-9_/d; | ||
| 87 | $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; | ||
| 88 | |||
| 89 | $wcetgt = $ENV{'TARGETCPU'}; # just shorter name... | ||
| 90 | SWITCH: for($wcetgt) { | ||
| 91 | /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_"; | ||
| 92 | $wcelflag.=" /machine:IX86"; last; }; | ||
| 93 | /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | ||
| 94 | $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/); | ||
| 95 | $wcecdefs.=" -QRarch4T -QRinterwork-return"; | ||
| 96 | $wcelflag.=" /machine:THUMB"; last; }; | ||
| 97 | /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | ||
| 98 | $wcelflag.=" /machine:ARM"; last; }; | ||
| 99 | /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | ||
| 100 | $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32"; | ||
| 101 | $wcelflag.=" /machine:MIPSFPU"; last; }; | ||
| 102 | /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | ||
| 103 | $wcecdefs.=" -DMIPSII -QMmips16"; | ||
| 104 | $wcelflag.=" /machine:MIPS16"; last; }; | ||
| 105 | /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | ||
| 106 | $wcecdefs.=" -QMmips2"; | ||
| 107 | $wcelflag.=" /machine:MIPS"; last; }; | ||
| 108 | /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000"; | ||
| 109 | $wcelflag.=" /machine:MIPS"; last; }; | ||
| 110 | /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_$wcetgt_ -DSHx"; | ||
| 111 | $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/); | ||
| 112 | $wcelflag.=" /machine:$wcetgt"; last; }; | ||
| 113 | { $wcecdefs.=" -D$wcetgt -D_$wcetgt_"; | ||
| 114 | $wcelflag.=" /machine:$wcetgt"; last; }; | ||
| 115 | } | ||
| 116 | |||
| 117 | $cc='$(CC)'; | ||
| 118 | $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT'; | ||
| 119 | $base_cflags.=" $wcecdefs"; | ||
| 120 | $base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'})); | ||
| 121 | $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'})); | ||
| 122 | $opt_cflags=' /MC /O1i'; # optimize for space, but with intrinsics... | ||
| 123 | $dbg_cflags=' /MC /Od -DDEBUG -D_DEBUG'; | ||
| 124 | $lflags="/nologo /opt:ref $wcelflag"; | ||
| 125 | } | ||
| 126 | else # Win32 | ||
| 127 | { | ||
| 128 | $base_cflags= " $mf_cflag"; | ||
| 129 | my $f = $shlib || $fips ?' /MD':' /MT'; | ||
| 130 | $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib | ||
| 131 | $ff = "/fixed"; | ||
| 132 | $opt_cflags=$f.' /Ox /O2 /Ob2'; | ||
| 133 | $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; | ||
| 134 | $lflags="/nologo /subsystem:console /opt:ref"; | ||
| 135 | } | ||
| 136 | $mlflags=''; | ||
| 137 | |||
| 138 | $out_def ="out32"; $out_def.="dll" if ($shlib); | ||
| 139 | $out_def.='_$(TARGETCPU)' if ($FLAVOR =~ /CE/); | ||
| 140 | $tmp_def ="tmp32"; $tmp_def.="dll" if ($shlib); | ||
| 141 | $tmp_def.='_$(TARGETCPU)' if ($FLAVOR =~ /CE/); | ||
| 142 | $inc_def="inc32"; | ||
| 143 | |||
| 144 | if ($debug) | ||
| 145 | { | ||
| 146 | $cflags=$dbg_cflags.$base_cflags; | ||
| 147 | } | ||
| 148 | else | ||
| 149 | { | ||
| 150 | $cflags=$opt_cflags.$base_cflags; | ||
| 151 | } | ||
| 152 | |||
| 153 | # generate symbols.pdb unconditionally | ||
| 154 | $app_cflag.=" /Zi /Fd\$(TMP_D)/app"; | ||
| 155 | $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; | ||
| 156 | $lflags.=" /debug"; | ||
| 157 | |||
| 158 | $obj='.obj'; | ||
| 159 | $asm_suffix='.asm'; | ||
| 160 | $ofile="/Fo"; | ||
| 161 | |||
| 162 | # EXE linking stuff | ||
| 163 | $link="link"; | ||
| 164 | $rsc="rc"; | ||
| 165 | $efile="/out:"; | ||
| 166 | $exep='.exe'; | ||
| 167 | if ($no_sock) { $ex_libs=''; } | ||
| 168 | elsif ($FLAVOR =~ /CE/) { $ex_libs='winsock.lib'; } | ||
| 169 | else { $ex_libs='ws2_32.lib'; } | ||
| 170 | |||
| 171 | if ($FLAVOR =~ /CE/) | ||
| 172 | { | ||
| 173 | $ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib' if (defined($ENV{'WCECOMPAT'})); | ||
| 174 | $ex_libs.=' $(PORTSDK_LIBPATH)/portlib.lib' if (defined($ENV{'PORTSDK_LIBPATH'})); | ||
| 175 | $ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86"); | ||
| 176 | } | ||
| 177 | else | ||
| 178 | { | ||
| 179 | $ex_libs.=' gdi32.lib advapi32.lib crypt32.lib user32.lib'; | ||
| 180 | $ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/ and `cl 2>&1` =~ /14\.00\.4[0-9]{4}\./); | ||
| 181 | # WIN32 UNICODE build gets linked with unicows.lib for | ||
| 182 | # backward compatibility with Win9x. | ||
| 183 | $ex_libs="unicows.lib $ex_libs" if ($FLAVOR =~ /WIN32/ and $cflags =~ /\-DUNICODE/); | ||
| 184 | } | ||
| 185 | |||
| 186 | # static library stuff | ||
| 187 | $mklib='lib /nologo'; | ||
| 188 | $ranlib=''; | ||
| 189 | $plib=""; | ||
| 190 | $libp=".lib"; | ||
| 191 | $shlibp=($shlib)?".dll":".lib"; | ||
| 192 | $lfile='/out:'; | ||
| 193 | |||
| 194 | $shlib_ex_obj=""; | ||
| 195 | $app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/); | ||
| 196 | if ($FLAVOR =~ /WIN64A/) { | ||
| 197 | if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) { | ||
| 198 | $asm='nasm -f win64 -DNEAR -Ox -g'; | ||
| 199 | $afile='-o '; | ||
| 200 | } else { | ||
| 201 | $asm='ml64 /c /Cp /Cx /Zi'; | ||
| 202 | $afile='/Fo'; | ||
| 203 | } | ||
| 204 | } elsif ($FLAVOR =~ /WIN64I/) { | ||
| 205 | $asm='ias -d debug'; | ||
| 206 | $afile="-o "; | ||
| 207 | } elsif ($nasm) { | ||
| 208 | my $ver=`nasm -v 2>NUL`; | ||
| 209 | my $vew=`nasmw -v 2>NUL`; | ||
| 210 | # pick newest version | ||
| 211 | $asm=($ver ge $vew?"nasm":"nasmw")." -f win32"; | ||
| 212 | $asmtype="win32n"; | ||
| 213 | $afile='-o '; | ||
| 214 | } else { | ||
| 215 | $asm='ml /nologo /Cp /coff /c /Cx /Zi'; | ||
| 216 | $afile='/Fo'; | ||
| 217 | $asmtype="win32"; | ||
| 218 | } | ||
| 219 | |||
| 220 | $bn_asm_obj=''; | ||
| 221 | $bn_asm_src=''; | ||
| 222 | $des_enc_obj=''; | ||
| 223 | $des_enc_src=''; | ||
| 224 | $bf_enc_obj=''; | ||
| 225 | $bf_enc_src=''; | ||
| 226 | |||
| 227 | if (!$no_asm) | ||
| 228 | { | ||
| 229 | win32_import_asm($mf_bn_asm, "bn", \$bn_asm_obj, \$bn_asm_src); | ||
| 230 | win32_import_asm($mf_aes_asm, "aes", \$aes_asm_obj, \$aes_asm_src); | ||
| 231 | win32_import_asm($mf_des_asm, "des", \$des_enc_obj, \$des_enc_src); | ||
| 232 | win32_import_asm($mf_bf_asm, "bf", \$bf_enc_obj, \$bf_enc_src); | ||
| 233 | win32_import_asm($mf_cast_asm, "cast", \$cast_enc_obj, \$cast_enc_src); | ||
| 234 | win32_import_asm($mf_rc4_asm, "rc4", \$rc4_enc_obj, \$rc4_enc_src); | ||
| 235 | win32_import_asm($mf_rc5_asm, "rc5", \$rc5_enc_obj, \$rc5_enc_src); | ||
| 236 | win32_import_asm($mf_md5_asm, "md5", \$md5_asm_obj, \$md5_asm_src); | ||
| 237 | win32_import_asm($mf_sha_asm, "sha", \$sha1_asm_obj, \$sha1_asm_src); | ||
| 238 | win32_import_asm($mf_rmd_asm, "ripemd", \$rmd160_asm_obj, \$rmd160_asm_src); | ||
| 239 | win32_import_asm($mf_wp_asm, "whrlpool", \$whirlpool_asm_obj, \$whirlpool_asm_src); | ||
| 240 | win32_import_asm($mf_cpuid_asm, "", \$cpuid_asm_obj, \$cpuid_asm_src); | ||
| 241 | $perl_asm = 1; | ||
| 242 | } | ||
| 243 | |||
| 244 | if ($shlib && $FLAVOR !~ /CE/) | ||
| 245 | { | ||
| 246 | $mlflags.=" $lflags /dll"; | ||
| 247 | $lib_cflag.=" -D_WINDLL"; | ||
| 248 | # | ||
| 249 | # Engage Applink... | ||
| 250 | # | ||
| 251 | $app_ex_obj.=" \$(OBJ_D)\\applink.obj /implib:\$(TMP_D)\\junk.lib"; | ||
| 252 | $cflags.=" -DOPENSSL_USE_APPLINK -I."; | ||
| 253 | # I'm open for better suggestions than overriding $banner... | ||
| 254 | $banner=<<'___'; | ||
| 255 | @echo Building OpenSSL | ||
| 256 | |||
| 257 | $(OBJ_D)\applink.obj: ms\applink.c | ||
| 258 | $(CC) /Fo$(OBJ_D)\applink.obj $(APP_CFLAGS) -c ms\applink.c | ||
| 259 | $(OBJ_D)\uplink.obj: ms\uplink.c ms\applink.c | ||
| 260 | $(CC) /Fo$(OBJ_D)\uplink.obj $(SHLIB_CFLAGS) -c ms\uplink.c | ||
| 261 | $(INCO_D)\applink.c: ms\applink.c | ||
| 262 | $(CP) ms\applink.c $(INCO_D)\applink.c | ||
| 263 | |||
| 264 | EXHEADER= $(EXHEADER) $(INCO_D)\applink.c | ||
| 265 | |||
| 266 | LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj | ||
| 267 | CRYPTOOBJ=$(OBJ_D)\uplink.obj $(CRYPTOOBJ) | ||
| 268 | ___ | ||
| 269 | $banner.=<<'___' if ($FLAVOR =~ /WIN64/); | ||
| 270 | CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ) | ||
| 271 | ___ | ||
| 272 | } | ||
| 273 | elsif ($shlib && $FLAVOR =~ /CE/) | ||
| 274 | { | ||
| 275 | $mlflags.=" $lflags /dll"; | ||
| 276 | $lflags.=' /entry:mainCRTstartup' if(defined($ENV{'PORTSDK_LIBPATH'})); | ||
| 277 | $lib_cflag.=" -D_WINDLL -D_DLL"; | ||
| 278 | } | ||
| 279 | |||
| 280 | sub do_lib_rule | ||
| 281 | { | ||
| 282 | my($objs,$target,$name,$shlib,$ign,$base_addr) = @_; | ||
| 283 | local($ret); | ||
| 284 | |||
| 285 | $taget =~ s/\//$o/g if $o ne '/'; | ||
| 286 | my $base_arg; | ||
| 287 | if ($base_addr ne "") | ||
| 288 | { | ||
| 289 | $base_arg= " /base:$base_addr"; | ||
| 290 | } | ||
| 291 | else | ||
| 292 | { | ||
| 293 | $base_arg = ""; | ||
| 294 | } | ||
| 295 | if ($name ne "") | ||
| 296 | { | ||
| 297 | $name =~ tr/a-z/A-Z/; | ||
| 298 | $name = "/def:ms/${name}.def"; | ||
| 299 | } | ||
| 300 | |||
| 301 | # $target="\$(LIB_D)$o$target"; | ||
| 302 | # $ret.="$target: $objs\n"; | ||
| 303 | if (!$shlib) | ||
| 304 | { | ||
| 305 | # $ret.="\t\$(RM) \$(O_$Name)\n"; | ||
| 306 | $ret.="$target: $objs\n"; | ||
| 307 | $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs\n<<\n"; | ||
| 308 | } | ||
| 309 | else | ||
| 310 | { | ||
| 311 | local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)'; | ||
| 312 | $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/; | ||
| 313 | |||
| 314 | if ($fips && $target =~ /O_CRYPTO/) | ||
| 315 | { | ||
| 316 | $ret.="$target: $objs \$(PREMAIN_DSO_EXE)"; | ||
| 317 | $ret.="\n\tSET FIPS_LINK=\$(LINK)\n"; | ||
| 318 | $ret.="\tSET FIPS_CC=\$(CC)\n"; | ||
| 319 | $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n"; | ||
| 320 | $ret.="\tSET PREMAIN_DSO_EXE=\$(PREMAIN_DSO_EXE)\n"; | ||
| 321 | $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n"; | ||
| 322 | $ret.="\tSET FIPS_TARGET=$target\n"; | ||
| 323 | $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n"; | ||
| 324 | $ret.="\t\$(FIPSLINK) \$(MLFLAGS) $ff /map $base_arg $efile$target "; | ||
| 325 | $ret.="$name @<<\n \$(SHLIB_EX_OBJ) $objs \$(EX_LIBS) "; | ||
| 326 | $ret.="\$(OBJ_D)${o}fips_premain.obj $ex\n<<\n"; | ||
| 327 | } | ||
| 328 | else | ||
| 329 | { | ||
| 330 | $ret.="$target: $objs"; | ||
| 331 | $ret.="\n\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex \$(EX_LIBS)\n<<\n"; | ||
| 332 | } | ||
| 333 | $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n"; | ||
| 334 | } | ||
| 335 | $ret.="\n"; | ||
| 336 | return($ret); | ||
| 337 | } | ||
| 338 | |||
| 339 | sub do_link_rule | ||
| 340 | { | ||
| 341 | my($target,$files,$dep_libs,$libs,$standalone)=@_; | ||
| 342 | local($ret,$_); | ||
| 343 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 344 | $n=&bname($targer); | ||
| 345 | $ret.="$target: $files $dep_libs\n"; | ||
| 346 | if ($standalone == 1) | ||
| 347 | { | ||
| 348 | $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n\t"; | ||
| 349 | $ret.= "\$(EX_LIBS) " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild); | ||
| 350 | $ret.="$files $libs\n<<\n"; | ||
| 351 | } | ||
| 352 | elsif ($standalone == 2) | ||
| 353 | { | ||
| 354 | $ret.="\tSET FIPS_LINK=\$(LINK)\n"; | ||
| 355 | $ret.="\tSET FIPS_CC=\$(CC)\n"; | ||
| 356 | $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n"; | ||
| 357 | $ret.="\tSET PREMAIN_DSO_EXE=\n"; | ||
| 358 | $ret.="\tSET FIPS_TARGET=$target\n"; | ||
| 359 | $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n"; | ||
| 360 | $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n"; | ||
| 361 | $ret.="\t\$(FIPSLINK) \$(LFLAGS) $ff /map $efile$target @<<\n"; | ||
| 362 | $ret.="\t\$(APP_EX_OBJ) $files \$(OBJ_D)${o}fips_premain.obj $libs\n<<\n"; | ||
| 363 | } | ||
| 364 | else | ||
| 365 | { | ||
| 366 | $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n"; | ||
| 367 | $ret.="\t\$(APP_EX_OBJ) $files $libs\n<<\n"; | ||
| 368 | } | ||
| 369 | $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n"; | ||
| 370 | return($ret); | ||
| 371 | } | ||
| 372 | |||
| 373 | sub win32_import_asm | ||
| 374 | { | ||
| 375 | my ($mf_var, $asm_name, $oref, $sref) = @_; | ||
| 376 | my $asm_dir; | ||
| 377 | if ($asm_name eq "") | ||
| 378 | { | ||
| 379 | $asm_dir = "crypto\\"; | ||
| 380 | } | ||
| 381 | else | ||
| 382 | { | ||
| 383 | $asm_dir = "crypto\\$asm_name\\asm\\"; | ||
| 384 | } | ||
| 385 | |||
| 386 | $$oref = ""; | ||
| 387 | $mf_var =~ s/\.o$/.obj/g; | ||
| 388 | |||
| 389 | foreach (split(/ /, $mf_var)) | ||
| 390 | { | ||
| 391 | $$oref .= $asm_dir . $_ . " "; | ||
| 392 | } | ||
| 393 | $$oref =~ s/ $//; | ||
| 394 | $$sref = $$oref; | ||
| 395 | $$sref =~ s/\.obj/.asm/g; | ||
| 396 | |||
| 397 | } | ||
| 398 | |||
| 399 | |||
| 400 | 1; | ||
diff --git a/src/lib/libcrypto/util/pl/linux.pl b/src/lib/libcrypto/util/pl/linux.pl deleted file mode 100644 index d24f7b7291..0000000000 --- a/src/lib/libcrypto/util/pl/linux.pl +++ /dev/null | |||
| @@ -1,104 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # linux.pl - the standard unix makefile stuff. | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='/bin/cp'; | ||
| 8 | $rm='/bin/rm -f'; | ||
| 9 | |||
| 10 | # C compiler stuff | ||
| 11 | |||
| 12 | $cc='gcc'; | ||
| 13 | if ($debug) | ||
| 14 | { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; } | ||
| 15 | elsif ($profile) | ||
| 16 | { $cflags="-pg -O3"; } | ||
| 17 | else | ||
| 18 | { $cflags="-O3 -fomit-frame-pointer"; } | ||
| 19 | |||
| 20 | if (!$no_asm) | ||
| 21 | { | ||
| 22 | $bn_asm_obj='$(OBJ_D)/bn86-elf.o'; | ||
| 23 | $bn_asm_src='crypto/bn/asm/bn86unix.cpp'; | ||
| 24 | $bnco_asm_obj='$(OBJ_D)/co86-elf.o'; | ||
| 25 | $bnco_asm_src='crypto/bn/asm/co86unix.cpp'; | ||
| 26 | $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; | ||
| 27 | $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; | ||
| 28 | $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; | ||
| 29 | $bf_enc_src='crypto/bf/asm/bx86unix.cpp'; | ||
| 30 | $cast_enc_obj='$(OBJ_D)/cx86-elf.o'; | ||
| 31 | $cast_enc_src='crypto/cast/asm/cx86unix.cpp'; | ||
| 32 | $rc4_enc_obj='$(OBJ_D)/rx86-elf.o'; | ||
| 33 | $rc4_enc_src='crypto/rc4/asm/rx86unix.cpp'; | ||
| 34 | $rc5_enc_obj='$(OBJ_D)/r586-elf.o'; | ||
| 35 | $rc5_enc_src='crypto/rc5/asm/r586unix.cpp'; | ||
| 36 | $md5_asm_obj='$(OBJ_D)/mx86-elf.o'; | ||
| 37 | $md5_asm_src='crypto/md5/asm/mx86unix.cpp'; | ||
| 38 | $rmd160_asm_obj='$(OBJ_D)/rm86-elf.o'; | ||
| 39 | $rmd160_asm_src='crypto/ripemd/asm/rm86unix.cpp'; | ||
| 40 | $sha1_asm_obj='$(OBJ_D)/sx86-elf.o'; | ||
| 41 | $sha1_asm_src='crypto/sha/asm/sx86unix.cpp'; | ||
| 42 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; | ||
| 43 | } | ||
| 44 | |||
| 45 | $cflags.=" -DTERMIO -DL_ENDIAN -m486 -Wall"; | ||
| 46 | |||
| 47 | if ($shlib) | ||
| 48 | { | ||
| 49 | $shl_cflag=" -DPIC -fpic"; | ||
| 50 | $shlibp=".so.$ssl_version"; | ||
| 51 | $so_shlibp=".so"; | ||
| 52 | } | ||
| 53 | |||
| 54 | sub do_shlib_rule | ||
| 55 | { | ||
| 56 | local($obj,$target,$name,$shlib,$so_name)=@_; | ||
| 57 | local($ret,$_,$Name); | ||
| 58 | |||
| 59 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 60 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 61 | |||
| 62 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 63 | $ret.="\t\$(RM) target\n"; | ||
| 64 | $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o $target \$(${Name}OBJ)\n"; | ||
| 65 | ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/; | ||
| 66 | if ($so_name ne "") | ||
| 67 | { | ||
| 68 | $ret.="\t\$(RM) \$(LIB_D)$o$so_name\n"; | ||
| 69 | $ret.="\tln -s $target \$(LIB_D)$o$so_name\n\n"; | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 73 | sub do_link_rule | ||
| 74 | { | ||
| 75 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 76 | local($ret,$_); | ||
| 77 | |||
| 78 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 79 | $n=&bname($target); | ||
| 80 | $ret.="$target: $files $dep_libs\n"; | ||
| 81 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 82 | return($ret); | ||
| 83 | } | ||
| 84 | |||
| 85 | sub do_asm_rule | ||
| 86 | { | ||
| 87 | local($target,$src)=@_; | ||
| 88 | local($ret,@s,@t,$i); | ||
| 89 | |||
| 90 | $target =~ s/\//$o/g if $o ne "/"; | ||
| 91 | $src =~ s/\//$o/g if $o ne "/"; | ||
| 92 | |||
| 93 | @s=split(/\s+/,$src); | ||
| 94 | @t=split(/\s+/,$target); | ||
| 95 | |||
| 96 | for ($i=0; $i<=$#s; $i++) | ||
| 97 | { | ||
| 98 | $ret.="$t[$i]: $s[$i]\n"; | ||
| 99 | $ret.="\tgcc -E -DELF \$(SRC_D)$o$s[$i]|\$(AS) $afile$t[$i]\n\n"; | ||
| 100 | } | ||
| 101 | return($ret); | ||
| 102 | } | ||
| 103 | |||
| 104 | 1; | ||
diff --git a/src/lib/libcrypto/util/pl/netware.pl b/src/lib/libcrypto/util/pl/netware.pl deleted file mode 100644 index c78bcfc874..0000000000 --- a/src/lib/libcrypto/util/pl/netware.pl +++ /dev/null | |||
| @@ -1,532 +0,0 @@ | |||
| 1 | # Metrowerks Codewarrior or gcc / nlmconv for NetWare | ||
| 2 | # | ||
| 3 | |||
| 4 | $version_header = "crypto/opensslv.h"; | ||
| 5 | open(IN, "$version_header") or die "Couldn't open $version_header: $!"; | ||
| 6 | while (<IN>) { | ||
| 7 | if (/^#define[\s\t]+OPENSSL_VERSION_NUMBER[\s\t]+0x(\d)(\d{2})(\d{2})(\d{2})/) | ||
| 8 | { | ||
| 9 | # die "OpenSSL version detected: $1.$2.$3.$4\n"; | ||
| 10 | #$nlmvernum = "$1,$2,$3"; | ||
| 11 | $nlmvernum = "$1,".($2*10+$3).",".($4*1); | ||
| 12 | #$nlmverstr = "$1.".($2*1).".".($3*1).($4?(chr(96+$4)):""); | ||
| 13 | break; | ||
| 14 | } | ||
| 15 | } | ||
| 16 | close(IN) or die "Couldn't close $version_header: $!"; | ||
| 17 | |||
| 18 | $readme_file = "README"; | ||
| 19 | open(IN, $readme_file) or die "Couldn't open $readme_file: $!"; | ||
| 20 | while (<IN>) { | ||
| 21 | if (/^[\s\t]+OpenSSL[\s\t]+(\d)\.(\d{1,2})\.(\d{1,2})([a-z])(.*)/) | ||
| 22 | { | ||
| 23 | #$nlmvernum = "$1,$2,$3"; | ||
| 24 | #$nlmvernum = "$1,".($2*10+$3).",".($4*1); | ||
| 25 | $nlmverstr = "$1.$2.$3$4$5"; | ||
| 26 | } | ||
| 27 | elsif (/^[\s\t]+(Copyright \(c\) \d{4}\-\d{4} The OpenSSL Project)$/) | ||
| 28 | { | ||
| 29 | $nlmcpystr = $1; | ||
| 30 | } | ||
| 31 | break if ($nlmvernum && $nlmcpystr); | ||
| 32 | } | ||
| 33 | close(IN) or die "Couldn't close $readme_file: $!"; | ||
| 34 | |||
| 35 | # Define stacksize here | ||
| 36 | $nlmstack = "32768"; | ||
| 37 | |||
| 38 | # some default settings here in case we failed to find them in README | ||
| 39 | $nlmvernum = "1,0,0" if (!$nlmvernum); | ||
| 40 | $nlmverstr = "OpenSSL" if (!$nlmverstr); | ||
| 41 | $nlmcpystr = "Copyright (c) 1998-now The OpenSSL Project" if (!$nlmcpystr); | ||
| 42 | |||
| 43 | # die "OpenSSL copyright: $nlmcpystr\nOpenSSL verstring: $nlmverstr\nOpenSSL vernumber: $nlmvernum\n"; | ||
| 44 | |||
| 45 | # The import files and other misc imports needed to link | ||
| 46 | @misc_imports = ("GetProcessSwitchCount", "RunningProcess", | ||
| 47 | "GetSuperHighResolutionTimer"); | ||
| 48 | if ($LIBC) | ||
| 49 | { | ||
| 50 | @import_files = ("libc.imp"); | ||
| 51 | @module_files = ("libc"); | ||
| 52 | $libarch = "LIBC"; | ||
| 53 | } | ||
| 54 | else | ||
| 55 | { | ||
| 56 | # clib build | ||
| 57 | @import_files = ("clib.imp"); | ||
| 58 | push(@import_files, "socklib.imp") if ($BSDSOCK); | ||
| 59 | @module_files = ("clib"); | ||
| 60 | # push(@misc_imports, "_rt_modu64%16", "_rt_divu64%16"); | ||
| 61 | $libarch = "CLIB"; | ||
| 62 | } | ||
| 63 | if ($BSDSOCK) | ||
| 64 | { | ||
| 65 | $libarch .= "-BSD"; | ||
| 66 | } | ||
| 67 | else | ||
| 68 | { | ||
| 69 | $libarch .= "-WS2"; | ||
| 70 | push(@import_files, "ws2nlm.imp"); | ||
| 71 | } | ||
| 72 | |||
| 73 | # The "IMPORTS" environment variable must be set and point to the location | ||
| 74 | # where import files (*.imp) can be found. | ||
| 75 | # Example: set IMPORTS=c:\ndk\nwsdk\imports | ||
| 76 | $import_path = $ENV{"IMPORTS"} || die ("IMPORTS environment variable not set\n"); | ||
| 77 | |||
| 78 | |||
| 79 | # The "PRELUDE" environment variable must be set and point to the location | ||
| 80 | # and name of the prelude source to link with ( nwpre.obj is recommended ). | ||
| 81 | # Example: set PRELUDE=c:\codewar\novell support\metrowerks support\libraries\runtime\nwpre.obj | ||
| 82 | $prelude = $ENV{"PRELUDE"} || die ("PRELUDE environment variable not set\n"); | ||
| 83 | |||
| 84 | # The "INCLUDES" environment variable must be set and point to the location | ||
| 85 | # where import files (*.imp) can be found. | ||
| 86 | $include_path = $ENV{"INCLUDE"} || die ("INCLUDES environment variable not set\n"); | ||
| 87 | $include_path =~ s/\\/\//g; | ||
| 88 | $include_path = join(" -I", split(/;/, $include_path)); | ||
| 89 | |||
| 90 | # check for gcc compiler | ||
| 91 | $gnuc = $ENV{"GNUC"}; | ||
| 92 | |||
| 93 | #$ssl= "ssleay32"; | ||
| 94 | #$crypto="libeay32"; | ||
| 95 | |||
| 96 | if ($gnuc) | ||
| 97 | { | ||
| 98 | # C compiler | ||
| 99 | $cc='gcc'; | ||
| 100 | # Linker | ||
| 101 | $link='nlmconv'; | ||
| 102 | # librarian | ||
| 103 | $mklib='ar'; | ||
| 104 | $o='/'; | ||
| 105 | # cp command | ||
| 106 | $cp='cp -af'; | ||
| 107 | # rm command | ||
| 108 | $rm='rm -f'; | ||
| 109 | # mv command | ||
| 110 | $mv='mv -f'; | ||
| 111 | # mkdir command | ||
| 112 | $mkdir='gmkdir'; | ||
| 113 | #$ranlib='ranlib'; | ||
| 114 | } | ||
| 115 | else | ||
| 116 | { | ||
| 117 | # C compiler | ||
| 118 | $cc='mwccnlm'; | ||
| 119 | # Linker | ||
| 120 | $link='mwldnlm'; | ||
| 121 | # librarian | ||
| 122 | $mklib='mwldnlm'; | ||
| 123 | # Path separator | ||
| 124 | $o='\\'; | ||
| 125 | # cp command | ||
| 126 | $cp='copy >nul:'; | ||
| 127 | # rm command | ||
| 128 | $rm='del /f /q'; | ||
| 129 | } | ||
| 130 | |||
| 131 | # assembler | ||
| 132 | if ($nw_nasm) | ||
| 133 | { | ||
| 134 | $asm=(`nasm -v 2>NUL` gt `nasmw -v 2>NUL`?"nasm":"nasmw"); | ||
| 135 | if ($gnuc) | ||
| 136 | { | ||
| 137 | $asm.=" -s -f elf"; | ||
| 138 | } | ||
| 139 | else | ||
| 140 | { | ||
| 141 | $asm.=" -s -f coff -d __coff__"; | ||
| 142 | } | ||
| 143 | $afile="-o "; | ||
| 144 | $asm.=" -g" if $debug; | ||
| 145 | } | ||
| 146 | elsif ($nw_mwasm) | ||
| 147 | { | ||
| 148 | $asm="mwasmnlm -maxerrors 20"; | ||
| 149 | $afile="-o "; | ||
| 150 | $asm.=" -g" if $debug; | ||
| 151 | } | ||
| 152 | elsif ($nw_masm) | ||
| 153 | { | ||
| 154 | # masm assembly settings - it should be possible to use masm but haven't | ||
| 155 | # got it working. | ||
| 156 | # $asm='ml /Cp /coff /c /Cx'; | ||
| 157 | # $asm.=" /Zi" if $debug; | ||
| 158 | # $afile='/Fo'; | ||
| 159 | die("Support for masm assembler not yet functional\n"); | ||
| 160 | } | ||
| 161 | else | ||
| 162 | { | ||
| 163 | $asm=""; | ||
| 164 | $afile=""; | ||
| 165 | } | ||
| 166 | |||
| 167 | |||
| 168 | |||
| 169 | if ($gnuc) | ||
| 170 | { | ||
| 171 | # compile flags for GNUC | ||
| 172 | # additional flags based upon debug | non-debug | ||
| 173 | if ($debug) | ||
| 174 | { | ||
| 175 | $cflags="-g -DDEBUG"; | ||
| 176 | } | ||
| 177 | else | ||
| 178 | { | ||
| 179 | $cflags="-O2"; | ||
| 180 | } | ||
| 181 | $cflags.=" -nostdinc -I$include_path \\ | ||
| 182 | -fno-builtin -fpcc-struct-return -fno-strict-aliasing \\ | ||
| 183 | -funsigned-char -Wall -Wno-unused -Wno-uninitialized"; | ||
| 184 | |||
| 185 | # link flags | ||
| 186 | $lflags="-T"; | ||
| 187 | } | ||
| 188 | else | ||
| 189 | { | ||
| 190 | # compile flags for CodeWarrior | ||
| 191 | # additional flags based upon debug | non-debug | ||
| 192 | if ($debug) | ||
| 193 | { | ||
| 194 | $cflags="-opt off -g -sym internal -DDEBUG"; | ||
| 195 | } | ||
| 196 | else | ||
| 197 | { | ||
| 198 | # CodeWarrior compiler has a problem with optimizations for floating | ||
| 199 | # points - no optimizations until further investigation | ||
| 200 | # $cflags="-opt all"; | ||
| 201 | } | ||
| 202 | |||
| 203 | # NOTES: Several c files in the crypto subdirectory include headers from | ||
| 204 | # their local directories. Metrowerks wouldn't find these h files | ||
| 205 | # without adding individual include directives as compile flags | ||
| 206 | # or modifying the c files. Instead of adding individual include | ||
| 207 | # paths for each subdirectory a recursive include directive | ||
| 208 | # is used ( -ir crypto ). | ||
| 209 | # | ||
| 210 | # A similar issue exists for the engines and apps subdirectories. | ||
| 211 | # | ||
| 212 | # Turned off the "possible" warnings ( -w nopossible ). Metrowerks | ||
| 213 | # complained a lot about various stuff. May want to turn back | ||
| 214 | # on for further development. | ||
| 215 | $cflags.=" -nostdinc -ir crypto -ir engines -ir apps -I$include_path \\ | ||
| 216 | -msgstyle gcc -align 4 -processor pentium -char unsigned \\ | ||
| 217 | -w on -w nolargeargs -w nopossible -w nounusedarg -w nounusedexpr \\ | ||
| 218 | -w noimplicitconv -relax_pointers -nosyspath -maxerrors 20"; | ||
| 219 | |||
| 220 | # link flags | ||
| 221 | $lflags="-msgstyle gcc -zerobss -nostdlib -sym internal -commandfile"; | ||
| 222 | } | ||
| 223 | |||
| 224 | # common defines | ||
| 225 | $cflags.=" -DL_ENDIAN -DOPENSSL_SYSNAME_NETWARE -U_WIN32"; | ||
| 226 | |||
| 227 | # If LibC build add in NKS_LIBC define and set the entry/exit | ||
| 228 | # routines - The default entry/exit routines are for CLib and don't exist | ||
| 229 | # in LibC | ||
| 230 | if ($LIBC) | ||
| 231 | { | ||
| 232 | $cflags.=" -DNETWARE_LIBC"; | ||
| 233 | $nlmstart = "_LibCPrelude"; | ||
| 234 | $nlmexit = "_LibCPostlude"; | ||
| 235 | @nlm_flags = ("pseudopreemption", "flag_on 64"); | ||
| 236 | } | ||
| 237 | else | ||
| 238 | { | ||
| 239 | $cflags.=" -DNETWARE_CLIB"; | ||
| 240 | $nlmstart = "_Prelude"; | ||
| 241 | $nlmexit = "_Stop"; | ||
| 242 | } | ||
| 243 | |||
| 244 | # If BSD Socket support is requested, set a define for the compiler | ||
| 245 | if ($BSDSOCK) | ||
| 246 | { | ||
| 247 | $cflags.=" -DNETWARE_BSDSOCK"; | ||
| 248 | if (!$LIBC) | ||
| 249 | { | ||
| 250 | $cflags.=" -DNETDB_USE_INTERNET"; | ||
| 251 | } | ||
| 252 | } | ||
| 253 | |||
| 254 | |||
| 255 | # linking stuff | ||
| 256 | # for the output directories use the mk1mf.pl values with "_nw" appended | ||
| 257 | if ($shlib) | ||
| 258 | { | ||
| 259 | if ($LIBC) | ||
| 260 | { | ||
| 261 | $out_def.="_nw_libc_nlm"; | ||
| 262 | $tmp_def.="_nw_libc_nlm"; | ||
| 263 | $inc_def.="_nw_libc_nlm"; | ||
| 264 | } | ||
| 265 | else # NETWARE_CLIB | ||
| 266 | { | ||
| 267 | $out_def.="_nw_clib_nlm"; | ||
| 268 | $tmp_def.="_nw_clib_nlm"; | ||
| 269 | $inc_def.="_nw_clib_nlm"; | ||
| 270 | } | ||
| 271 | } | ||
| 272 | else | ||
| 273 | { | ||
| 274 | if ($gnuc) # GNUC Tools | ||
| 275 | { | ||
| 276 | $libp=".a"; | ||
| 277 | $shlibp=".a"; | ||
| 278 | $lib_flags="-cr"; | ||
| 279 | } | ||
| 280 | else # CodeWarrior | ||
| 281 | { | ||
| 282 | $libp=".lib"; | ||
| 283 | $shlibp=".lib"; | ||
| 284 | $lib_flags="-nodefaults -type library -o"; | ||
| 285 | } | ||
| 286 | if ($LIBC) | ||
| 287 | { | ||
| 288 | $out_def.="_nw_libc"; | ||
| 289 | $tmp_def.="_nw_libc"; | ||
| 290 | $inc_def.="_nw_libc"; | ||
| 291 | } | ||
| 292 | else # NETWARE_CLIB | ||
| 293 | { | ||
| 294 | $out_def.="_nw_clib"; | ||
| 295 | $tmp_def.="_nw_clib"; | ||
| 296 | $inc_def.="_nw_clib"; | ||
| 297 | } | ||
| 298 | } | ||
| 299 | |||
| 300 | # used by mk1mf.pl | ||
| 301 | $obj='.o'; | ||
| 302 | $ofile='-o '; | ||
| 303 | $efile=''; | ||
| 304 | $exep='.nlm'; | ||
| 305 | $ex_libs=''; | ||
| 306 | |||
| 307 | if (!$no_asm) | ||
| 308 | { | ||
| 309 | $bn_asm_obj="\$(OBJ_D)${o}bn-nw${obj}"; | ||
| 310 | $bn_asm_src="crypto${o}bn${o}asm${o}bn-nw.asm"; | ||
| 311 | $bnco_asm_obj="\$(OBJ_D)${o}co-nw${obj}"; | ||
| 312 | $bnco_asm_src="crypto${o}bn${o}asm${o}co-nw.asm"; | ||
| 313 | $aes_asm_obj="\$(OBJ_D)${o}a-nw${obj}"; | ||
| 314 | $aes_asm_src="crypto${o}aes${o}asm${o}a-nw.asm"; | ||
| 315 | $des_enc_obj="\$(OBJ_D)${o}d-nw${obj} \$(OBJ_D)${o}y-nw${obj}"; | ||
| 316 | $des_enc_src="crypto${o}des${o}asm${o}d-nw.asm crypto${o}des${o}asm${o}y-nw.asm"; | ||
| 317 | $bf_enc_obj="\$(OBJ_D)${o}b-nw${obj}"; | ||
| 318 | $bf_enc_src="crypto${o}bf${o}asm${o}b-nw.asm"; | ||
| 319 | $cast_enc_obj="\$(OBJ_D)${o}c-nw${obj}"; | ||
| 320 | $cast_enc_src="crypto${o}cast${o}asm${o}c-nw.asm"; | ||
| 321 | $rc4_enc_obj="\$(OBJ_D)${o}r4-nw${obj}"; | ||
| 322 | $rc4_enc_src="crypto${o}rc4${o}asm${o}r4-nw.asm"; | ||
| 323 | $rc5_enc_obj="\$(OBJ_D)${o}r5-nw${obj}"; | ||
| 324 | $rc5_enc_src="crypto${o}rc5${o}asm${o}r5-nw.asm"; | ||
| 325 | $md5_asm_obj="\$(OBJ_D)${o}m5-nw${obj}"; | ||
| 326 | $md5_asm_src="crypto${o}md5${o}asm${o}m5-nw.asm"; | ||
| 327 | $sha1_asm_obj="\$(OBJ_D)${o}s1-nw${obj} \$(OBJ_D)${o}sha256-nw${obj} \$(OBJ_D)${o}sha512-nw${obj}"; | ||
| 328 | $sha1_asm_src="crypto${o}sha${o}asm${o}s1-nw.asm crypto${o}sha${o}asm${o}sha256-nw.asm crypto${o}sha${o}asm${o}sha512-nw.asm"; | ||
| 329 | $rmd160_asm_obj="\$(OBJ_D)${o}rm-nw${obj}"; | ||
| 330 | $rmd160_asm_src="crypto${o}ripemd${o}asm${o}rm-nw.asm"; | ||
| 331 | $whirlpool_asm_obj="\$(OBJ_D)${o}wp-nw${obj}"; | ||
| 332 | $whirlpool_asm_src="crypto${o}whrlpool${o}asm${o}wp-nw.asm"; | ||
| 333 | $cpuid_asm_obj="\$(OBJ_D)${o}x86cpuid-nw${obj}"; | ||
| 334 | $cpuid_asm_src="crypto${o}x86cpuid-nw.asm"; | ||
| 335 | $cflags.=" -DOPENSSL_CPUID_OBJ -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DMD5_ASM -DWHIRLPOOL_ASM"; | ||
| 336 | $cflags.=" -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM"; | ||
| 337 | $cflags.=" -DAES_ASM -DRMD160_ASM"; | ||
| 338 | } | ||
| 339 | else | ||
| 340 | { | ||
| 341 | $bn_asm_obj=''; | ||
| 342 | $bn_asm_src=''; | ||
| 343 | $bnco_asm_obj=''; | ||
| 344 | $bnco_asm_src=''; | ||
| 345 | $aes_asm_obj=''; | ||
| 346 | $aes_asm_src=''; | ||
| 347 | $des_enc_obj=''; | ||
| 348 | $des_enc_src=''; | ||
| 349 | $bf_enc_obj=''; | ||
| 350 | $bf_enc_src=''; | ||
| 351 | $cast_enc_obj=''; | ||
| 352 | $cast_enc_src=''; | ||
| 353 | $rc4_enc_obj=''; | ||
| 354 | $rc4_enc_src=''; | ||
| 355 | $rc5_enc_obj=''; | ||
| 356 | $rc5_enc_src=''; | ||
| 357 | $md5_asm_obj=''; | ||
| 358 | $md5_asm_src=''; | ||
| 359 | $sha1_asm_obj=''; | ||
| 360 | $sha1_asm_src=''; | ||
| 361 | $rmd160_asm_obj=''; | ||
| 362 | $rmd160_asm_src=''; | ||
| 363 | $whirlpool_asm_obj=''; | ||
| 364 | $whirlpool_asm_src=''; | ||
| 365 | $cpuid_asm_obj=''; | ||
| 366 | $cpuid_asm_src=''; | ||
| 367 | } | ||
| 368 | |||
| 369 | # create the *.def linker command files in \openssl\netware\ directory | ||
| 370 | sub do_def_file | ||
| 371 | { | ||
| 372 | # strip off the leading path | ||
| 373 | my($target) = bname(shift); | ||
| 374 | my($i); | ||
| 375 | |||
| 376 | if ($target =~ /(.*).nlm/) | ||
| 377 | { | ||
| 378 | $target = $1; | ||
| 379 | } | ||
| 380 | |||
| 381 | # special case for openssl - the mk1mf.pl defines E_EXE = openssl | ||
| 382 | if ($target =~ /E_EXE/) | ||
| 383 | { | ||
| 384 | $target =~ s/\$\(E_EXE\)/openssl/; | ||
| 385 | } | ||
| 386 | |||
| 387 | # Note: originally tried to use full path ( \openssl\netware\$target.def ) | ||
| 388 | # Metrowerks linker choked on this with an assertion failure. bug??? | ||
| 389 | # | ||
| 390 | my($def_file) = "netware${o}$target.def"; | ||
| 391 | |||
| 392 | open(DEF_OUT, ">$def_file") || die("unable to open file $def_file\n"); | ||
| 393 | |||
| 394 | print( DEF_OUT "# command file generated by netware.pl for NLM target.\n" ); | ||
| 395 | print( DEF_OUT "# do not edit this file - all your changes will be lost!!\n" ); | ||
| 396 | print( DEF_OUT "#\n"); | ||
| 397 | print( DEF_OUT "DESCRIPTION \"$target ($libarch) - OpenSSL $nlmverstr\"\n"); | ||
| 398 | print( DEF_OUT "COPYRIGHT \"$nlmcpystr\"\n"); | ||
| 399 | print( DEF_OUT "VERSION $nlmvernum\n"); | ||
| 400 | print( DEF_OUT "STACK $nlmstack\n"); | ||
| 401 | print( DEF_OUT "START $nlmstart\n"); | ||
| 402 | print( DEF_OUT "EXIT $nlmexit\n"); | ||
| 403 | |||
| 404 | # special case for openssl | ||
| 405 | if ($target eq "openssl") | ||
| 406 | { | ||
| 407 | print( DEF_OUT "SCREENNAME \"OpenSSL $nlmverstr\"\n"); | ||
| 408 | } | ||
| 409 | else | ||
| 410 | { | ||
| 411 | print( DEF_OUT "SCREENNAME \"DEFAULT\"\n"); | ||
| 412 | } | ||
| 413 | |||
| 414 | foreach $i (@misc_imports) | ||
| 415 | { | ||
| 416 | print( DEF_OUT "IMPORT $i\n"); | ||
| 417 | } | ||
| 418 | |||
| 419 | foreach $i (@import_files) | ||
| 420 | { | ||
| 421 | print( DEF_OUT "IMPORT \@$import_path${o}$i\n"); | ||
| 422 | } | ||
| 423 | |||
| 424 | foreach $i (@module_files) | ||
| 425 | { | ||
| 426 | print( DEF_OUT "MODULE $i\n"); | ||
| 427 | } | ||
| 428 | |||
| 429 | foreach $i (@nlm_flags) | ||
| 430 | { | ||
| 431 | print( DEF_OUT "$i\n"); | ||
| 432 | } | ||
| 433 | |||
| 434 | if ($gnuc) | ||
| 435 | { | ||
| 436 | if ($target =~ /openssl/) | ||
| 437 | { | ||
| 438 | print( DEF_OUT "INPUT ${tmp_def}${o}openssl${obj}\n"); | ||
| 439 | print( DEF_OUT "INPUT ${tmp_def}${o}openssl${libp}\n"); | ||
| 440 | } | ||
| 441 | else | ||
| 442 | { | ||
| 443 | print( DEF_OUT "INPUT ${tmp_def}${o}${target}${obj}\n"); | ||
| 444 | } | ||
| 445 | print( DEF_OUT "INPUT $prelude\n"); | ||
| 446 | print( DEF_OUT "INPUT ${out_def}${o}${ssl}${libp} ${out_def}${o}${crypto}${libp}\n"); | ||
| 447 | print( DEF_OUT "OUTPUT $target.nlm\n"); | ||
| 448 | } | ||
| 449 | |||
| 450 | close(DEF_OUT); | ||
| 451 | return($def_file); | ||
| 452 | } | ||
| 453 | |||
| 454 | sub do_lib_rule | ||
| 455 | { | ||
| 456 | my($objs,$target,$name,$shlib)=@_; | ||
| 457 | my($ret); | ||
| 458 | |||
| 459 | $ret.="$target: $objs\n"; | ||
| 460 | if (!$shlib) | ||
| 461 | { | ||
| 462 | $ret.="\t\@echo Building Lib: $name\n"; | ||
| 463 | $ret.="\t\$(MKLIB) $lib_flags $target $objs\n"; | ||
| 464 | $ret.="\t\@echo .\n" | ||
| 465 | } | ||
| 466 | else | ||
| 467 | { | ||
| 468 | die( "Building as NLM not currently supported!" ); | ||
| 469 | } | ||
| 470 | |||
| 471 | $ret.="\n"; | ||
| 472 | return($ret); | ||
| 473 | } | ||
| 474 | |||
| 475 | sub do_link_rule | ||
| 476 | { | ||
| 477 | my($target,$files,$dep_libs,$libs)=@_; | ||
| 478 | my($ret); | ||
| 479 | my($def_file) = do_def_file($target); | ||
| 480 | |||
| 481 | $ret.="$target: $files $dep_libs\n"; | ||
| 482 | |||
| 483 | # NOTE: When building the test nlms no screen name is given | ||
| 484 | # which causes the console screen to be used. By using the console | ||
| 485 | # screen there is no "<press any key to continue>" message which | ||
| 486 | # requires user interaction. The test script ( do_tests.pl ) needs | ||
| 487 | # to be able to run the tests without requiring user interaction. | ||
| 488 | # | ||
| 489 | # However, the sample program "openssl.nlm" is used by the tests and is | ||
| 490 | # a interactive sample so a screen is desired when not be run by the | ||
| 491 | # tests. To solve the problem, two versions of the program are built: | ||
| 492 | # openssl2 - no screen used by tests | ||
| 493 | # openssl - default screen - use for normal interactive modes | ||
| 494 | # | ||
| 495 | |||
| 496 | # special case for openssl - the mk1mf.pl defines E_EXE = openssl | ||
| 497 | if ($target =~ /E_EXE/) | ||
| 498 | { | ||
| 499 | my($target2) = $target; | ||
| 500 | |||
| 501 | $target2 =~ s/\(E_EXE\)/\(E_EXE\)2/; | ||
| 502 | |||
| 503 | # openssl2 | ||
| 504 | my($def_file2) = do_def_file($target2); | ||
| 505 | |||
| 506 | if ($gnuc) | ||
| 507 | { | ||
| 508 | $ret.="\t\$(MKLIB) $lib_flags \$(TMP_D)${o}\$(E_EXE).a \$(filter-out \$(TMP_D)${o}\$(E_EXE)${obj},$files)\n"; | ||
| 509 | $ret.="\t\$(LINK) \$(LFLAGS) $def_file2\n"; | ||
| 510 | $ret.="\t\@$mv \$(E_EXE)2.nlm \$(TEST_D)\n"; | ||
| 511 | } | ||
| 512 | else | ||
| 513 | { | ||
| 514 | $ret.="\t\$(LINK) \$(LFLAGS) $def_file2 $files \"$prelude\" $libs -o $target2\n"; | ||
| 515 | } | ||
| 516 | } | ||
| 517 | if ($gnuc) | ||
| 518 | { | ||
| 519 | $ret.="\t\$(LINK) \$(LFLAGS) $def_file\n"; | ||
| 520 | $ret.="\t\@$mv \$(\@F) \$(TEST_D)\n"; | ||
| 521 | } | ||
| 522 | else | ||
| 523 | { | ||
| 524 | $ret.="\t\$(LINK) \$(LFLAGS) $def_file $files \"$prelude\" $libs -o $target\n"; | ||
| 525 | } | ||
| 526 | |||
| 527 | $ret.="\n"; | ||
| 528 | return($ret); | ||
| 529 | |||
| 530 | } | ||
| 531 | |||
| 532 | 1; | ||
diff --git a/src/lib/libcrypto/util/pl/ultrix.pl b/src/lib/libcrypto/util/pl/ultrix.pl deleted file mode 100644 index ea370c71f9..0000000000 --- a/src/lib/libcrypto/util/pl/ultrix.pl +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # linux.pl - the standard unix makefile stuff. | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='/bin/cp'; | ||
| 8 | $rm='/bin/rm -f'; | ||
| 9 | |||
| 10 | # C compiler stuff | ||
| 11 | |||
| 12 | $cc='cc'; | ||
| 13 | if ($debug) | ||
| 14 | { $cflags="-g -DREF_CHECK -DCRYPTO_MDEBUG"; } | ||
| 15 | else | ||
| 16 | { $cflags="-O2"; } | ||
| 17 | |||
| 18 | $cflags.=" -std1 -DL_ENDIAN"; | ||
| 19 | |||
| 20 | if (!$no_asm) | ||
| 21 | { | ||
| 22 | $bn_asm_obj='$(OBJ_D)/mips1.o'; | ||
| 23 | $bn_asm_src='crypto/bn/asm/mips1.s'; | ||
| 24 | } | ||
| 25 | |||
| 26 | sub do_link_rule | ||
| 27 | { | ||
| 28 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 29 | local($ret,$_); | ||
| 30 | |||
| 31 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 32 | $n=&bname($target); | ||
| 33 | $ret.="$target: $files $dep_libs\n"; | ||
| 34 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 35 | return($ret); | ||
| 36 | } | ||
| 37 | |||
| 38 | 1; | ||
diff --git a/src/lib/libcrypto/util/pl/unix.pl b/src/lib/libcrypto/util/pl/unix.pl deleted file mode 100644 index 146611ad99..0000000000 --- a/src/lib/libcrypto/util/pl/unix.pl +++ /dev/null | |||
| @@ -1,96 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # unix.pl - the standard unix makefile stuff. | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='/bin/cp'; | ||
| 8 | $rm='/bin/rm -f'; | ||
| 9 | |||
| 10 | # C compiler stuff | ||
| 11 | |||
| 12 | if ($gcc) | ||
| 13 | { | ||
| 14 | $cc='gcc'; | ||
| 15 | if ($debug) | ||
| 16 | { $cflags="-g2 -ggdb"; } | ||
| 17 | else | ||
| 18 | { $cflags="-O3 -fomit-frame-pointer"; } | ||
| 19 | } | ||
| 20 | else | ||
| 21 | { | ||
| 22 | $cc='cc'; | ||
| 23 | if ($debug) | ||
| 24 | { $cflags="-g"; } | ||
| 25 | else | ||
| 26 | { $cflags="-O"; } | ||
| 27 | } | ||
| 28 | $obj='.o'; | ||
| 29 | $ofile='-o '; | ||
| 30 | |||
| 31 | # EXE linking stuff | ||
| 32 | $link='${CC}'; | ||
| 33 | $lflags='${CFLAGS}'; | ||
| 34 | $efile='-o '; | ||
| 35 | $exep=''; | ||
| 36 | $ex_libs=""; | ||
| 37 | |||
| 38 | # static library stuff | ||
| 39 | $mklib='ar r'; | ||
| 40 | $mlflags=''; | ||
| 41 | $ranlib=&which("ranlib") or $ranlib="true"; | ||
| 42 | $plib='lib'; | ||
| 43 | $libp=".a"; | ||
| 44 | $shlibp=".a"; | ||
| 45 | $lfile=''; | ||
| 46 | |||
| 47 | $asm='as'; | ||
| 48 | $afile='-o '; | ||
| 49 | $bn_asm_obj=""; | ||
| 50 | $bn_asm_src=""; | ||
| 51 | $des_enc_obj=""; | ||
| 52 | $des_enc_src=""; | ||
| 53 | $bf_enc_obj=""; | ||
| 54 | $bf_enc_src=""; | ||
| 55 | |||
| 56 | sub do_lib_rule | ||
| 57 | { | ||
| 58 | local($obj,$target,$name,$shlib)=@_; | ||
| 59 | local($ret,$_,$Name); | ||
| 60 | |||
| 61 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 62 | $target="$target"; | ||
| 63 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 64 | |||
| 65 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 66 | $ret.="\t\$(RM) $target\n"; | ||
| 67 | $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; | ||
| 68 | $ret.="\t\$(RANLIB) $target\n\n"; | ||
| 69 | } | ||
| 70 | |||
| 71 | sub do_link_rule | ||
| 72 | { | ||
| 73 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 74 | local($ret,$_); | ||
| 75 | |||
| 76 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 77 | $n=&bname($target); | ||
| 78 | $ret.="$target: $files $dep_libs\n"; | ||
| 79 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 80 | return($ret); | ||
| 81 | } | ||
| 82 | |||
| 83 | sub which | ||
| 84 | { | ||
| 85 | my ($name)=@_; | ||
| 86 | my $path; | ||
| 87 | foreach $path (split /:/, $ENV{PATH}) | ||
| 88 | { | ||
| 89 | if (-x "$path/$name") | ||
| 90 | { | ||
| 91 | return "$path/$name"; | ||
| 92 | } | ||
| 93 | } | ||
| 94 | } | ||
| 95 | |||
| 96 | 1; | ||
diff --git a/src/lib/libssl/src/util/bat.sh b/src/lib/libssl/src/util/bat.sh deleted file mode 100644 index 4d9a8287d0..0000000000 --- a/src/lib/libssl/src/util/bat.sh +++ /dev/null | |||
| @@ -1,134 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | $infile="/home/eay/ssl/SSLeay/MINFO"; | ||
| 4 | |||
| 5 | open(IN,"<$infile") || die "unable to open $infile:$!\n"; | ||
| 6 | $_=<IN>; | ||
| 7 | for (;;) | ||
| 8 | { | ||
| 9 | chop; | ||
| 10 | |||
| 11 | ($key,$val)=/^([^=]+)=(.*)/; | ||
| 12 | if ($key eq "RELATIVE_DIRECTORY") | ||
| 13 | { | ||
| 14 | if ($lib ne "") | ||
| 15 | { | ||
| 16 | $uc=$lib; | ||
| 17 | $uc =~ s/^lib(.*)\.a/$1/; | ||
| 18 | $uc =~ tr/a-z/A-Z/; | ||
| 19 | $lib_nam{$uc}=$uc; | ||
| 20 | $lib_obj{$uc}.=$libobj." "; | ||
| 21 | } | ||
| 22 | last if ($val eq "FINISHED"); | ||
| 23 | $lib=""; | ||
| 24 | $libobj=""; | ||
| 25 | $dir=$val; | ||
| 26 | } | ||
| 27 | |||
| 28 | if ($key eq "TEST") | ||
| 29 | { $test.=&var_add($dir,$val); } | ||
| 30 | |||
| 31 | if (($key eq "PROGS") || ($key eq "E_OBJ")) | ||
| 32 | { $e_exe.=&var_add($dir,$val); } | ||
| 33 | |||
| 34 | if ($key eq "LIB") | ||
| 35 | { | ||
| 36 | $lib=$val; | ||
| 37 | $lib =~ s/^.*\/([^\/]+)$/$1/; | ||
| 38 | } | ||
| 39 | |||
| 40 | if ($key eq "EXHEADER") | ||
| 41 | { $exheader.=&var_add($dir,$val); } | ||
| 42 | |||
| 43 | if ($key eq "HEADER") | ||
| 44 | { $header.=&var_add($dir,$val); } | ||
| 45 | |||
| 46 | if ($key eq "LIBSRC") | ||
| 47 | { $libsrc.=&var_add($dir,$val); } | ||
| 48 | |||
| 49 | if (!($_=<IN>)) | ||
| 50 | { $_="RELATIVE_DIRECTORY=FINISHED\n"; } | ||
| 51 | } | ||
| 52 | close(IN); | ||
| 53 | |||
| 54 | @a=split(/\s+/,$libsrc); | ||
| 55 | foreach (@a) | ||
| 56 | { | ||
| 57 | print "${_}.c\n"; | ||
| 58 | } | ||
| 59 | |||
| 60 | sub var_add | ||
| 61 | { | ||
| 62 | local($dir,$val)=@_; | ||
| 63 | local(@a,$_,$ret); | ||
| 64 | |||
| 65 | return("") if $no_engine && $dir =~ /\/engine/; | ||
| 66 | return("") if $no_idea && $dir =~ /\/idea/; | ||
| 67 | return("") if $no_rc2 && $dir =~ /\/rc2/; | ||
| 68 | return("") if $no_rc4 && $dir =~ /\/rc4/; | ||
| 69 | return("") if $no_rsa && $dir =~ /\/rsa/; | ||
| 70 | return("") if $no_rsa && $dir =~ /^rsaref/; | ||
| 71 | return("") if $no_dsa && $dir =~ /\/dsa/; | ||
| 72 | return("") if $no_dh && $dir =~ /\/dh/; | ||
| 73 | if ($no_des && $dir =~ /\/des/) | ||
| 74 | { | ||
| 75 | if ($val =~ /read_pwd/) | ||
| 76 | { return("$dir/read_pwd "); } | ||
| 77 | else | ||
| 78 | { return(""); } | ||
| 79 | } | ||
| 80 | return("") if $no_mdc2 && $dir =~ /\/mdc2/; | ||
| 81 | return("") if $no_sock && $dir =~ /\/proxy/; | ||
| 82 | return("") if $no_bf && $dir =~ /\/bf/; | ||
| 83 | return("") if $no_cast && $dir =~ /\/cast/; | ||
| 84 | |||
| 85 | $val =~ s/^\s*(.*)\s*$/$1/; | ||
| 86 | @a=split(/\s+/,$val); | ||
| 87 | grep(s/\.[och]$//,@a); | ||
| 88 | |||
| 89 | @a=grep(!/^e_.*_3d$/,@a) if $no_des; | ||
| 90 | @a=grep(!/^e_.*_d$/,@a) if $no_des; | ||
| 91 | @a=grep(!/^e_.*_i$/,@a) if $no_idea; | ||
| 92 | @a=grep(!/^e_.*_r2$/,@a) if $no_rc2; | ||
| 93 | @a=grep(!/^e_.*_bf$/,@a) if $no_bf; | ||
| 94 | @a=grep(!/^e_.*_c$/,@a) if $no_cast; | ||
| 95 | @a=grep(!/^e_rc4$/,@a) if $no_rc4; | ||
| 96 | |||
| 97 | @a=grep(!/(^s2_)|(^s23_)/,@a) if $no_ssl2; | ||
| 98 | @a=grep(!/(^s3_)|(^s23_)/,@a) if $no_ssl3; | ||
| 99 | |||
| 100 | @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock; | ||
| 101 | |||
| 102 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; | ||
| 103 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; | ||
| 104 | |||
| 105 | @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa; | ||
| 106 | @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa; | ||
| 107 | @a=grep(!/(^pem_seal$)/,@a) if $no_rsa; | ||
| 108 | |||
| 109 | @a=grep(!/(m_dss$)|(m_dss1$)/,@a) if $no_dsa; | ||
| 110 | @a=grep(!/(^d2i_s_)|(^i2d_s_)|(_dsap$)/,@a) if $no_dsa; | ||
| 111 | |||
| 112 | @a=grep(!/^n_pkey$/,@a) if $no_rsa || $no_rc4; | ||
| 113 | |||
| 114 | @a=grep(!/_dhp$/,@a) if $no_dh; | ||
| 115 | |||
| 116 | @a=grep(!/(^sha[^1])|(_sha$)|(m_dss$)/,@a) if $no_sha; | ||
| 117 | @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; | ||
| 118 | @a=grep(!/_mdc2$/,@a) if $no_mdc2; | ||
| 119 | |||
| 120 | @a=grep(!/^engine$/,@a) if $no_engine; | ||
| 121 | @a=grep(!/(^rsa$)|(^genrsa$)|(^req$)|(^ca$)/,@a) if $no_rsa; | ||
| 122 | @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa; | ||
| 123 | @a=grep(!/^gendsa$/,@a) if $no_sha1; | ||
| 124 | @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh; | ||
| 125 | |||
| 126 | @a=grep(!/(^dh)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; | ||
| 127 | |||
| 128 | grep($_="$dir/$_",@a); | ||
| 129 | @a=grep(!/(^|\/)s_/,@a) if $no_sock; | ||
| 130 | @a=grep(!/(^|\/)bio_sock/,@a) if $no_sock; | ||
| 131 | $ret=join(' ',@a)." "; | ||
| 132 | return($ret); | ||
| 133 | } | ||
| 134 | |||
diff --git a/src/lib/libssl/src/util/cygwin.sh b/src/lib/libssl/src/util/cygwin.sh deleted file mode 100644 index cfdb04d2a4..0000000000 --- a/src/lib/libssl/src/util/cygwin.sh +++ /dev/null | |||
| @@ -1,154 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # | ||
| 3 | # This script configures, builds and packs the binary package for | ||
| 4 | # the Cygwin net distribution version of OpenSSL | ||
| 5 | # | ||
| 6 | |||
| 7 | # Uncomment when debugging | ||
| 8 | #set -x | ||
| 9 | |||
| 10 | CONFIG_OPTIONS="--prefix=/usr shared zlib no-idea no-rc5" | ||
| 11 | INSTALL_PREFIX=/tmp/install/INSTALL | ||
| 12 | |||
| 13 | VERSION= | ||
| 14 | SHLIB_VERSION_NUMBER= | ||
| 15 | SUBVERSION=$1 | ||
| 16 | |||
| 17 | function cleanup() | ||
| 18 | { | ||
| 19 | rm -rf ${INSTALL_PREFIX}/etc | ||
| 20 | rm -rf ${INSTALL_PREFIX}/usr | ||
| 21 | } | ||
| 22 | |||
| 23 | function get_openssl_version() | ||
| 24 | { | ||
| 25 | eval `grep '^VERSION=' Makefile` | ||
| 26 | if [ -z "${VERSION}" ] | ||
| 27 | then | ||
| 28 | echo "Error: Couldn't retrieve OpenSSL version from Makefile." | ||
| 29 | echo " Check value of variable VERSION in Makefile." | ||
| 30 | exit 1 | ||
| 31 | fi | ||
| 32 | eval `grep '^SHLIB_VERSION_NUMBER=' Makefile` | ||
| 33 | if [ -z "${SHLIB_VERSION_NUMBER}" ] | ||
| 34 | then | ||
| 35 | echo "Error: Couldn't retrieve OpenSSL shared lib version from Makefile." | ||
| 36 | echo " Check value of variable SHLIB_VERSION_NUMBER in Makefile." | ||
| 37 | exit 1 | ||
| 38 | fi | ||
| 39 | } | ||
| 40 | |||
| 41 | function base_install() | ||
| 42 | { | ||
| 43 | mkdir -p ${INSTALL_PREFIX} | ||
| 44 | cleanup | ||
| 45 | make install INSTALL_PREFIX="${INSTALL_PREFIX}" | ||
| 46 | } | ||
| 47 | |||
| 48 | function doc_install() | ||
| 49 | { | ||
| 50 | DOC_DIR=${INSTALL_PREFIX}/usr/share/doc/openssl | ||
| 51 | |||
| 52 | mkdir -p ${DOC_DIR} | ||
| 53 | cp CHANGES CHANGES.SSLeay INSTALL LICENSE NEWS README ${DOC_DIR} | ||
| 54 | |||
| 55 | create_cygwin_readme | ||
| 56 | } | ||
| 57 | |||
| 58 | function certs_install() | ||
| 59 | { | ||
| 60 | CERTS_DIR=${INSTALL_PREFIX}/usr/ssl/certs | ||
| 61 | |||
| 62 | mkdir -p ${CERTS_DIR} | ||
| 63 | cp -rp certs/* ${CERTS_DIR} | ||
| 64 | } | ||
| 65 | |||
| 66 | function create_cygwin_readme() | ||
| 67 | { | ||
| 68 | README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin | ||
| 69 | README_FILE=${README_DIR}/openssl-${VERSION}.README | ||
| 70 | |||
| 71 | mkdir -p ${README_DIR} | ||
| 72 | cat > ${README_FILE} <<- EOF | ||
| 73 | The Cygwin version has been built using the following configure: | ||
| 74 | |||
| 75 | ./config ${CONFIG_OPTIONS} | ||
| 76 | |||
| 77 | The IDEA and RC5 algorithms are disabled due to patent and/or | ||
| 78 | licensing issues. | ||
| 79 | EOF | ||
| 80 | } | ||
| 81 | |||
| 82 | function create_profile_files() | ||
| 83 | { | ||
| 84 | PROFILE_DIR=${INSTALL_PREFIX}/etc/profile.d | ||
| 85 | |||
| 86 | mkdir -p $PROFILE_DIR | ||
| 87 | cat > ${PROFILE_DIR}/openssl.sh <<- "EOF" | ||
| 88 | export MANPATH="${MANPATH}:/usr/ssl/man" | ||
| 89 | EOF | ||
| 90 | cat > ${PROFILE_DIR}/openssl.csh <<- "EOF" | ||
| 91 | if ( $?MANPATH ) then | ||
| 92 | setenv MANPATH "${MANPATH}:/usr/ssl/man" | ||
| 93 | else | ||
| 94 | setenv MANPATH ":/usr/ssl/man" | ||
| 95 | endif | ||
| 96 | EOF | ||
| 97 | } | ||
| 98 | |||
| 99 | if [ -z "${SUBVERSION}" ] | ||
| 100 | then | ||
| 101 | echo "Usage: $0 subversion" | ||
| 102 | exit 1 | ||
| 103 | fi | ||
| 104 | |||
| 105 | if [ ! -f config ] | ||
| 106 | then | ||
| 107 | echo "You must start this script in the OpenSSL toplevel source dir." | ||
| 108 | exit 1 | ||
| 109 | fi | ||
| 110 | |||
| 111 | ./config ${CONFIG_OPTIONS} | ||
| 112 | |||
| 113 | get_openssl_version | ||
| 114 | |||
| 115 | make depend || exit 1 | ||
| 116 | |||
| 117 | make || exit 1 | ||
| 118 | |||
| 119 | base_install | ||
| 120 | |||
| 121 | doc_install | ||
| 122 | |||
| 123 | certs_install | ||
| 124 | |||
| 125 | create_cygwin_readme | ||
| 126 | |||
| 127 | create_profile_files | ||
| 128 | |||
| 129 | cd ${INSTALL_PREFIX} | ||
| 130 | chmod u+w usr/lib/engines/*.so | ||
| 131 | strip usr/bin/*.exe usr/bin/*.dll usr/lib/engines/*.so | ||
| 132 | chmod u-w usr/lib/engines/*.so | ||
| 133 | |||
| 134 | # Runtime package | ||
| 135 | tar cjf libopenssl${SHLIB_VERSION_NUMBER//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 \ | ||
| 136 | usr/bin/cyg*dll | ||
| 137 | # Base package | ||
| 138 | find etc usr/bin/openssl.exe usr/bin/c_rehash usr/lib/engines usr/share/doc \ | ||
| 139 | usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf \ | ||
| 140 | usr/ssl/private \ | ||
| 141 | -empty -o \! -type d | | ||
| 142 | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - | ||
| 143 | # Development package | ||
| 144 | find usr/include usr/lib/*.a usr/lib/pkgconfig usr/ssl/man/man3 \ | ||
| 145 | -empty -o \! -type d | | ||
| 146 | tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 - | ||
| 147 | |||
| 148 | ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2 | ||
| 149 | ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 | ||
| 150 | ls -l libopenssl${SHLIB_VERSION_NUMBER//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 | ||
| 151 | |||
| 152 | cleanup | ||
| 153 | |||
| 154 | exit 0 | ||
diff --git a/src/lib/libssl/src/util/do_ms.sh b/src/lib/libssl/src/util/do_ms.sh deleted file mode 100644 index 515b074cff..0000000000 --- a/src/lib/libssl/src/util/do_ms.sh +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # generate the Microsoft makefiles and .def files | ||
| 4 | # | ||
| 5 | |||
| 6 | PATH=util:../util:$PATH | ||
| 7 | |||
| 8 | # perl util/mk1mf.pl no-sock VC-MSDOS >ms/msdos.mak | ||
| 9 | # perl util/mk1mf.pl VC-W31-32 >ms/w31.mak | ||
| 10 | perl util/mk1mf.pl dll VC-WIN16 >ms/w31dll.mak | ||
| 11 | # perl util/mk1mf.pl VC-WIN32 >ms/nt.mak | ||
| 12 | perl util/mk1mf.pl dll VC-WIN32 >ms/ntdll.mak | ||
| 13 | perl util/mk1mf.pl Mingw32 >ms/mingw32.mak | ||
| 14 | perl util/mk1mf.pl Mingw32-files >ms/mingw32f.mak | ||
| 15 | |||
| 16 | perl util/mkdef.pl 16 libeay > ms/libeay16.def | ||
| 17 | perl util/mkdef.pl 32 libeay > ms/libeay32.def | ||
| 18 | perl util/mkdef.pl 16 ssleay > ms/ssleay16.def | ||
| 19 | perl util/mkdef.pl 32 ssleay > ms/ssleay32.def | ||
diff --git a/src/lib/libssl/src/util/fixNT.sh b/src/lib/libssl/src/util/fixNT.sh deleted file mode 100644 index ab9e766b86..0000000000 --- a/src/lib/libssl/src/util/fixNT.sh +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # clean up the mess that NT makes of my source tree | ||
| 4 | # | ||
| 5 | |||
| 6 | if [ -f makefile -a ! -f Makefile ]; then | ||
| 7 | /bin/mv makefile Makefile | ||
| 8 | fi | ||
| 9 | chmod +x Configure util/* | ||
| 10 | echo cleaning | ||
| 11 | /bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null | ||
| 12 | echo 'removing those damn ^M' | ||
| 13 | perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'` | ||
| 14 | make -f Makefile links | ||
diff --git a/src/lib/libssl/src/util/pl/BC-32.pl b/src/lib/libssl/src/util/pl/BC-32.pl deleted file mode 100644 index b41bb45e82..0000000000 --- a/src/lib/libssl/src/util/pl/BC-32.pl +++ /dev/null | |||
| @@ -1,139 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si> | ||
| 3 | # | ||
| 4 | |||
| 5 | $ssl= "ssleay32"; | ||
| 6 | $crypto="libeay32"; | ||
| 7 | |||
| 8 | $o='\\'; | ||
| 9 | $cp='copy'; | ||
| 10 | $rm='del'; | ||
| 11 | |||
| 12 | # C compiler stuff | ||
| 13 | $cc='bcc32'; | ||
| 14 | $lflags="-ap -Tpe -x -Gn "; | ||
| 15 | $mlflags=''; | ||
| 16 | |||
| 17 | $out_def="out32"; | ||
| 18 | $tmp_def="tmp32"; | ||
| 19 | $inc_def="inc32"; | ||
| 20 | #enable max error messages, disable most common warnings | ||
| 21 | $cflags="-DWIN32_LEAN_AND_MEAN -q -w-ccc -w-rch -w-pia -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp -D_strnicmp=strnicmp -D_timeb=timeb -D_ftime=ftime "; | ||
| 22 | if ($debug) | ||
| 23 | { | ||
| 24 | $cflags.="-Od -y -v -vi- -D_DEBUG"; | ||
| 25 | $mlflags.=' '; | ||
| 26 | } | ||
| 27 | else | ||
| 28 | { | ||
| 29 | $cflags.="-O2 -ff -fp"; | ||
| 30 | } | ||
| 31 | |||
| 32 | $obj='.obj'; | ||
| 33 | $ofile="-o"; | ||
| 34 | |||
| 35 | # EXE linking stuff | ||
| 36 | $link="ilink32"; | ||
| 37 | $efile=""; | ||
| 38 | $exep='.exe'; | ||
| 39 | if ($no_sock) | ||
| 40 | { $ex_libs=""; } | ||
| 41 | else { $ex_libs="cw32mt.lib import32.lib crypt32.lib ws2_32.lib"; } | ||
| 42 | |||
| 43 | # static library stuff | ||
| 44 | $mklib='tlib /P64'; | ||
| 45 | $ranlib=''; | ||
| 46 | $plib=""; | ||
| 47 | $libp=".lib"; | ||
| 48 | $shlibp=($shlib)?".dll":".lib"; | ||
| 49 | $lfile=''; | ||
| 50 | |||
| 51 | $shlib_ex_obj=""; | ||
| 52 | $app_ex_obj="c0x32.obj"; | ||
| 53 | |||
| 54 | $asm=(`nasm -v 2>NUL` ge `nasmw -v 2>NUL`?"nasm":"nasmw")." -f obj -d__omf__"; | ||
| 55 | $asm.=" -g" if $debug; | ||
| 56 | $afile='-o'; | ||
| 57 | |||
| 58 | $bn_mulw_obj=''; | ||
| 59 | $bn_mulw_src=''; | ||
| 60 | $des_enc_obj=''; | ||
| 61 | $des_enc_src=''; | ||
| 62 | $bf_enc_obj=''; | ||
| 63 | $bf_enc_src=''; | ||
| 64 | |||
| 65 | if (!$no_asm) | ||
| 66 | { | ||
| 67 | $bn_mulw_obj='crypto\bn\asm\bn_win32.obj'; | ||
| 68 | $bn_mulw_src='crypto\bn\asm\bn_win32.asm'; | ||
| 69 | $des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj'; | ||
| 70 | $des_enc_src='crypto\des\asm\d_win32.asm crypto\des\asm\y_win32.asm'; | ||
| 71 | $bf_enc_obj='crypto\bf\asm\b_win32.obj'; | ||
| 72 | $bf_enc_src='crypto\bf\asm\b_win32.asm'; | ||
| 73 | $cast_enc_obj='crypto\cast\asm\c_win32.obj'; | ||
| 74 | $cast_enc_src='crypto\cast\asm\c_win32.asm'; | ||
| 75 | $rc4_enc_obj='crypto\rc4\asm\r4_win32.obj'; | ||
| 76 | $rc4_enc_src='crypto\rc4\asm\r4_win32.asm'; | ||
| 77 | $rc5_enc_obj='crypto\rc5\asm\r5_win32.obj'; | ||
| 78 | $rc5_enc_src='crypto\rc5\asm\r5_win32.asm'; | ||
| 79 | $md5_asm_obj='crypto\md5\asm\m5_win32.obj'; | ||
| 80 | $md5_asm_src='crypto\md5\asm\m5_win32.asm'; | ||
| 81 | $sha1_asm_obj='crypto\sha\asm\s1_win32.obj'; | ||
| 82 | $sha1_asm_src='crypto\sha\asm\s1_win32.asm'; | ||
| 83 | $rmd160_asm_obj='crypto\ripemd\asm\rm_win32.obj'; | ||
| 84 | $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm'; | ||
| 85 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; | ||
| 86 | } | ||
| 87 | |||
| 88 | if ($shlib) | ||
| 89 | { | ||
| 90 | $mlflags.=" $lflags /dll"; | ||
| 91 | # $cflags =~ s| /MD| /MT|; | ||
| 92 | $lib_cflag=" /GD -D_WINDLL -D_DLL"; | ||
| 93 | $out_def="out32dll"; | ||
| 94 | $tmp_def="tmp32dll"; | ||
| 95 | } | ||
| 96 | |||
| 97 | sub do_lib_rule | ||
| 98 | { | ||
| 99 | local($objs,$target,$name,$shlib)=@_; | ||
| 100 | local($ret,$Name); | ||
| 101 | |||
| 102 | $taget =~ s/\//$o/g if $o ne '/'; | ||
| 103 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 104 | |||
| 105 | # $target="\$(LIB_D)$o$target"; | ||
| 106 | $ret.="$target: $objs\n"; | ||
| 107 | if (!$shlib) | ||
| 108 | { | ||
| 109 | $ret.=<<___; | ||
| 110 | -\$(RM) $lfile$target | ||
| 111 | \$(MKLIB) $lfile$target \@&&! | ||
| 112 | +\$(**: = &^ | ||
| 113 | +) | ||
| 114 | ! | ||
| 115 | ___ | ||
| 116 | } | ||
| 117 | else | ||
| 118 | { | ||
| 119 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; | ||
| 120 | $ex.=' ws2_32.lib gdi32.lib'; | ||
| 121 | $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; | ||
| 122 | } | ||
| 123 | $ret.="\n"; | ||
| 124 | return($ret); | ||
| 125 | } | ||
| 126 | |||
| 127 | sub do_link_rule | ||
| 128 | { | ||
| 129 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 130 | local($ret,$_); | ||
| 131 | |||
| 132 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 133 | $n=&bname($targer); | ||
| 134 | $ret.="$target: $files $dep_libs\n"; | ||
| 135 | $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; | ||
| 136 | return($ret); | ||
| 137 | } | ||
| 138 | |||
| 139 | 1; | ||
diff --git a/src/lib/libssl/src/util/pl/Mingw32.pl b/src/lib/libssl/src/util/pl/Mingw32.pl deleted file mode 100644 index fe3fb27a78..0000000000 --- a/src/lib/libssl/src/util/pl/Mingw32.pl +++ /dev/null | |||
| @@ -1,104 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # Mingw32.pl -- Mingw | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='cp'; | ||
| 8 | $rm='rm -f'; | ||
| 9 | $mkdir='gmkdir'; | ||
| 10 | |||
| 11 | $o='\\'; | ||
| 12 | $cp='copy'; | ||
| 13 | $rm='del'; | ||
| 14 | $mkdir='mkdir'; | ||
| 15 | |||
| 16 | # C compiler stuff | ||
| 17 | |||
| 18 | $cc='gcc'; | ||
| 19 | if ($debug) | ||
| 20 | { $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; } | ||
| 21 | else | ||
| 22 | { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; } | ||
| 23 | |||
| 24 | if ($gaswin and !$no_asm) | ||
| 25 | { | ||
| 26 | $bn_asm_obj='$(OBJ_D)\bn-win32.o'; | ||
| 27 | $bn_asm_src='crypto/bn/asm/bn-win32.s'; | ||
| 28 | $bnco_asm_obj='$(OBJ_D)\co-win32.o'; | ||
| 29 | $bnco_asm_src='crypto/bn/asm/co-win32.s'; | ||
| 30 | $des_enc_obj='$(OBJ_D)\d-win32.o $(OBJ_D)\y-win32.o'; | ||
| 31 | $des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s'; | ||
| 32 | $bf_enc_obj='$(OBJ_D)\b-win32.o'; | ||
| 33 | $bf_enc_src='crypto/bf/asm/b-win32.s'; | ||
| 34 | # $cast_enc_obj='$(OBJ_D)\c-win32.o'; | ||
| 35 | # $cast_enc_src='crypto/cast/asm/c-win32.s'; | ||
| 36 | $rc4_enc_obj='$(OBJ_D)\r4-win32.o'; | ||
| 37 | $rc4_enc_src='crypto/rc4/asm/r4-win32.s'; | ||
| 38 | $rc5_enc_obj='$(OBJ_D)\r5-win32.o'; | ||
| 39 | $rc5_enc_src='crypto/rc5/asm/r5-win32.s'; | ||
| 40 | $md5_asm_obj='$(OBJ_D)\m5-win32.o'; | ||
| 41 | $md5_asm_src='crypto/md5/asm/m5-win32.s'; | ||
| 42 | $rmd160_asm_obj='$(OBJ_D)\rm-win32.o'; | ||
| 43 | $rmd160_asm_src='crypto/ripemd/asm/rm-win32.s'; | ||
| 44 | $sha1_asm_obj='$(OBJ_D)\s1-win32.o'; | ||
| 45 | $sha1_asm_src='crypto/sha/asm/s1-win32.s'; | ||
| 46 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; | ||
| 47 | } | ||
| 48 | |||
| 49 | |||
| 50 | $obj='.o'; | ||
| 51 | $ofile='-o '; | ||
| 52 | |||
| 53 | # EXE linking stuff | ||
| 54 | $link='${CC}'; | ||
| 55 | $lflags='${CFLAGS}'; | ||
| 56 | $efile='-o '; | ||
| 57 | $exep=''; | ||
| 58 | $ex_libs="-lws2_32 -lgdi32"; | ||
| 59 | |||
| 60 | # static library stuff | ||
| 61 | $mklib='ar r'; | ||
| 62 | $mlflags=''; | ||
| 63 | $ranlib='ranlib'; | ||
| 64 | $plib='lib'; | ||
| 65 | $libp=".a"; | ||
| 66 | $shlibp=".a"; | ||
| 67 | $lfile=''; | ||
| 68 | |||
| 69 | $asm='as'; | ||
| 70 | $afile='-o '; | ||
| 71 | #$bn_asm_obj=""; | ||
| 72 | #$bn_asm_src=""; | ||
| 73 | #$des_enc_obj=""; | ||
| 74 | #$des_enc_src=""; | ||
| 75 | #$bf_enc_obj=""; | ||
| 76 | #$bf_enc_src=""; | ||
| 77 | |||
| 78 | sub do_lib_rule | ||
| 79 | { | ||
| 80 | local($obj,$target,$name,$shlib)=@_; | ||
| 81 | local($ret,$_,$Name); | ||
| 82 | |||
| 83 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 84 | $target="$target"; | ||
| 85 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 86 | |||
| 87 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 88 | $ret.="\tif exist $target \$(RM) $target\n"; | ||
| 89 | $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; | ||
| 90 | $ret.="\t\$(RANLIB) $target\n\n"; | ||
| 91 | } | ||
| 92 | |||
| 93 | sub do_link_rule | ||
| 94 | { | ||
| 95 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 96 | local($ret,$_); | ||
| 97 | |||
| 98 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 99 | $n=&bname($target); | ||
| 100 | $ret.="$target: $files $dep_libs\n"; | ||
| 101 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 102 | return($ret); | ||
| 103 | } | ||
| 104 | 1; | ||
diff --git a/src/lib/libssl/src/util/pl/OS2-EMX.pl b/src/lib/libssl/src/util/pl/OS2-EMX.pl deleted file mode 100644 index 28cd116907..0000000000 --- a/src/lib/libssl/src/util/pl/OS2-EMX.pl +++ /dev/null | |||
| @@ -1,120 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # OS2-EMX.pl - for EMX GCC on OS/2 | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='cp'; | ||
| 8 | $rm='rm -f'; | ||
| 9 | |||
| 10 | $preamble = "SHELL=sh\n"; | ||
| 11 | |||
| 12 | # C compiler stuff | ||
| 13 | |||
| 14 | $cc='gcc'; | ||
| 15 | $cflags="-DL_ENDIAN -O3 -fomit-frame-pointer -m486 -Zmtd -Wall "; | ||
| 16 | $cflags.="-Zomf " if $shlib; | ||
| 17 | $shl_cflag="-Zdll"; | ||
| 18 | |||
| 19 | if ($debug) { | ||
| 20 | $cflags.="-g "; | ||
| 21 | } | ||
| 22 | |||
| 23 | $obj=$shlib ? '.obj' : '.o'; | ||
| 24 | $ofile='-o '; | ||
| 25 | |||
| 26 | # EXE linking stuff | ||
| 27 | $link='${CC}'; | ||
| 28 | $lflags='${CFLAGS} -Zbsd-signals -s'; | ||
| 29 | $efile='-o '; | ||
| 30 | $exep='.exe'; | ||
| 31 | $ex_libs="-lsocket"; | ||
| 32 | |||
| 33 | # static library stuff | ||
| 34 | $mklib='ar r'; | ||
| 35 | $mlflags=''; | ||
| 36 | $ranlib="ar s"; | ||
| 37 | $plib=''; | ||
| 38 | $libp=$shlib ? ".lib" : ".a"; | ||
| 39 | $shlibp=$shlib ? ".dll" : ".a"; | ||
| 40 | $lfile=''; | ||
| 41 | |||
| 42 | $asm=$shlib ? 'as -Zomf' : 'as'; | ||
| 43 | $afile='-o '; | ||
| 44 | $bn_asm_obj=""; | ||
| 45 | $bn_asm_src=""; | ||
| 46 | $des_enc_obj=""; | ||
| 47 | $des_enc_src=""; | ||
| 48 | $bf_enc_obj=""; | ||
| 49 | $bf_enc_src=""; | ||
| 50 | |||
| 51 | if (!$no_asm) | ||
| 52 | { | ||
| 53 | $bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj"; | ||
| 54 | $bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm"; | ||
| 55 | $des_enc_obj="crypto/des/asm/d-os2$obj crypto/des/asm/y-os2$obj"; | ||
| 56 | $des_enc_src="crypto/des/asm/d-os2.asm crypto/des/asm/y-os2.asm"; | ||
| 57 | $bf_enc_obj="crypto/bf/asm/b-os2$obj"; | ||
| 58 | $bf_enc_src="crypto/bf/asm/b-os2.asm"; | ||
| 59 | $cast_enc_obj="crypto/cast/asm/c-os2$obj"; | ||
| 60 | $cast_enc_src="crypto/cast/asm/c-os2.asm"; | ||
| 61 | $rc4_enc_obj="crypto/rc4/asm/r4-os2$obj"; | ||
| 62 | $rc4_enc_src="crypto/rc4/asm/r4-os2.asm"; | ||
| 63 | $rc5_enc_obj="crypto/rc5/asm/r5-os2$obj"; | ||
| 64 | $rc5_enc_src="crypto/rc5/asm/r5-os2.asm"; | ||
| 65 | $md5_asm_obj="crypto/md5/asm/m5-os2$obj"; | ||
| 66 | $md5_asm_src="crypto/md5/asm/m5-os2.asm"; | ||
| 67 | $sha1_asm_obj="crypto/sha/asm/s1-os2$obj"; | ||
| 68 | $sha1_asm_src="crypto/sha/asm/s1-os2.asm"; | ||
| 69 | $rmd160_asm_obj="crypto/ripemd/asm/rm-os2$obj"; | ||
| 70 | $rmd160_asm_src="crypto/ripemd/asm/rm-os2.asm"; | ||
| 71 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; | ||
| 72 | } | ||
| 73 | |||
| 74 | if ($shlib) | ||
| 75 | { | ||
| 76 | $mlflags.=" $lflags -Zdll"; | ||
| 77 | $lib_cflag=" -D_DLL"; | ||
| 78 | $out_def="out_dll"; | ||
| 79 | $tmp_def="tmp_dll"; | ||
| 80 | } | ||
| 81 | |||
| 82 | sub do_lib_rule | ||
| 83 | { | ||
| 84 | local($obj,$target,$name,$shlib)=@_; | ||
| 85 | local($ret,$_,$Name); | ||
| 86 | |||
| 87 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 88 | $target="$target"; | ||
| 89 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 90 | |||
| 91 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 92 | if (!$shlib) | ||
| 93 | { | ||
| 94 | $ret.="\t\$(RM) $target\n"; | ||
| 95 | $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; | ||
| 96 | $ret.="\t\$(RANLIB) $target\n\n"; | ||
| 97 | } | ||
| 98 | else | ||
| 99 | { | ||
| 100 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; | ||
| 101 | $ex.=' -lsocket'; | ||
| 102 | $ret.="\t\$(LINK) \$(SHLIB_CFLAGS) \$(MLFLAGS) $efile$target \$(SHLIB_EX_OBJ) \$(${Name}OBJ) $ex os2/${Name}.def\n"; | ||
| 103 | $ret.="\temximp -o $out_def/$name.a os2/${Name}.def\n"; | ||
| 104 | $ret.="\temximp -o $out_def/$name.lib os2/${Name}.def\n\n"; | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 108 | sub do_link_rule | ||
| 109 | { | ||
| 110 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 111 | local($ret,$_); | ||
| 112 | |||
| 113 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 114 | $n=&bname($target); | ||
| 115 | $ret.="$target: $files $dep_libs\n"; | ||
| 116 | $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n\n"; | ||
| 117 | return($ret); | ||
| 118 | } | ||
| 119 | |||
| 120 | 1; | ||
diff --git a/src/lib/libssl/src/util/pl/VC-32.pl b/src/lib/libssl/src/util/pl/VC-32.pl deleted file mode 100644 index 3705fc73b7..0000000000 --- a/src/lib/libssl/src/util/pl/VC-32.pl +++ /dev/null | |||
| @@ -1,400 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # VC-32.pl - unified script for Microsoft Visual C++, covering Win32, | ||
| 3 | # Win64 and WinCE [follow $FLAVOR variable to trace the differences]. | ||
| 4 | # | ||
| 5 | |||
| 6 | $ssl= "ssleay32"; | ||
| 7 | $crypto="libeay32"; | ||
| 8 | |||
| 9 | if ($fips && !$shlib) | ||
| 10 | { | ||
| 11 | $crypto="libeayfips32"; | ||
| 12 | $crypto_compat = "libeaycompat32.lib"; | ||
| 13 | } | ||
| 14 | else | ||
| 15 | { | ||
| 16 | $crypto="libeay32"; | ||
| 17 | } | ||
| 18 | |||
| 19 | $o='\\'; | ||
| 20 | $cp='$(PERL) util/copy.pl'; | ||
| 21 | $mkdir='$(PERL) util/mkdir-p.pl'; | ||
| 22 | $rm='del /Q'; | ||
| 23 | |||
| 24 | $zlib_lib="zlib1.lib"; | ||
| 25 | |||
| 26 | # Santize -L options for ms link | ||
| 27 | $l_flags =~ s/-L("\[^"]+")/\/libpath:$1/g; | ||
| 28 | $l_flags =~ s/-L(\S+)/\/libpath:$1/g; | ||
| 29 | |||
| 30 | my $ff = ""; | ||
| 31 | |||
| 32 | # C compiler stuff | ||
| 33 | $cc='cl'; | ||
| 34 | if ($FLAVOR =~ /WIN64/) | ||
| 35 | { | ||
| 36 | # Note that we currently don't have /WX on Win64! There is a lot of | ||
| 37 | # warnings, but only of two types: | ||
| 38 | # | ||
| 39 | # C4344: conversion from '__int64' to 'int/long', possible loss of data | ||
| 40 | # C4267: conversion from 'size_t' to 'int/long', possible loss of data | ||
| 41 | # | ||
| 42 | # Amount of latter type is minimized by aliasing strlen to function of | ||
| 43 | # own desing and limiting its return value to 2GB-1 (see e_os.h). As | ||
| 44 | # per 0.9.8 release remaining warnings were explicitly examined and | ||
| 45 | # considered safe to ignore. | ||
| 46 | # | ||
| 47 | $base_cflags= " $mf_cflag"; | ||
| 48 | my $f = $shlib || $fips ?' /MD':' /MT'; | ||
| 49 | $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib | ||
| 50 | $opt_cflags=$f.' /Ox'; | ||
| 51 | $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; | ||
| 52 | $lflags="/nologo /subsystem:console /opt:ref"; | ||
| 53 | |||
| 54 | *::perlasm_compile_target = sub { | ||
| 55 | my ($target,$source,$bname)=@_; | ||
| 56 | my $ret; | ||
| 57 | |||
| 58 | $bname =~ s/(.*)\.[^\.]$/$1/; | ||
| 59 | $ret=<<___; | ||
| 60 | \$(TMP_D)$o$bname.asm: $source | ||
| 61 | set ASM=\$(ASM) | ||
| 62 | \$(PERL) $source \$\@ | ||
| 63 | |||
| 64 | $target: \$(TMP_D)$o$bname.asm | ||
| 65 | \$(ASM) $afile\$\@ \$(TMP_D)$o$bname.asm | ||
| 66 | |||
| 67 | ___ | ||
| 68 | } | ||
| 69 | } | ||
| 70 | elsif ($FLAVOR =~ /CE/) | ||
| 71 | { | ||
| 72 | # sanity check | ||
| 73 | die '%OSVERSION% is not defined' if (!defined($ENV{'OSVERSION'})); | ||
| 74 | die '%PLATFORM% is not defined' if (!defined($ENV{'PLATFORM'})); | ||
| 75 | die '%TARGETCPU% is not defined' if (!defined($ENV{'TARGETCPU'})); | ||
| 76 | |||
| 77 | # | ||
| 78 | # Idea behind this is to mimic flags set by eVC++ IDE... | ||
| 79 | # | ||
| 80 | $wcevers = $ENV{'OSVERSION'}; # WCENNN | ||
| 81 | die '%OSVERSION% value is insane' if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/); | ||
| 82 | $wcecdefs = "-D_WIN32_WCE=$1$2 -DUNDER_CE=$1$2"; # -D_WIN32_WCE=NNN | ||
| 83 | $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN | ||
| 84 | |||
| 85 | $wceplatf = $ENV{'PLATFORM'}; | ||
| 86 | $wceplatf =~ tr/a-z0-9 /A-Z0-9_/d; | ||
| 87 | $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; | ||
| 88 | |||
| 89 | $wcetgt = $ENV{'TARGETCPU'}; # just shorter name... | ||
| 90 | SWITCH: for($wcetgt) { | ||
| 91 | /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_"; | ||
| 92 | $wcelflag.=" /machine:IX86"; last; }; | ||
| 93 | /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | ||
| 94 | $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/); | ||
| 95 | $wcecdefs.=" -QRarch4T -QRinterwork-return"; | ||
| 96 | $wcelflag.=" /machine:THUMB"; last; }; | ||
| 97 | /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; | ||
| 98 | $wcelflag.=" /machine:ARM"; last; }; | ||
| 99 | /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | ||
| 100 | $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32"; | ||
| 101 | $wcelflag.=" /machine:MIPSFPU"; last; }; | ||
| 102 | /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | ||
| 103 | $wcecdefs.=" -DMIPSII -QMmips16"; | ||
| 104 | $wcelflag.=" /machine:MIPS16"; last; }; | ||
| 105 | /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; | ||
| 106 | $wcecdefs.=" -QMmips2"; | ||
| 107 | $wcelflag.=" /machine:MIPS"; last; }; | ||
| 108 | /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000"; | ||
| 109 | $wcelflag.=" /machine:MIPS"; last; }; | ||
| 110 | /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_$wcetgt_ -DSHx"; | ||
| 111 | $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/); | ||
| 112 | $wcelflag.=" /machine:$wcetgt"; last; }; | ||
| 113 | { $wcecdefs.=" -D$wcetgt -D_$wcetgt_"; | ||
| 114 | $wcelflag.=" /machine:$wcetgt"; last; }; | ||
| 115 | } | ||
| 116 | |||
| 117 | $cc='$(CC)'; | ||
| 118 | $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT'; | ||
| 119 | $base_cflags.=" $wcecdefs"; | ||
| 120 | $base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'})); | ||
| 121 | $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'})); | ||
| 122 | $opt_cflags=' /MC /O1i'; # optimize for space, but with intrinsics... | ||
| 123 | $dbg_cflags=' /MC /Od -DDEBUG -D_DEBUG'; | ||
| 124 | $lflags="/nologo /opt:ref $wcelflag"; | ||
| 125 | } | ||
| 126 | else # Win32 | ||
| 127 | { | ||
| 128 | $base_cflags= " $mf_cflag"; | ||
| 129 | my $f = $shlib || $fips ?' /MD':' /MT'; | ||
| 130 | $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib | ||
| 131 | $ff = "/fixed"; | ||
| 132 | $opt_cflags=$f.' /Ox /O2 /Ob2'; | ||
| 133 | $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; | ||
| 134 | $lflags="/nologo /subsystem:console /opt:ref"; | ||
| 135 | } | ||
| 136 | $mlflags=''; | ||
| 137 | |||
| 138 | $out_def ="out32"; $out_def.="dll" if ($shlib); | ||
| 139 | $out_def.='_$(TARGETCPU)' if ($FLAVOR =~ /CE/); | ||
| 140 | $tmp_def ="tmp32"; $tmp_def.="dll" if ($shlib); | ||
| 141 | $tmp_def.='_$(TARGETCPU)' if ($FLAVOR =~ /CE/); | ||
| 142 | $inc_def="inc32"; | ||
| 143 | |||
| 144 | if ($debug) | ||
| 145 | { | ||
| 146 | $cflags=$dbg_cflags.$base_cflags; | ||
| 147 | } | ||
| 148 | else | ||
| 149 | { | ||
| 150 | $cflags=$opt_cflags.$base_cflags; | ||
| 151 | } | ||
| 152 | |||
| 153 | # generate symbols.pdb unconditionally | ||
| 154 | $app_cflag.=" /Zi /Fd\$(TMP_D)/app"; | ||
| 155 | $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; | ||
| 156 | $lflags.=" /debug"; | ||
| 157 | |||
| 158 | $obj='.obj'; | ||
| 159 | $asm_suffix='.asm'; | ||
| 160 | $ofile="/Fo"; | ||
| 161 | |||
| 162 | # EXE linking stuff | ||
| 163 | $link="link"; | ||
| 164 | $rsc="rc"; | ||
| 165 | $efile="/out:"; | ||
| 166 | $exep='.exe'; | ||
| 167 | if ($no_sock) { $ex_libs=''; } | ||
| 168 | elsif ($FLAVOR =~ /CE/) { $ex_libs='winsock.lib'; } | ||
| 169 | else { $ex_libs='ws2_32.lib'; } | ||
| 170 | |||
| 171 | if ($FLAVOR =~ /CE/) | ||
| 172 | { | ||
| 173 | $ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib' if (defined($ENV{'WCECOMPAT'})); | ||
| 174 | $ex_libs.=' $(PORTSDK_LIBPATH)/portlib.lib' if (defined($ENV{'PORTSDK_LIBPATH'})); | ||
| 175 | $ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86"); | ||
| 176 | } | ||
| 177 | else | ||
| 178 | { | ||
| 179 | $ex_libs.=' gdi32.lib advapi32.lib crypt32.lib user32.lib'; | ||
| 180 | $ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/ and `cl 2>&1` =~ /14\.00\.4[0-9]{4}\./); | ||
| 181 | # WIN32 UNICODE build gets linked with unicows.lib for | ||
| 182 | # backward compatibility with Win9x. | ||
| 183 | $ex_libs="unicows.lib $ex_libs" if ($FLAVOR =~ /WIN32/ and $cflags =~ /\-DUNICODE/); | ||
| 184 | } | ||
| 185 | |||
| 186 | # static library stuff | ||
| 187 | $mklib='lib /nologo'; | ||
| 188 | $ranlib=''; | ||
| 189 | $plib=""; | ||
| 190 | $libp=".lib"; | ||
| 191 | $shlibp=($shlib)?".dll":".lib"; | ||
| 192 | $lfile='/out:'; | ||
| 193 | |||
| 194 | $shlib_ex_obj=""; | ||
| 195 | $app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/); | ||
| 196 | if ($FLAVOR =~ /WIN64A/) { | ||
| 197 | if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) { | ||
| 198 | $asm='nasm -f win64 -DNEAR -Ox -g'; | ||
| 199 | $afile='-o '; | ||
| 200 | } else { | ||
| 201 | $asm='ml64 /c /Cp /Cx /Zi'; | ||
| 202 | $afile='/Fo'; | ||
| 203 | } | ||
| 204 | } elsif ($FLAVOR =~ /WIN64I/) { | ||
| 205 | $asm='ias -d debug'; | ||
| 206 | $afile="-o "; | ||
| 207 | } elsif ($nasm) { | ||
| 208 | my $ver=`nasm -v 2>NUL`; | ||
| 209 | my $vew=`nasmw -v 2>NUL`; | ||
| 210 | # pick newest version | ||
| 211 | $asm=($ver ge $vew?"nasm":"nasmw")." -f win32"; | ||
| 212 | $asmtype="win32n"; | ||
| 213 | $afile='-o '; | ||
| 214 | } else { | ||
| 215 | $asm='ml /nologo /Cp /coff /c /Cx /Zi'; | ||
| 216 | $afile='/Fo'; | ||
| 217 | $asmtype="win32"; | ||
| 218 | } | ||
| 219 | |||
| 220 | $bn_asm_obj=''; | ||
| 221 | $bn_asm_src=''; | ||
| 222 | $des_enc_obj=''; | ||
| 223 | $des_enc_src=''; | ||
| 224 | $bf_enc_obj=''; | ||
| 225 | $bf_enc_src=''; | ||
| 226 | |||
| 227 | if (!$no_asm) | ||
| 228 | { | ||
| 229 | win32_import_asm($mf_bn_asm, "bn", \$bn_asm_obj, \$bn_asm_src); | ||
| 230 | win32_import_asm($mf_aes_asm, "aes", \$aes_asm_obj, \$aes_asm_src); | ||
| 231 | win32_import_asm($mf_des_asm, "des", \$des_enc_obj, \$des_enc_src); | ||
| 232 | win32_import_asm($mf_bf_asm, "bf", \$bf_enc_obj, \$bf_enc_src); | ||
| 233 | win32_import_asm($mf_cast_asm, "cast", \$cast_enc_obj, \$cast_enc_src); | ||
| 234 | win32_import_asm($mf_rc4_asm, "rc4", \$rc4_enc_obj, \$rc4_enc_src); | ||
| 235 | win32_import_asm($mf_rc5_asm, "rc5", \$rc5_enc_obj, \$rc5_enc_src); | ||
| 236 | win32_import_asm($mf_md5_asm, "md5", \$md5_asm_obj, \$md5_asm_src); | ||
| 237 | win32_import_asm($mf_sha_asm, "sha", \$sha1_asm_obj, \$sha1_asm_src); | ||
| 238 | win32_import_asm($mf_rmd_asm, "ripemd", \$rmd160_asm_obj, \$rmd160_asm_src); | ||
| 239 | win32_import_asm($mf_wp_asm, "whrlpool", \$whirlpool_asm_obj, \$whirlpool_asm_src); | ||
| 240 | win32_import_asm($mf_cpuid_asm, "", \$cpuid_asm_obj, \$cpuid_asm_src); | ||
| 241 | $perl_asm = 1; | ||
| 242 | } | ||
| 243 | |||
| 244 | if ($shlib && $FLAVOR !~ /CE/) | ||
| 245 | { | ||
| 246 | $mlflags.=" $lflags /dll"; | ||
| 247 | $lib_cflag.=" -D_WINDLL"; | ||
| 248 | # | ||
| 249 | # Engage Applink... | ||
| 250 | # | ||
| 251 | $app_ex_obj.=" \$(OBJ_D)\\applink.obj /implib:\$(TMP_D)\\junk.lib"; | ||
| 252 | $cflags.=" -DOPENSSL_USE_APPLINK -I."; | ||
| 253 | # I'm open for better suggestions than overriding $banner... | ||
| 254 | $banner=<<'___'; | ||
| 255 | @echo Building OpenSSL | ||
| 256 | |||
| 257 | $(OBJ_D)\applink.obj: ms\applink.c | ||
| 258 | $(CC) /Fo$(OBJ_D)\applink.obj $(APP_CFLAGS) -c ms\applink.c | ||
| 259 | $(OBJ_D)\uplink.obj: ms\uplink.c ms\applink.c | ||
| 260 | $(CC) /Fo$(OBJ_D)\uplink.obj $(SHLIB_CFLAGS) -c ms\uplink.c | ||
| 261 | $(INCO_D)\applink.c: ms\applink.c | ||
| 262 | $(CP) ms\applink.c $(INCO_D)\applink.c | ||
| 263 | |||
| 264 | EXHEADER= $(EXHEADER) $(INCO_D)\applink.c | ||
| 265 | |||
| 266 | LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj | ||
| 267 | CRYPTOOBJ=$(OBJ_D)\uplink.obj $(CRYPTOOBJ) | ||
| 268 | ___ | ||
| 269 | $banner.=<<'___' if ($FLAVOR =~ /WIN64/); | ||
| 270 | CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ) | ||
| 271 | ___ | ||
| 272 | } | ||
| 273 | elsif ($shlib && $FLAVOR =~ /CE/) | ||
| 274 | { | ||
| 275 | $mlflags.=" $lflags /dll"; | ||
| 276 | $lflags.=' /entry:mainCRTstartup' if(defined($ENV{'PORTSDK_LIBPATH'})); | ||
| 277 | $lib_cflag.=" -D_WINDLL -D_DLL"; | ||
| 278 | } | ||
| 279 | |||
| 280 | sub do_lib_rule | ||
| 281 | { | ||
| 282 | my($objs,$target,$name,$shlib,$ign,$base_addr) = @_; | ||
| 283 | local($ret); | ||
| 284 | |||
| 285 | $taget =~ s/\//$o/g if $o ne '/'; | ||
| 286 | my $base_arg; | ||
| 287 | if ($base_addr ne "") | ||
| 288 | { | ||
| 289 | $base_arg= " /base:$base_addr"; | ||
| 290 | } | ||
| 291 | else | ||
| 292 | { | ||
| 293 | $base_arg = ""; | ||
| 294 | } | ||
| 295 | if ($name ne "") | ||
| 296 | { | ||
| 297 | $name =~ tr/a-z/A-Z/; | ||
| 298 | $name = "/def:ms/${name}.def"; | ||
| 299 | } | ||
| 300 | |||
| 301 | # $target="\$(LIB_D)$o$target"; | ||
| 302 | # $ret.="$target: $objs\n"; | ||
| 303 | if (!$shlib) | ||
| 304 | { | ||
| 305 | # $ret.="\t\$(RM) \$(O_$Name)\n"; | ||
| 306 | $ret.="$target: $objs\n"; | ||
| 307 | $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs\n<<\n"; | ||
| 308 | } | ||
| 309 | else | ||
| 310 | { | ||
| 311 | local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)'; | ||
| 312 | $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/; | ||
| 313 | |||
| 314 | if ($fips && $target =~ /O_CRYPTO/) | ||
| 315 | { | ||
| 316 | $ret.="$target: $objs \$(PREMAIN_DSO_EXE)"; | ||
| 317 | $ret.="\n\tSET FIPS_LINK=\$(LINK)\n"; | ||
| 318 | $ret.="\tSET FIPS_CC=\$(CC)\n"; | ||
| 319 | $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n"; | ||
| 320 | $ret.="\tSET PREMAIN_DSO_EXE=\$(PREMAIN_DSO_EXE)\n"; | ||
| 321 | $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n"; | ||
| 322 | $ret.="\tSET FIPS_TARGET=$target\n"; | ||
| 323 | $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n"; | ||
| 324 | $ret.="\t\$(FIPSLINK) \$(MLFLAGS) $ff /map $base_arg $efile$target "; | ||
| 325 | $ret.="$name @<<\n \$(SHLIB_EX_OBJ) $objs \$(EX_LIBS) "; | ||
| 326 | $ret.="\$(OBJ_D)${o}fips_premain.obj $ex\n<<\n"; | ||
| 327 | } | ||
| 328 | else | ||
| 329 | { | ||
| 330 | $ret.="$target: $objs"; | ||
| 331 | $ret.="\n\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex \$(EX_LIBS)\n<<\n"; | ||
| 332 | } | ||
| 333 | $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n"; | ||
| 334 | } | ||
| 335 | $ret.="\n"; | ||
| 336 | return($ret); | ||
| 337 | } | ||
| 338 | |||
| 339 | sub do_link_rule | ||
| 340 | { | ||
| 341 | my($target,$files,$dep_libs,$libs,$standalone)=@_; | ||
| 342 | local($ret,$_); | ||
| 343 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 344 | $n=&bname($targer); | ||
| 345 | $ret.="$target: $files $dep_libs\n"; | ||
| 346 | if ($standalone == 1) | ||
| 347 | { | ||
| 348 | $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n\t"; | ||
| 349 | $ret.= "\$(EX_LIBS) " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild); | ||
| 350 | $ret.="$files $libs\n<<\n"; | ||
| 351 | } | ||
| 352 | elsif ($standalone == 2) | ||
| 353 | { | ||
| 354 | $ret.="\tSET FIPS_LINK=\$(LINK)\n"; | ||
| 355 | $ret.="\tSET FIPS_CC=\$(CC)\n"; | ||
| 356 | $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n"; | ||
| 357 | $ret.="\tSET PREMAIN_DSO_EXE=\n"; | ||
| 358 | $ret.="\tSET FIPS_TARGET=$target\n"; | ||
| 359 | $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n"; | ||
| 360 | $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n"; | ||
| 361 | $ret.="\t\$(FIPSLINK) \$(LFLAGS) $ff /map $efile$target @<<\n"; | ||
| 362 | $ret.="\t\$(APP_EX_OBJ) $files \$(OBJ_D)${o}fips_premain.obj $libs\n<<\n"; | ||
| 363 | } | ||
| 364 | else | ||
| 365 | { | ||
| 366 | $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n"; | ||
| 367 | $ret.="\t\$(APP_EX_OBJ) $files $libs\n<<\n"; | ||
| 368 | } | ||
| 369 | $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n"; | ||
| 370 | return($ret); | ||
| 371 | } | ||
| 372 | |||
| 373 | sub win32_import_asm | ||
| 374 | { | ||
| 375 | my ($mf_var, $asm_name, $oref, $sref) = @_; | ||
| 376 | my $asm_dir; | ||
| 377 | if ($asm_name eq "") | ||
| 378 | { | ||
| 379 | $asm_dir = "crypto\\"; | ||
| 380 | } | ||
| 381 | else | ||
| 382 | { | ||
| 383 | $asm_dir = "crypto\\$asm_name\\asm\\"; | ||
| 384 | } | ||
| 385 | |||
| 386 | $$oref = ""; | ||
| 387 | $mf_var =~ s/\.o$/.obj/g; | ||
| 388 | |||
| 389 | foreach (split(/ /, $mf_var)) | ||
| 390 | { | ||
| 391 | $$oref .= $asm_dir . $_ . " "; | ||
| 392 | } | ||
| 393 | $$oref =~ s/ $//; | ||
| 394 | $$sref = $$oref; | ||
| 395 | $$sref =~ s/\.obj/.asm/g; | ||
| 396 | |||
| 397 | } | ||
| 398 | |||
| 399 | |||
| 400 | 1; | ||
diff --git a/src/lib/libssl/src/util/pl/linux.pl b/src/lib/libssl/src/util/pl/linux.pl deleted file mode 100644 index d24f7b7291..0000000000 --- a/src/lib/libssl/src/util/pl/linux.pl +++ /dev/null | |||
| @@ -1,104 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # linux.pl - the standard unix makefile stuff. | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='/bin/cp'; | ||
| 8 | $rm='/bin/rm -f'; | ||
| 9 | |||
| 10 | # C compiler stuff | ||
| 11 | |||
| 12 | $cc='gcc'; | ||
| 13 | if ($debug) | ||
| 14 | { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; } | ||
| 15 | elsif ($profile) | ||
| 16 | { $cflags="-pg -O3"; } | ||
| 17 | else | ||
| 18 | { $cflags="-O3 -fomit-frame-pointer"; } | ||
| 19 | |||
| 20 | if (!$no_asm) | ||
| 21 | { | ||
| 22 | $bn_asm_obj='$(OBJ_D)/bn86-elf.o'; | ||
| 23 | $bn_asm_src='crypto/bn/asm/bn86unix.cpp'; | ||
| 24 | $bnco_asm_obj='$(OBJ_D)/co86-elf.o'; | ||
| 25 | $bnco_asm_src='crypto/bn/asm/co86unix.cpp'; | ||
| 26 | $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; | ||
| 27 | $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; | ||
| 28 | $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; | ||
| 29 | $bf_enc_src='crypto/bf/asm/bx86unix.cpp'; | ||
| 30 | $cast_enc_obj='$(OBJ_D)/cx86-elf.o'; | ||
| 31 | $cast_enc_src='crypto/cast/asm/cx86unix.cpp'; | ||
| 32 | $rc4_enc_obj='$(OBJ_D)/rx86-elf.o'; | ||
| 33 | $rc4_enc_src='crypto/rc4/asm/rx86unix.cpp'; | ||
| 34 | $rc5_enc_obj='$(OBJ_D)/r586-elf.o'; | ||
| 35 | $rc5_enc_src='crypto/rc5/asm/r586unix.cpp'; | ||
| 36 | $md5_asm_obj='$(OBJ_D)/mx86-elf.o'; | ||
| 37 | $md5_asm_src='crypto/md5/asm/mx86unix.cpp'; | ||
| 38 | $rmd160_asm_obj='$(OBJ_D)/rm86-elf.o'; | ||
| 39 | $rmd160_asm_src='crypto/ripemd/asm/rm86unix.cpp'; | ||
| 40 | $sha1_asm_obj='$(OBJ_D)/sx86-elf.o'; | ||
| 41 | $sha1_asm_src='crypto/sha/asm/sx86unix.cpp'; | ||
| 42 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; | ||
| 43 | } | ||
| 44 | |||
| 45 | $cflags.=" -DTERMIO -DL_ENDIAN -m486 -Wall"; | ||
| 46 | |||
| 47 | if ($shlib) | ||
| 48 | { | ||
| 49 | $shl_cflag=" -DPIC -fpic"; | ||
| 50 | $shlibp=".so.$ssl_version"; | ||
| 51 | $so_shlibp=".so"; | ||
| 52 | } | ||
| 53 | |||
| 54 | sub do_shlib_rule | ||
| 55 | { | ||
| 56 | local($obj,$target,$name,$shlib,$so_name)=@_; | ||
| 57 | local($ret,$_,$Name); | ||
| 58 | |||
| 59 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 60 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 61 | |||
| 62 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 63 | $ret.="\t\$(RM) target\n"; | ||
| 64 | $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o $target \$(${Name}OBJ)\n"; | ||
| 65 | ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/; | ||
| 66 | if ($so_name ne "") | ||
| 67 | { | ||
| 68 | $ret.="\t\$(RM) \$(LIB_D)$o$so_name\n"; | ||
| 69 | $ret.="\tln -s $target \$(LIB_D)$o$so_name\n\n"; | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 73 | sub do_link_rule | ||
| 74 | { | ||
| 75 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 76 | local($ret,$_); | ||
| 77 | |||
| 78 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 79 | $n=&bname($target); | ||
| 80 | $ret.="$target: $files $dep_libs\n"; | ||
| 81 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 82 | return($ret); | ||
| 83 | } | ||
| 84 | |||
| 85 | sub do_asm_rule | ||
| 86 | { | ||
| 87 | local($target,$src)=@_; | ||
| 88 | local($ret,@s,@t,$i); | ||
| 89 | |||
| 90 | $target =~ s/\//$o/g if $o ne "/"; | ||
| 91 | $src =~ s/\//$o/g if $o ne "/"; | ||
| 92 | |||
| 93 | @s=split(/\s+/,$src); | ||
| 94 | @t=split(/\s+/,$target); | ||
| 95 | |||
| 96 | for ($i=0; $i<=$#s; $i++) | ||
| 97 | { | ||
| 98 | $ret.="$t[$i]: $s[$i]\n"; | ||
| 99 | $ret.="\tgcc -E -DELF \$(SRC_D)$o$s[$i]|\$(AS) $afile$t[$i]\n\n"; | ||
| 100 | } | ||
| 101 | return($ret); | ||
| 102 | } | ||
| 103 | |||
| 104 | 1; | ||
diff --git a/src/lib/libssl/src/util/pl/netware.pl b/src/lib/libssl/src/util/pl/netware.pl deleted file mode 100644 index c78bcfc874..0000000000 --- a/src/lib/libssl/src/util/pl/netware.pl +++ /dev/null | |||
| @@ -1,532 +0,0 @@ | |||
| 1 | # Metrowerks Codewarrior or gcc / nlmconv for NetWare | ||
| 2 | # | ||
| 3 | |||
| 4 | $version_header = "crypto/opensslv.h"; | ||
| 5 | open(IN, "$version_header") or die "Couldn't open $version_header: $!"; | ||
| 6 | while (<IN>) { | ||
| 7 | if (/^#define[\s\t]+OPENSSL_VERSION_NUMBER[\s\t]+0x(\d)(\d{2})(\d{2})(\d{2})/) | ||
| 8 | { | ||
| 9 | # die "OpenSSL version detected: $1.$2.$3.$4\n"; | ||
| 10 | #$nlmvernum = "$1,$2,$3"; | ||
| 11 | $nlmvernum = "$1,".($2*10+$3).",".($4*1); | ||
| 12 | #$nlmverstr = "$1.".($2*1).".".($3*1).($4?(chr(96+$4)):""); | ||
| 13 | break; | ||
| 14 | } | ||
| 15 | } | ||
| 16 | close(IN) or die "Couldn't close $version_header: $!"; | ||
| 17 | |||
| 18 | $readme_file = "README"; | ||
| 19 | open(IN, $readme_file) or die "Couldn't open $readme_file: $!"; | ||
| 20 | while (<IN>) { | ||
| 21 | if (/^[\s\t]+OpenSSL[\s\t]+(\d)\.(\d{1,2})\.(\d{1,2})([a-z])(.*)/) | ||
| 22 | { | ||
| 23 | #$nlmvernum = "$1,$2,$3"; | ||
| 24 | #$nlmvernum = "$1,".($2*10+$3).",".($4*1); | ||
| 25 | $nlmverstr = "$1.$2.$3$4$5"; | ||
| 26 | } | ||
| 27 | elsif (/^[\s\t]+(Copyright \(c\) \d{4}\-\d{4} The OpenSSL Project)$/) | ||
| 28 | { | ||
| 29 | $nlmcpystr = $1; | ||
| 30 | } | ||
| 31 | break if ($nlmvernum && $nlmcpystr); | ||
| 32 | } | ||
| 33 | close(IN) or die "Couldn't close $readme_file: $!"; | ||
| 34 | |||
| 35 | # Define stacksize here | ||
| 36 | $nlmstack = "32768"; | ||
| 37 | |||
| 38 | # some default settings here in case we failed to find them in README | ||
| 39 | $nlmvernum = "1,0,0" if (!$nlmvernum); | ||
| 40 | $nlmverstr = "OpenSSL" if (!$nlmverstr); | ||
| 41 | $nlmcpystr = "Copyright (c) 1998-now The OpenSSL Project" if (!$nlmcpystr); | ||
| 42 | |||
| 43 | # die "OpenSSL copyright: $nlmcpystr\nOpenSSL verstring: $nlmverstr\nOpenSSL vernumber: $nlmvernum\n"; | ||
| 44 | |||
| 45 | # The import files and other misc imports needed to link | ||
| 46 | @misc_imports = ("GetProcessSwitchCount", "RunningProcess", | ||
| 47 | "GetSuperHighResolutionTimer"); | ||
| 48 | if ($LIBC) | ||
| 49 | { | ||
| 50 | @import_files = ("libc.imp"); | ||
| 51 | @module_files = ("libc"); | ||
| 52 | $libarch = "LIBC"; | ||
| 53 | } | ||
| 54 | else | ||
| 55 | { | ||
| 56 | # clib build | ||
| 57 | @import_files = ("clib.imp"); | ||
| 58 | push(@import_files, "socklib.imp") if ($BSDSOCK); | ||
| 59 | @module_files = ("clib"); | ||
| 60 | # push(@misc_imports, "_rt_modu64%16", "_rt_divu64%16"); | ||
| 61 | $libarch = "CLIB"; | ||
| 62 | } | ||
| 63 | if ($BSDSOCK) | ||
| 64 | { | ||
| 65 | $libarch .= "-BSD"; | ||
| 66 | } | ||
| 67 | else | ||
| 68 | { | ||
| 69 | $libarch .= "-WS2"; | ||
| 70 | push(@import_files, "ws2nlm.imp"); | ||
| 71 | } | ||
| 72 | |||
| 73 | # The "IMPORTS" environment variable must be set and point to the location | ||
| 74 | # where import files (*.imp) can be found. | ||
| 75 | # Example: set IMPORTS=c:\ndk\nwsdk\imports | ||
| 76 | $import_path = $ENV{"IMPORTS"} || die ("IMPORTS environment variable not set\n"); | ||
| 77 | |||
| 78 | |||
| 79 | # The "PRELUDE" environment variable must be set and point to the location | ||
| 80 | # and name of the prelude source to link with ( nwpre.obj is recommended ). | ||
| 81 | # Example: set PRELUDE=c:\codewar\novell support\metrowerks support\libraries\runtime\nwpre.obj | ||
| 82 | $prelude = $ENV{"PRELUDE"} || die ("PRELUDE environment variable not set\n"); | ||
| 83 | |||
| 84 | # The "INCLUDES" environment variable must be set and point to the location | ||
| 85 | # where import files (*.imp) can be found. | ||
| 86 | $include_path = $ENV{"INCLUDE"} || die ("INCLUDES environment variable not set\n"); | ||
| 87 | $include_path =~ s/\\/\//g; | ||
| 88 | $include_path = join(" -I", split(/;/, $include_path)); | ||
| 89 | |||
| 90 | # check for gcc compiler | ||
| 91 | $gnuc = $ENV{"GNUC"}; | ||
| 92 | |||
| 93 | #$ssl= "ssleay32"; | ||
| 94 | #$crypto="libeay32"; | ||
| 95 | |||
| 96 | if ($gnuc) | ||
| 97 | { | ||
| 98 | # C compiler | ||
| 99 | $cc='gcc'; | ||
| 100 | # Linker | ||
| 101 | $link='nlmconv'; | ||
| 102 | # librarian | ||
| 103 | $mklib='ar'; | ||
| 104 | $o='/'; | ||
| 105 | # cp command | ||
| 106 | $cp='cp -af'; | ||
| 107 | # rm command | ||
| 108 | $rm='rm -f'; | ||
| 109 | # mv command | ||
| 110 | $mv='mv -f'; | ||
| 111 | # mkdir command | ||
| 112 | $mkdir='gmkdir'; | ||
| 113 | #$ranlib='ranlib'; | ||
| 114 | } | ||
| 115 | else | ||
| 116 | { | ||
| 117 | # C compiler | ||
| 118 | $cc='mwccnlm'; | ||
| 119 | # Linker | ||
| 120 | $link='mwldnlm'; | ||
| 121 | # librarian | ||
| 122 | $mklib='mwldnlm'; | ||
| 123 | # Path separator | ||
| 124 | $o='\\'; | ||
| 125 | # cp command | ||
| 126 | $cp='copy >nul:'; | ||
| 127 | # rm command | ||
| 128 | $rm='del /f /q'; | ||
| 129 | } | ||
| 130 | |||
| 131 | # assembler | ||
| 132 | if ($nw_nasm) | ||
| 133 | { | ||
| 134 | $asm=(`nasm -v 2>NUL` gt `nasmw -v 2>NUL`?"nasm":"nasmw"); | ||
| 135 | if ($gnuc) | ||
| 136 | { | ||
| 137 | $asm.=" -s -f elf"; | ||
| 138 | } | ||
| 139 | else | ||
| 140 | { | ||
| 141 | $asm.=" -s -f coff -d __coff__"; | ||
| 142 | } | ||
| 143 | $afile="-o "; | ||
| 144 | $asm.=" -g" if $debug; | ||
| 145 | } | ||
| 146 | elsif ($nw_mwasm) | ||
| 147 | { | ||
| 148 | $asm="mwasmnlm -maxerrors 20"; | ||
| 149 | $afile="-o "; | ||
| 150 | $asm.=" -g" if $debug; | ||
| 151 | } | ||
| 152 | elsif ($nw_masm) | ||
| 153 | { | ||
| 154 | # masm assembly settings - it should be possible to use masm but haven't | ||
| 155 | # got it working. | ||
| 156 | # $asm='ml /Cp /coff /c /Cx'; | ||
| 157 | # $asm.=" /Zi" if $debug; | ||
| 158 | # $afile='/Fo'; | ||
| 159 | die("Support for masm assembler not yet functional\n"); | ||
| 160 | } | ||
| 161 | else | ||
| 162 | { | ||
| 163 | $asm=""; | ||
| 164 | $afile=""; | ||
| 165 | } | ||
| 166 | |||
| 167 | |||
| 168 | |||
| 169 | if ($gnuc) | ||
| 170 | { | ||
| 171 | # compile flags for GNUC | ||
| 172 | # additional flags based upon debug | non-debug | ||
| 173 | if ($debug) | ||
| 174 | { | ||
| 175 | $cflags="-g -DDEBUG"; | ||
| 176 | } | ||
| 177 | else | ||
| 178 | { | ||
| 179 | $cflags="-O2"; | ||
| 180 | } | ||
| 181 | $cflags.=" -nostdinc -I$include_path \\ | ||
| 182 | -fno-builtin -fpcc-struct-return -fno-strict-aliasing \\ | ||
| 183 | -funsigned-char -Wall -Wno-unused -Wno-uninitialized"; | ||
| 184 | |||
| 185 | # link flags | ||
| 186 | $lflags="-T"; | ||
| 187 | } | ||
| 188 | else | ||
| 189 | { | ||
| 190 | # compile flags for CodeWarrior | ||
| 191 | # additional flags based upon debug | non-debug | ||
| 192 | if ($debug) | ||
| 193 | { | ||
| 194 | $cflags="-opt off -g -sym internal -DDEBUG"; | ||
| 195 | } | ||
| 196 | else | ||
| 197 | { | ||
| 198 | # CodeWarrior compiler has a problem with optimizations for floating | ||
| 199 | # points - no optimizations until further investigation | ||
| 200 | # $cflags="-opt all"; | ||
| 201 | } | ||
| 202 | |||
| 203 | # NOTES: Several c files in the crypto subdirectory include headers from | ||
| 204 | # their local directories. Metrowerks wouldn't find these h files | ||
| 205 | # without adding individual include directives as compile flags | ||
| 206 | # or modifying the c files. Instead of adding individual include | ||
| 207 | # paths for each subdirectory a recursive include directive | ||
| 208 | # is used ( -ir crypto ). | ||
| 209 | # | ||
| 210 | # A similar issue exists for the engines and apps subdirectories. | ||
| 211 | # | ||
| 212 | # Turned off the "possible" warnings ( -w nopossible ). Metrowerks | ||
| 213 | # complained a lot about various stuff. May want to turn back | ||
| 214 | # on for further development. | ||
| 215 | $cflags.=" -nostdinc -ir crypto -ir engines -ir apps -I$include_path \\ | ||
| 216 | -msgstyle gcc -align 4 -processor pentium -char unsigned \\ | ||
| 217 | -w on -w nolargeargs -w nopossible -w nounusedarg -w nounusedexpr \\ | ||
| 218 | -w noimplicitconv -relax_pointers -nosyspath -maxerrors 20"; | ||
| 219 | |||
| 220 | # link flags | ||
| 221 | $lflags="-msgstyle gcc -zerobss -nostdlib -sym internal -commandfile"; | ||
| 222 | } | ||
| 223 | |||
| 224 | # common defines | ||
| 225 | $cflags.=" -DL_ENDIAN -DOPENSSL_SYSNAME_NETWARE -U_WIN32"; | ||
| 226 | |||
| 227 | # If LibC build add in NKS_LIBC define and set the entry/exit | ||
| 228 | # routines - The default entry/exit routines are for CLib and don't exist | ||
| 229 | # in LibC | ||
| 230 | if ($LIBC) | ||
| 231 | { | ||
| 232 | $cflags.=" -DNETWARE_LIBC"; | ||
| 233 | $nlmstart = "_LibCPrelude"; | ||
| 234 | $nlmexit = "_LibCPostlude"; | ||
| 235 | @nlm_flags = ("pseudopreemption", "flag_on 64"); | ||
| 236 | } | ||
| 237 | else | ||
| 238 | { | ||
| 239 | $cflags.=" -DNETWARE_CLIB"; | ||
| 240 | $nlmstart = "_Prelude"; | ||
| 241 | $nlmexit = "_Stop"; | ||
| 242 | } | ||
| 243 | |||
| 244 | # If BSD Socket support is requested, set a define for the compiler | ||
| 245 | if ($BSDSOCK) | ||
| 246 | { | ||
| 247 | $cflags.=" -DNETWARE_BSDSOCK"; | ||
| 248 | if (!$LIBC) | ||
| 249 | { | ||
| 250 | $cflags.=" -DNETDB_USE_INTERNET"; | ||
| 251 | } | ||
| 252 | } | ||
| 253 | |||
| 254 | |||
| 255 | # linking stuff | ||
| 256 | # for the output directories use the mk1mf.pl values with "_nw" appended | ||
| 257 | if ($shlib) | ||
| 258 | { | ||
| 259 | if ($LIBC) | ||
| 260 | { | ||
| 261 | $out_def.="_nw_libc_nlm"; | ||
| 262 | $tmp_def.="_nw_libc_nlm"; | ||
| 263 | $inc_def.="_nw_libc_nlm"; | ||
| 264 | } | ||
| 265 | else # NETWARE_CLIB | ||
| 266 | { | ||
| 267 | $out_def.="_nw_clib_nlm"; | ||
| 268 | $tmp_def.="_nw_clib_nlm"; | ||
| 269 | $inc_def.="_nw_clib_nlm"; | ||
| 270 | } | ||
| 271 | } | ||
| 272 | else | ||
| 273 | { | ||
| 274 | if ($gnuc) # GNUC Tools | ||
| 275 | { | ||
| 276 | $libp=".a"; | ||
| 277 | $shlibp=".a"; | ||
| 278 | $lib_flags="-cr"; | ||
| 279 | } | ||
| 280 | else # CodeWarrior | ||
| 281 | { | ||
| 282 | $libp=".lib"; | ||
| 283 | $shlibp=".lib"; | ||
| 284 | $lib_flags="-nodefaults -type library -o"; | ||
| 285 | } | ||
| 286 | if ($LIBC) | ||
| 287 | { | ||
| 288 | $out_def.="_nw_libc"; | ||
| 289 | $tmp_def.="_nw_libc"; | ||
| 290 | $inc_def.="_nw_libc"; | ||
| 291 | } | ||
| 292 | else # NETWARE_CLIB | ||
| 293 | { | ||
| 294 | $out_def.="_nw_clib"; | ||
| 295 | $tmp_def.="_nw_clib"; | ||
| 296 | $inc_def.="_nw_clib"; | ||
| 297 | } | ||
| 298 | } | ||
| 299 | |||
| 300 | # used by mk1mf.pl | ||
| 301 | $obj='.o'; | ||
| 302 | $ofile='-o '; | ||
| 303 | $efile=''; | ||
| 304 | $exep='.nlm'; | ||
| 305 | $ex_libs=''; | ||
| 306 | |||
| 307 | if (!$no_asm) | ||
| 308 | { | ||
| 309 | $bn_asm_obj="\$(OBJ_D)${o}bn-nw${obj}"; | ||
| 310 | $bn_asm_src="crypto${o}bn${o}asm${o}bn-nw.asm"; | ||
| 311 | $bnco_asm_obj="\$(OBJ_D)${o}co-nw${obj}"; | ||
| 312 | $bnco_asm_src="crypto${o}bn${o}asm${o}co-nw.asm"; | ||
| 313 | $aes_asm_obj="\$(OBJ_D)${o}a-nw${obj}"; | ||
| 314 | $aes_asm_src="crypto${o}aes${o}asm${o}a-nw.asm"; | ||
| 315 | $des_enc_obj="\$(OBJ_D)${o}d-nw${obj} \$(OBJ_D)${o}y-nw${obj}"; | ||
| 316 | $des_enc_src="crypto${o}des${o}asm${o}d-nw.asm crypto${o}des${o}asm${o}y-nw.asm"; | ||
| 317 | $bf_enc_obj="\$(OBJ_D)${o}b-nw${obj}"; | ||
| 318 | $bf_enc_src="crypto${o}bf${o}asm${o}b-nw.asm"; | ||
| 319 | $cast_enc_obj="\$(OBJ_D)${o}c-nw${obj}"; | ||
| 320 | $cast_enc_src="crypto${o}cast${o}asm${o}c-nw.asm"; | ||
| 321 | $rc4_enc_obj="\$(OBJ_D)${o}r4-nw${obj}"; | ||
| 322 | $rc4_enc_src="crypto${o}rc4${o}asm${o}r4-nw.asm"; | ||
| 323 | $rc5_enc_obj="\$(OBJ_D)${o}r5-nw${obj}"; | ||
| 324 | $rc5_enc_src="crypto${o}rc5${o}asm${o}r5-nw.asm"; | ||
| 325 | $md5_asm_obj="\$(OBJ_D)${o}m5-nw${obj}"; | ||
| 326 | $md5_asm_src="crypto${o}md5${o}asm${o}m5-nw.asm"; | ||
| 327 | $sha1_asm_obj="\$(OBJ_D)${o}s1-nw${obj} \$(OBJ_D)${o}sha256-nw${obj} \$(OBJ_D)${o}sha512-nw${obj}"; | ||
| 328 | $sha1_asm_src="crypto${o}sha${o}asm${o}s1-nw.asm crypto${o}sha${o}asm${o}sha256-nw.asm crypto${o}sha${o}asm${o}sha512-nw.asm"; | ||
| 329 | $rmd160_asm_obj="\$(OBJ_D)${o}rm-nw${obj}"; | ||
| 330 | $rmd160_asm_src="crypto${o}ripemd${o}asm${o}rm-nw.asm"; | ||
| 331 | $whirlpool_asm_obj="\$(OBJ_D)${o}wp-nw${obj}"; | ||
| 332 | $whirlpool_asm_src="crypto${o}whrlpool${o}asm${o}wp-nw.asm"; | ||
| 333 | $cpuid_asm_obj="\$(OBJ_D)${o}x86cpuid-nw${obj}"; | ||
| 334 | $cpuid_asm_src="crypto${o}x86cpuid-nw.asm"; | ||
| 335 | $cflags.=" -DOPENSSL_CPUID_OBJ -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DMD5_ASM -DWHIRLPOOL_ASM"; | ||
| 336 | $cflags.=" -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM"; | ||
| 337 | $cflags.=" -DAES_ASM -DRMD160_ASM"; | ||
| 338 | } | ||
| 339 | else | ||
| 340 | { | ||
| 341 | $bn_asm_obj=''; | ||
| 342 | $bn_asm_src=''; | ||
| 343 | $bnco_asm_obj=''; | ||
| 344 | $bnco_asm_src=''; | ||
| 345 | $aes_asm_obj=''; | ||
| 346 | $aes_asm_src=''; | ||
| 347 | $des_enc_obj=''; | ||
| 348 | $des_enc_src=''; | ||
| 349 | $bf_enc_obj=''; | ||
| 350 | $bf_enc_src=''; | ||
| 351 | $cast_enc_obj=''; | ||
| 352 | $cast_enc_src=''; | ||
| 353 | $rc4_enc_obj=''; | ||
| 354 | $rc4_enc_src=''; | ||
| 355 | $rc5_enc_obj=''; | ||
| 356 | $rc5_enc_src=''; | ||
| 357 | $md5_asm_obj=''; | ||
| 358 | $md5_asm_src=''; | ||
| 359 | $sha1_asm_obj=''; | ||
| 360 | $sha1_asm_src=''; | ||
| 361 | $rmd160_asm_obj=''; | ||
| 362 | $rmd160_asm_src=''; | ||
| 363 | $whirlpool_asm_obj=''; | ||
| 364 | $whirlpool_asm_src=''; | ||
| 365 | $cpuid_asm_obj=''; | ||
| 366 | $cpuid_asm_src=''; | ||
| 367 | } | ||
| 368 | |||
| 369 | # create the *.def linker command files in \openssl\netware\ directory | ||
| 370 | sub do_def_file | ||
| 371 | { | ||
| 372 | # strip off the leading path | ||
| 373 | my($target) = bname(shift); | ||
| 374 | my($i); | ||
| 375 | |||
| 376 | if ($target =~ /(.*).nlm/) | ||
| 377 | { | ||
| 378 | $target = $1; | ||
| 379 | } | ||
| 380 | |||
| 381 | # special case for openssl - the mk1mf.pl defines E_EXE = openssl | ||
| 382 | if ($target =~ /E_EXE/) | ||
| 383 | { | ||
| 384 | $target =~ s/\$\(E_EXE\)/openssl/; | ||
| 385 | } | ||
| 386 | |||
| 387 | # Note: originally tried to use full path ( \openssl\netware\$target.def ) | ||
| 388 | # Metrowerks linker choked on this with an assertion failure. bug??? | ||
| 389 | # | ||
| 390 | my($def_file) = "netware${o}$target.def"; | ||
| 391 | |||
| 392 | open(DEF_OUT, ">$def_file") || die("unable to open file $def_file\n"); | ||
| 393 | |||
| 394 | print( DEF_OUT "# command file generated by netware.pl for NLM target.\n" ); | ||
| 395 | print( DEF_OUT "# do not edit this file - all your changes will be lost!!\n" ); | ||
| 396 | print( DEF_OUT "#\n"); | ||
| 397 | print( DEF_OUT "DESCRIPTION \"$target ($libarch) - OpenSSL $nlmverstr\"\n"); | ||
| 398 | print( DEF_OUT "COPYRIGHT \"$nlmcpystr\"\n"); | ||
| 399 | print( DEF_OUT "VERSION $nlmvernum\n"); | ||
| 400 | print( DEF_OUT "STACK $nlmstack\n"); | ||
| 401 | print( DEF_OUT "START $nlmstart\n"); | ||
| 402 | print( DEF_OUT "EXIT $nlmexit\n"); | ||
| 403 | |||
| 404 | # special case for openssl | ||
| 405 | if ($target eq "openssl") | ||
| 406 | { | ||
| 407 | print( DEF_OUT "SCREENNAME \"OpenSSL $nlmverstr\"\n"); | ||
| 408 | } | ||
| 409 | else | ||
| 410 | { | ||
| 411 | print( DEF_OUT "SCREENNAME \"DEFAULT\"\n"); | ||
| 412 | } | ||
| 413 | |||
| 414 | foreach $i (@misc_imports) | ||
| 415 | { | ||
| 416 | print( DEF_OUT "IMPORT $i\n"); | ||
| 417 | } | ||
| 418 | |||
| 419 | foreach $i (@import_files) | ||
| 420 | { | ||
| 421 | print( DEF_OUT "IMPORT \@$import_path${o}$i\n"); | ||
| 422 | } | ||
| 423 | |||
| 424 | foreach $i (@module_files) | ||
| 425 | { | ||
| 426 | print( DEF_OUT "MODULE $i\n"); | ||
| 427 | } | ||
| 428 | |||
| 429 | foreach $i (@nlm_flags) | ||
| 430 | { | ||
| 431 | print( DEF_OUT "$i\n"); | ||
| 432 | } | ||
| 433 | |||
| 434 | if ($gnuc) | ||
| 435 | { | ||
| 436 | if ($target =~ /openssl/) | ||
| 437 | { | ||
| 438 | print( DEF_OUT "INPUT ${tmp_def}${o}openssl${obj}\n"); | ||
| 439 | print( DEF_OUT "INPUT ${tmp_def}${o}openssl${libp}\n"); | ||
| 440 | } | ||
| 441 | else | ||
| 442 | { | ||
| 443 | print( DEF_OUT "INPUT ${tmp_def}${o}${target}${obj}\n"); | ||
| 444 | } | ||
| 445 | print( DEF_OUT "INPUT $prelude\n"); | ||
| 446 | print( DEF_OUT "INPUT ${out_def}${o}${ssl}${libp} ${out_def}${o}${crypto}${libp}\n"); | ||
| 447 | print( DEF_OUT "OUTPUT $target.nlm\n"); | ||
| 448 | } | ||
| 449 | |||
| 450 | close(DEF_OUT); | ||
| 451 | return($def_file); | ||
| 452 | } | ||
| 453 | |||
| 454 | sub do_lib_rule | ||
| 455 | { | ||
| 456 | my($objs,$target,$name,$shlib)=@_; | ||
| 457 | my($ret); | ||
| 458 | |||
| 459 | $ret.="$target: $objs\n"; | ||
| 460 | if (!$shlib) | ||
| 461 | { | ||
| 462 | $ret.="\t\@echo Building Lib: $name\n"; | ||
| 463 | $ret.="\t\$(MKLIB) $lib_flags $target $objs\n"; | ||
| 464 | $ret.="\t\@echo .\n" | ||
| 465 | } | ||
| 466 | else | ||
| 467 | { | ||
| 468 | die( "Building as NLM not currently supported!" ); | ||
| 469 | } | ||
| 470 | |||
| 471 | $ret.="\n"; | ||
| 472 | return($ret); | ||
| 473 | } | ||
| 474 | |||
| 475 | sub do_link_rule | ||
| 476 | { | ||
| 477 | my($target,$files,$dep_libs,$libs)=@_; | ||
| 478 | my($ret); | ||
| 479 | my($def_file) = do_def_file($target); | ||
| 480 | |||
| 481 | $ret.="$target: $files $dep_libs\n"; | ||
| 482 | |||
| 483 | # NOTE: When building the test nlms no screen name is given | ||
| 484 | # which causes the console screen to be used. By using the console | ||
| 485 | # screen there is no "<press any key to continue>" message which | ||
| 486 | # requires user interaction. The test script ( do_tests.pl ) needs | ||
| 487 | # to be able to run the tests without requiring user interaction. | ||
| 488 | # | ||
| 489 | # However, the sample program "openssl.nlm" is used by the tests and is | ||
| 490 | # a interactive sample so a screen is desired when not be run by the | ||
| 491 | # tests. To solve the problem, two versions of the program are built: | ||
| 492 | # openssl2 - no screen used by tests | ||
| 493 | # openssl - default screen - use for normal interactive modes | ||
| 494 | # | ||
| 495 | |||
| 496 | # special case for openssl - the mk1mf.pl defines E_EXE = openssl | ||
| 497 | if ($target =~ /E_EXE/) | ||
| 498 | { | ||
| 499 | my($target2) = $target; | ||
| 500 | |||
| 501 | $target2 =~ s/\(E_EXE\)/\(E_EXE\)2/; | ||
| 502 | |||
| 503 | # openssl2 | ||
| 504 | my($def_file2) = do_def_file($target2); | ||
| 505 | |||
| 506 | if ($gnuc) | ||
| 507 | { | ||
| 508 | $ret.="\t\$(MKLIB) $lib_flags \$(TMP_D)${o}\$(E_EXE).a \$(filter-out \$(TMP_D)${o}\$(E_EXE)${obj},$files)\n"; | ||
| 509 | $ret.="\t\$(LINK) \$(LFLAGS) $def_file2\n"; | ||
| 510 | $ret.="\t\@$mv \$(E_EXE)2.nlm \$(TEST_D)\n"; | ||
| 511 | } | ||
| 512 | else | ||
| 513 | { | ||
| 514 | $ret.="\t\$(LINK) \$(LFLAGS) $def_file2 $files \"$prelude\" $libs -o $target2\n"; | ||
| 515 | } | ||
| 516 | } | ||
| 517 | if ($gnuc) | ||
| 518 | { | ||
| 519 | $ret.="\t\$(LINK) \$(LFLAGS) $def_file\n"; | ||
| 520 | $ret.="\t\@$mv \$(\@F) \$(TEST_D)\n"; | ||
| 521 | } | ||
| 522 | else | ||
| 523 | { | ||
| 524 | $ret.="\t\$(LINK) \$(LFLAGS) $def_file $files \"$prelude\" $libs -o $target\n"; | ||
| 525 | } | ||
| 526 | |||
| 527 | $ret.="\n"; | ||
| 528 | return($ret); | ||
| 529 | |||
| 530 | } | ||
| 531 | |||
| 532 | 1; | ||
diff --git a/src/lib/libssl/src/util/pl/ultrix.pl b/src/lib/libssl/src/util/pl/ultrix.pl deleted file mode 100644 index ea370c71f9..0000000000 --- a/src/lib/libssl/src/util/pl/ultrix.pl +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # linux.pl - the standard unix makefile stuff. | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='/bin/cp'; | ||
| 8 | $rm='/bin/rm -f'; | ||
| 9 | |||
| 10 | # C compiler stuff | ||
| 11 | |||
| 12 | $cc='cc'; | ||
| 13 | if ($debug) | ||
| 14 | { $cflags="-g -DREF_CHECK -DCRYPTO_MDEBUG"; } | ||
| 15 | else | ||
| 16 | { $cflags="-O2"; } | ||
| 17 | |||
| 18 | $cflags.=" -std1 -DL_ENDIAN"; | ||
| 19 | |||
| 20 | if (!$no_asm) | ||
| 21 | { | ||
| 22 | $bn_asm_obj='$(OBJ_D)/mips1.o'; | ||
| 23 | $bn_asm_src='crypto/bn/asm/mips1.s'; | ||
| 24 | } | ||
| 25 | |||
| 26 | sub do_link_rule | ||
| 27 | { | ||
| 28 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 29 | local($ret,$_); | ||
| 30 | |||
| 31 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 32 | $n=&bname($target); | ||
| 33 | $ret.="$target: $files $dep_libs\n"; | ||
| 34 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 35 | return($ret); | ||
| 36 | } | ||
| 37 | |||
| 38 | 1; | ||
diff --git a/src/lib/libssl/src/util/pl/unix.pl b/src/lib/libssl/src/util/pl/unix.pl deleted file mode 100644 index 146611ad99..0000000000 --- a/src/lib/libssl/src/util/pl/unix.pl +++ /dev/null | |||
| @@ -1,96 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # unix.pl - the standard unix makefile stuff. | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='/bin/cp'; | ||
| 8 | $rm='/bin/rm -f'; | ||
| 9 | |||
| 10 | # C compiler stuff | ||
| 11 | |||
| 12 | if ($gcc) | ||
| 13 | { | ||
| 14 | $cc='gcc'; | ||
| 15 | if ($debug) | ||
| 16 | { $cflags="-g2 -ggdb"; } | ||
| 17 | else | ||
| 18 | { $cflags="-O3 -fomit-frame-pointer"; } | ||
| 19 | } | ||
| 20 | else | ||
| 21 | { | ||
| 22 | $cc='cc'; | ||
| 23 | if ($debug) | ||
| 24 | { $cflags="-g"; } | ||
| 25 | else | ||
| 26 | { $cflags="-O"; } | ||
| 27 | } | ||
| 28 | $obj='.o'; | ||
| 29 | $ofile='-o '; | ||
| 30 | |||
| 31 | # EXE linking stuff | ||
| 32 | $link='${CC}'; | ||
| 33 | $lflags='${CFLAGS}'; | ||
| 34 | $efile='-o '; | ||
| 35 | $exep=''; | ||
| 36 | $ex_libs=""; | ||
| 37 | |||
| 38 | # static library stuff | ||
| 39 | $mklib='ar r'; | ||
| 40 | $mlflags=''; | ||
| 41 | $ranlib=&which("ranlib") or $ranlib="true"; | ||
| 42 | $plib='lib'; | ||
| 43 | $libp=".a"; | ||
| 44 | $shlibp=".a"; | ||
| 45 | $lfile=''; | ||
| 46 | |||
| 47 | $asm='as'; | ||
| 48 | $afile='-o '; | ||
| 49 | $bn_asm_obj=""; | ||
| 50 | $bn_asm_src=""; | ||
| 51 | $des_enc_obj=""; | ||
| 52 | $des_enc_src=""; | ||
| 53 | $bf_enc_obj=""; | ||
| 54 | $bf_enc_src=""; | ||
| 55 | |||
| 56 | sub do_lib_rule | ||
| 57 | { | ||
| 58 | local($obj,$target,$name,$shlib)=@_; | ||
| 59 | local($ret,$_,$Name); | ||
| 60 | |||
| 61 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 62 | $target="$target"; | ||
| 63 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 64 | |||
| 65 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 66 | $ret.="\t\$(RM) $target\n"; | ||
| 67 | $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; | ||
| 68 | $ret.="\t\$(RANLIB) $target\n\n"; | ||
| 69 | } | ||
| 70 | |||
| 71 | sub do_link_rule | ||
| 72 | { | ||
| 73 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 74 | local($ret,$_); | ||
| 75 | |||
| 76 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 77 | $n=&bname($target); | ||
| 78 | $ret.="$target: $files $dep_libs\n"; | ||
| 79 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 80 | return($ret); | ||
| 81 | } | ||
| 82 | |||
| 83 | sub which | ||
| 84 | { | ||
| 85 | my ($name)=@_; | ||
| 86 | my $path; | ||
| 87 | foreach $path (split /:/, $ENV{PATH}) | ||
| 88 | { | ||
| 89 | if (-x "$path/$name") | ||
| 90 | { | ||
| 91 | return "$path/$name"; | ||
| 92 | } | ||
| 93 | } | ||
| 94 | } | ||
| 95 | |||
| 96 | 1; | ||
