summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/pl/BC-32.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util/pl/BC-32.pl')
-rw-r--r--src/lib/libcrypto/util/pl/BC-32.pl152
1 files changed, 76 insertions, 76 deletions
diff --git a/src/lib/libcrypto/util/pl/BC-32.pl b/src/lib/libcrypto/util/pl/BC-32.pl
index 3898d16f61..78d60616a6 100644
--- a/src/lib/libcrypto/util/pl/BC-32.pl
+++ b/src/lib/libcrypto/util/pl/BC-32.pl
@@ -1,102 +1,120 @@
1#!/usr/bin/perl 1#!/usr/local/bin/perl
2# VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries 2# Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si>
3# 3#
4 4
5$ssl= "ssleay32";
6$crypto="libeay32";
7
5$o='\\'; 8$o='\\';
6$cp='copy'; 9$cp='copy';
7$rm='del'; 10$rm='del';
8 11
9# C compiler stuff 12# C compiler stuff
10$cc='bcc32'; 13$cc='bcc32';
11 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-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 ";
12if ($debug) 22if ($debug)
13 { $op="-v "; } 23{
14else { $op="-O "; } 24 $cflags.="-Od -y -v -vi- -D_DEBUG";
15 25 $mlflags.=' ';
16$cflags="-d $op -DL_ENDIAN "; 26}
17# I add the stack opt
18$base_lflags="-c";
19$lflags="$base_lflags";
20
21$cflags.=" -DWINDOWS -DWIN32";
22$app_cflag="-WC";
23$lib_cflag="-WC";
24$lflags.=" -Tpe";
25
26if ($shlib)
27 {
28 $mlflags="$base_lflags -Tpe"; # stack if defined in .def file
29 $libs="libw ldllcew";
30 }
31else 27else
32 { $mlflags=''; } 28{
29 $cflags.="-O2 -ff -fp";
30}
33 31
34$obj='.obj'; 32$obj='.obj';
35$ofile="-o"; 33$ofile="-o";
36 34
37# EXE linking stuff 35# EXE linking stuff
38$link="tlink32"; 36$link="ilink32";
39$efile=""; 37$efile="";
40$exep='.exe'; 38$exep='.exe';
41$ex_libs="CW32.LIB IMPORT32.LIB"; 39if ($no_sock)
42$ex_libs.=$no_sock?"":" wsock32.lib"; 40 { $ex_libs=""; }
43$shlib_ex_obj="" if $shlib; 41else { $ex_libs="cw32mt.lib import32.lib"; }
44$app_ex_obj="C0X32.OBJ";
45 42
46# static library stuff 43# static library stuff
47$mklib='tlib'; 44$mklib='tlib /P64';
48$ranlib=''; 45$ranlib='';
49$plib=""; 46$plib="";
50$libp=".lib"; 47$libp=".lib";
51$shlibp=($shlib)?".dll":".lib"; 48$shlibp=($shlib)?".dll":".lib";
52$lfile=''; 49$lfile='';
53 50
54$asm='ml /Cp /c /Cx'; 51$shlib_ex_obj="";
52$app_ex_obj="c0x32.obj";
53
54$asm='n_o_T_a_s_m';
55$asm.=" /Zi" if $debug;
55$afile='/Fo'; 56$afile='/Fo';
56if ($noasm) 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
65if (!$no_asm)
57 { 66 {
58 $bn_mulw_obj=''; 67 $bn_mulw_obj='crypto\bn\asm\bn-win32.obj';
59 $bn_mulw_src=''; 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";
60 } 86 }
61else 87
88if ($shlib)
62 { 89 {
63 $bn_mulw_obj='crypto\bn\asm\x86b32.obj'; 90 $mlflags.=" $lflags /dll";
64 $bn_mulw_src='crypto\bn\asm\x86m32.asm'; 91# $cflags =~ s| /MD| /MT|;
92 $lib_cflag=" /GD -D_WINDLL -D_DLL";
93 $out_def="out32dll";
94 $tmp_def="tmp32dll";
65 } 95 }
66 96
67sub do_lib_rule 97sub do_lib_rule
68 { 98 {
69 local($target,$name,$shlib)=@_; 99 local($objs,$target,$name,$shlib)=@_;
70 local($ret,$Name); 100 local($ret,$Name);
71 101
72 $taget =~ s/\//$o/g if $o ne '/'; 102 $taget =~ s/\//$o/g if $o ne '/';
73 ($Name=$name) =~ tr/a-z/A-Z/; 103 ($Name=$name) =~ tr/a-z/A-Z/;
74 104
75 $ret.="$target: \$(${Name}OBJ)\n"; 105# $target="\$(LIB_D)$o$target";
76 $ret.="\t\$(RM) \$(O_$Name)\n"; 106 $ret.="$target: $objs\n";
77
78 # Due to a pathetic line length limit, I unwrap the args.
79 local($lib_names)="";
80 local($dll_names)="";
81 foreach $_ (sort split(/\s+/,$Vars{"${Name}OBJ"}))
82 {
83 $lib_names.=" +$_ &\n";
84 $dll_names.=" $_\n";
85 }
86
87 if (!$shlib) 107 if (!$shlib)
88 { 108 {
89 $ret.="\t\$(MKLIB) $target & <<|\n$lib_names\n,\n|\n"; 109 # $ret.="\t\$(RM) \$(O_$Name)\n";
110 $ret.="\techo LIB $<\n";
111 $ret.="\t&\$(MKLIB) $lfile$target -+\$**\n";
90 } 112 }
91 else 113 else
92 { 114 {
93 # $(SHLIB_EX_OBJ) 115 local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':'';
94 local($ex)=($Name eq "SSL")?' $(L_CRYPTO) winsock':""; 116 $ex.=' wsock32.lib gdi32.lib';
95 $ret.="\t\$(LINK) \$(MLFLAGS) @&&|\n"; 117 $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
96 $ret.=$dll_names;
97 $ret.="\n $target\n\n $ex $libs\nms$o${name}16.def;\n|\n";
98 ($out_lib=$target) =~ s/O_/L_/;
99 $ret.="\timplib /nowep $out_lib $target\n\n";
100 } 118 }
101 $ret.="\n"; 119 $ret.="\n";
102 return($ret); 120 return($ret);
@@ -105,30 +123,12 @@ sub do_lib_rule
105sub do_link_rule 123sub do_link_rule
106 { 124 {
107 local($target,$files,$dep_libs,$libs)=@_; 125 local($target,$files,$dep_libs,$libs)=@_;
108 local($ret,$f,$_,@f); 126 local($ret,$_);
109 127
110 $file =~ s/\//$o/g if $o ne '/'; 128 $file =~ s/\//$o/g if $o ne '/';
111 $n=&bname($targer); 129 $n=&bname($targer);
112 $ret.="$target: $files $dep_libs\n"; 130 $ret.="$target: $files $dep_libs\n";
113 $ret.=" \$(LINK) @&&|"; 131 $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n";
114
115 # Due to a pathetic line length limit, I have to unwrap the args.
116 $r=" \$(LFLAGS) ";
117 if ($files =~ /\(([^)]*)\)$/)
118 {
119 @a=('$(APP_EX_OBJ)');
120 push(@a,sort split(/\s+/,$Vars{$1}));
121 foreach $_ (@a)
122 {
123 $ret.="\n $r $_ +";
124 $r="";
125 }
126 chop($ret);
127 $ret.="\n";
128 }
129 else
130 { $ret.="\n $r \$(APP_EX_OBJ) $files\n"; }
131 $ret.=" $target\n\n $libs\n\n|\n\n";
132 return($ret); 132 return($ret);
133 } 133 }
134 134