Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git] / crypto / openssl / util / pl / Mingw32.pl
blob6ea51794ac872a55ee372a20b9e8553a1598e2d5
1 #!/usr/local/bin/perl
2 # $FreeBSD$
4 # Mingw32.pl -- Mingw
7 $o='/';
8 $cp='cp';
9 $rm='rm -f';
10 $mkdir='gmkdir';
12 $o='\\';
13 $cp='copy';
14 $rm='del';
15 $mkdir='mkdir';
17 # C compiler stuff
19 $cc='gcc';
20 if ($debug)
21 { $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; }
22 else
23 { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -march=i486 -Wall"; }
25 if ($gaswin and !$no_asm)
27 $bn_asm_obj='$(OBJ_D)\bn-win32.o';
28 $bn_asm_src='crypto/bn/asm/bn-win32.s';
29 $bnco_asm_obj='$(OBJ_D)\co-win32.o';
30 $bnco_asm_src='crypto/bn/asm/co-win32.s';
31 $des_enc_obj='$(OBJ_D)\d-win32.o $(OBJ_D)\y-win32.o';
32 $des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s';
33 $bf_enc_obj='$(OBJ_D)\b-win32.o';
34 $bf_enc_src='crypto/bf/asm/b-win32.s';
35 # $cast_enc_obj='$(OBJ_D)\c-win32.o';
36 # $cast_enc_src='crypto/cast/asm/c-win32.s';
37 $rc4_enc_obj='$(OBJ_D)\r4-win32.o';
38 $rc4_enc_src='crypto/rc4/asm/r4-win32.s';
39 $rc5_enc_obj='$(OBJ_D)\r5-win32.o';
40 $rc5_enc_src='crypto/rc5/asm/r5-win32.s';
41 $md5_asm_obj='$(OBJ_D)\m5-win32.o';
42 $md5_asm_src='crypto/md5/asm/m5-win32.s';
43 $rmd160_asm_obj='$(OBJ_D)\rm-win32.o';
44 $rmd160_asm_src='crypto/ripemd/asm/rm-win32.s';
45 $sha1_asm_obj='$(OBJ_D)\s1-win32.o';
46 $sha1_asm_src='crypto/sha/asm/s1-win32.s';
47 $cpuid_asm_obj='$(OBJ_D)\cpu-win32.o';
48 $cpuid_asm_src='crypto/cpu-win32.s';
49 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS";
53 $obj='.o';
54 $ofile='-o ';
56 # EXE linking stuff
57 $link='${CC}';
58 $lflags='${CFLAGS}';
59 $efile='-o ';
60 $exep='';
61 $ex_libs="-lwsock32 -lgdi32";
63 # static library stuff
64 $mklib='ar r';
65 $mlflags='';
66 $ranlib='ranlib';
67 $plib='lib';
68 $libp=".a";
69 $shlibp=".a";
70 $lfile='';
72 $asm='as';
73 $afile='-o ';
74 #$bn_asm_obj="";
75 #$bn_asm_src="";
76 #$des_enc_obj="";
77 #$des_enc_src="";
78 #$bf_enc_obj="";
79 #$bf_enc_src="";
81 sub do_lib_rule
83 local($obj,$target,$name,$shlib)=@_;
84 local($ret,$_,$Name);
86 $target =~ s/\//$o/g if $o ne '/';
87 $target="$target";
88 ($Name=$name) =~ tr/a-z/A-Z/;
90 $ret.="$target: \$(${Name}OBJ)\n";
91 $ret.="\tif exist $target \$(RM) $target\n";
92 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
93 $ret.="\t\$(RANLIB) $target\n\n";
96 sub do_link_rule
98 local($target,$files,$dep_libs,$libs)=@_;
99 local($ret,$_);
101 $file =~ s/\//$o/g if $o ne '/';
102 $n=&bname($target);
103 $ret.="$target: $files $dep_libs\n";
104 $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n";
105 return($ret);