make update
[openssl.git] / util / pl / BC-32.pl
index bd7a9d930140a66c93b19ae2988ef348dad3e13b..fd5c4b63afaa9f1991ccad4ec40c777bfa3130c4 100644 (file)
@@ -18,7 +18,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 +38,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,9 +51,9 @@ $lfile='';
 $shlib_ex_obj="";
 $app_ex_obj="c0x32.obj"; 
 
-$asm='nasmw';
-$asm.=" /Zi" if $debug;
-$afile='-f obj -o';
+$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='';
 $bn_mulw_src='';
@@ -106,14 +106,18 @@ 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';
+               $ex.=' ws2_32.lib gdi32.lib';
                $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n  \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
                }
        $ret.="\n";
@@ -126,7 +130,7 @@ 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";
        return($ret);