Update WIN32 nasm build to use new asm files.

This commit is contained in:
Dr. Stephen Henson 2008-01-04 00:48:14 +00:00
parent 744ecaa5b6
commit 4664eb5230
3 changed files with 33 additions and 18 deletions

View File

@ -1,67 +1,77 @@
@echo off
SET ASMOPTS=-DOPENSSL_IA32_SSE2
echo Generating x86 for NASM assember
echo Bignum
cd crypto\bn\asm
perl x86.pl win32n > bn_win32.asm
perl bn-586.pl win32n %ASMOPTS% > bn_win32.asm
perl co-586.pl win32n %ASMOPTS% > co_win32.asm
cd ..\..\..
echo AES
cd crypto\aes\asm
perl aes-586.pl win32n %ASMOPTS% > a_win32.asm
cd ..\..\..
echo DES
cd crypto\des\asm
perl des-586.pl win32n > d_win32.asm
perl des-586.pl win32n %ASMOPTS% > d_win32.asm
cd ..\..\..
echo "crypt(3)"
cd crypto\des\asm
perl crypt586.pl win32n > y_win32.asm
perl crypt586.pl win32n %ASMOPTS% > y_win32.asm
cd ..\..\..
echo Blowfish
cd crypto\bf\asm
perl bf-586.pl win32n > b_win32.asm
perl bf-586.pl win32n %ASMOPTS% > b_win32.asm
cd ..\..\..
echo CAST5
cd crypto\cast\asm
perl cast-586.pl win32n > c_win32.asm
perl cast-586.pl win32n %ASMOPTS% > c_win32.asm
cd ..\..\..
echo RC4
cd crypto\rc4\asm
perl rc4-586.pl win32n > r4_win32.asm
perl rc4-586.pl win32n %ASMOPTS% > r4_win32.asm
cd ..\..\..
echo MD5
cd crypto\md5\asm
perl md5-586.pl win32n > m5_win32.asm
perl md5-586.pl win32n %ASMOPTS% > m5_win32.asm
cd ..\..\..
echo SHA1
cd crypto\sha\asm
perl sha1-586.pl win32n > s1_win32.asm
perl sha1-586.pl win32n %ASMOPTS% > s1_win32.asm
perl sha256-586.pl win32n %ASMOPTS% > sha256_win32.asm
perl sha512-586.pl win32n %ASMOPTS% > sha512_win32.asm
cd ..\..\..
echo RIPEMD160
cd crypto\ripemd\asm
perl rmd-586.pl win32n > rm_win32.asm
perl rmd-586.pl win32n %ASMOPTS% > rm_win32.asm
cd ..\..\..
echo RC5\32
cd crypto\rc5\asm
perl rc5-586.pl win32n > r5_win32.asm
perl rc5-586.pl win32n %ASMOPTS% > r5_win32.asm
cd ..\..\..
echo Whirlpool
cd crypto\whrlpool\asm
perl wp-mmx.pl win32n > wp_win32.asm
perl wp-mmx.pl win32n %ASMOPTS% > wp_win32.asm
cd ..\..\..
echo CPU-ID
cd crypto
perl x86cpuid.pl win32n > cpu_win32.asm
perl x86cpuid.pl win32n %ASMOPTS% > cpu_win32.asm
cd ..
echo on

View File

@ -868,6 +868,7 @@ sub do_defs
else { $pf=$postfix; }
if ($_ =~ /BN_ASM/) { $t="$_ "; }
elsif ($_ =~ /BNCO_ASM/){ $t="$_ "; }
elsif ($_ =~ /AES_ASM/){ $t="$_ "; }
elsif ($_ =~ /DES_ENC/) { $t="$_ "; }
elsif ($_ =~ /BF_ENC/) { $t="$_ "; }
elsif ($_ =~ /CAST_ENC/){ $t="$_ "; }

View File

@ -9,7 +9,7 @@ $crypto="libeay32";
$o='\\';
$cp='$(PERL) util/copy.pl';
$mkdir='$(PERL) util/mkdir-p.pl';
$rm='del';
$rm='del /Q';
$zlib_lib="zlib1.lib";
@ -163,8 +163,8 @@ $lfile='/out:';
$shlib_ex_obj="";
$app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/);
if ($nasm) {
my $ver=`nasm -v`;
my $vew=`nasmw -v`;
my $ver=`nasm -v 2>NUL`;
my $vew=`nasmw -v 2>NUL`;
# pick newest version
$asm=($ver gt $vew?"nasm":"nasmw")." -f win32";
$afile='-o ';
@ -183,8 +183,12 @@ $bf_enc_src='';
if (!$no_asm)
{
$aes_asm_obj='crypto\aes\asm\a_win32.obj';
$aes_asm_src='crypto\aes\asm\a_win32.asm';
$bn_asm_obj='crypto\bn\asm\bn_win32.obj';
$bn_asm_src='crypto\bn\asm\bn_win32.asm';
$bnco_asm_obj='crypto\bn\asm\co_win32.obj';
$bnco_asm_src='crypto\bn\asm\co_win32.asm';
$des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj';
$des_enc_src='crypto\des\asm\d_win32.asm crypto\des\asm\y_win32.asm';
$bf_enc_obj='crypto\bf\asm\b_win32.obj';
@ -197,15 +201,15 @@ if (!$no_asm)
$rc5_enc_src='crypto\rc5\asm\r5_win32.asm';
$md5_asm_obj='crypto\md5\asm\m5_win32.obj';
$md5_asm_src='crypto\md5\asm\m5_win32.asm';
$sha1_asm_obj='crypto\sha\asm\s1_win32.obj';
$sha1_asm_src='crypto\sha\asm\s1_win32.asm';
$sha1_asm_obj='crypto\sha\asm\s1_win32.obj crypto\sha\asm\sha256_win32.obj crypto\sha\asm\sha512_win32.obj';
$sha1_asm_src='crypto\sha\asm\s1_win32.asm crypto\sha\asm\sha256_win32.asm crypto\sha\asm\sha512_win32.asm';
$rmd160_asm_obj='crypto\ripemd\asm\rm_win32.obj';
$rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm';
$whirlpool_asm_obj='crypto\whrlpool\asm\wp_win32.obj';
$whirlpool_asm_src='crypto\whrlpool\asm\wp_win32.asm';
$cpuid_asm_obj='crypto\cpu_win32.obj';
$cpuid_asm_src='crypto\cpu_win32.asm';
$cflags.=" -DOPENSSL_CPUID_OBJ -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DWHIRLPOOL_ASM";
$cflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DOPENSSL_BN_ASM_PART_WORDS -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DWHIRLPOOL_ASM";
}
if ($shlib && $FLAVOR !~ /CE/)