X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fpl%2FBC-32.pl;h=57384bba1e7c1df9d04da882af33c237c8857a27;hp=578808f0c14218057f5243b48f03b9852a1af45f;hb=31ba0e17585bd16e089afa3a44979ccd9561182a;hpb=9ddeefe39d23ffe7559acc98722ab6dc5ed4f72d diff --git a/util/pl/BC-32.pl b/util/pl/BC-32.pl index 578808f0c1..57384bba1e 100644 --- a/util/pl/BC-32.pl +++ b/util/pl/BC-32.pl @@ -8,6 +8,7 @@ $crypto="libeay32"; $o='\\'; $cp='copy'; $rm='del'; +$mv='move /Y'; # C compiler stuff $cc='bcc32'; @@ -18,7 +19,7 @@ $out_def="out32"; $tmp_def="tmp32"; $inc_def="inc32"; #enable max error messages, disable most common warnings -$cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp "; +$cflags="-DWIN32_LEAN_AND_MEAN -q -w-ccc -w-rch -w-pia -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYS_WIN32 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp -D_strnicmp=strnicmp "; if ($debug) { $cflags.="-Od -y -v -vi- -D_DEBUG"; @@ -38,7 +39,7 @@ $efile=""; $exep='.exe'; if ($no_sock) { $ex_libs=""; } -else { $ex_libs="cw32mt.lib import32.lib"; } +else { $ex_libs="cw32mt.lib import32.lib crypt32.lib ws2_32.lib"; } # static library stuff $mklib='tlib /P64'; @@ -51,8 +52,8 @@ $lfile=''; $shlib_ex_obj=""; $app_ex_obj="c0x32.obj"; -$asm='nasmw -f obj -d__omf__'; -$asm.=" /Zi" if $debug; +$asm=(`nasm -v 2>NUL` ge `nasmw -v 2>NUL`?"nasm":"nasmw")." -f obj -d__omf__"; +$asm.=" -g" if $debug; $afile='-o'; $bn_mulw_obj=''; @@ -94,6 +95,27 @@ if ($shlib) $tmp_def="tmp32dll"; } +sub do_rehash_rule { + my ($target, $deps) = @_; + my $ret = <<"EOF"; +$target: $deps + echo off > $target +EOF + return $ret +} +sub do_test_rule { + my ($target, $deps, $test_cmd) = @_; + my $ret = <<"EOF"; +$target: $deps force.$target + set TOP=. + set BIN_D=\$(BIN_D) + set TEST_D=\$(TEST_D) + set PERL=\$(PERL) + \$(PERL) test\\$test_cmd \$(TESTS) +force.$target: +EOF +} + sub do_lib_rule { local($objs,$target,$name,$shlib)=@_; @@ -106,15 +128,19 @@ sub do_lib_rule $ret.="$target: $objs\n"; if (!$shlib) { - # $ret.="\t\$(RM) \$(O_$Name)\n"; - $ret.="\techo LIB $<\n"; - $ret.="\t&\$(MKLIB) $lfile$target -+\$**\n"; + $ret.=<<___; + -\$(RM) $lfile$target + \$(MKLIB) $lfile$target \@&&! ++\$(**: = &^ ++) +! +___ } else { local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; - $ex.=' wsock32.lib gdi32.lib'; - $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; + $ex.=' ws2_32.lib gdi32.lib'; + $ret.="\t\$(LINK_CMD) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; } $ret.="\n"; return($ret); @@ -126,9 +152,9 @@ sub do_link_rule local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; - $n=&bname($targer); + $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; + $ret.="\t\$(LINK_CMD) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; return($ret); }