summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/pl
diff options
context:
space:
mode:
authormarkus <>2002-09-05 12:51:52 +0000
committermarkus <>2002-09-05 12:51:52 +0000
commit5514995a9d5ed91db089875adb509c7781357c0e (patch)
tree2484410a46ba6c05ef94c253da36fbceef990b64 /src/lib/libcrypto/util/pl
parentfd9566423b542798f5c8b06e68101a9ea5bb9885 (diff)
downloadopenbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.gz
openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.bz2
openbsd-5514995a9d5ed91db089875adb509c7781357c0e.zip
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/util/pl')
-rw-r--r--src/lib/libcrypto/util/pl/BC-16.pl18
-rw-r--r--src/lib/libcrypto/util/pl/BC-32.pl152
-rw-r--r--src/lib/libcrypto/util/pl/Mingw32.pl43
-rw-r--r--src/lib/libcrypto/util/pl/VC-16.pl17
-rw-r--r--src/lib/libcrypto/util/pl/VC-32.pl41
-rw-r--r--src/lib/libcrypto/util/pl/linux.pl20
-rw-r--r--src/lib/libcrypto/util/pl/unix.pl23
7 files changed, 183 insertions, 131 deletions
diff --git a/src/lib/libcrypto/util/pl/BC-16.pl b/src/lib/libcrypto/util/pl/BC-16.pl
index 7c3fdb68f4..2033f524ca 100644
--- a/src/lib/libcrypto/util/pl/BC-16.pl
+++ b/src/lib/libcrypto/util/pl/BC-16.pl
@@ -1,4 +1,4 @@
1#!/usr/bin/perl 1#!/usr/local/bin/perl
2# VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries 2# VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries
3# 3#
4 4
@@ -21,14 +21,14 @@ $lflags="$base_lflags";
21if ($win16) 21if ($win16)
22 { 22 {
23 $shlib=1; 23 $shlib=1;
24 $cflags.=" -DWINDOWS -DWIN16"; 24 $cflags.=" -DOPENSSL_SYSNAME_WIN16";
25 $app_cflag="-W"; 25 $app_cflag="-W";
26 $lib_cflag="-WD"; 26 $lib_cflag="-WD";
27 $lflags.="/Twe"; 27 $lflags.="/Twe";
28 } 28 }
29else 29else
30 { 30 {
31 $cflags.=" -DMSDOS"; 31 $cflags.=" -DOENSSL_SYSNAME_MSDOS";
32 $lflags.=" /Tde"; 32 $lflags.=" /Tde";
33 } 33 }
34 34
@@ -66,18 +66,18 @@ $asm='bcc -c -B -Tml';
66$afile='/o'; 66$afile='/o';
67if ($no_asm) 67if ($no_asm)
68 { 68 {
69 $bn_mulw_obj=''; 69 $bn_asm_obj='';
70 $bn_mulw_src=''; 70 $bn_asm_src='';
71 } 71 }
72elsif ($asmbits == 32) 72elsif ($asmbits == 32)
73 { 73 {
74 $bn_mulw_obj='crypto\bn\asm\x86w32.obj'; 74 $bn_asm_obj='crypto\bn\asm\x86w32.obj';
75 $bn_mulw_src='crypto\bn\asm\x86w32.asm'; 75 $bn_asm_src='crypto\bn\asm\x86w32.asm';
76 } 76 }
77else 77else
78 { 78 {
79 $bn_mulw_obj='crypto\bn\asm\x86w16.obj'; 79 $bn_asm_obj='crypto\bn\asm\x86w16.obj';
80 $bn_mulw_src='crypto\bn\asm\x86w16.asm'; 80 $bn_asm_src='crypto\bn\asm\x86w16.asm';
81 } 81 }
82 82
83sub do_lib_rule 83sub do_lib_rule
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
diff --git a/src/lib/libcrypto/util/pl/Mingw32.pl b/src/lib/libcrypto/util/pl/Mingw32.pl
index 84c2a22db3..45ab685974 100644
--- a/src/lib/libcrypto/util/pl/Mingw32.pl
+++ b/src/lib/libcrypto/util/pl/Mingw32.pl
@@ -17,9 +17,35 @@ $mkdir='gmkdir';
17 17
18$cc='gcc'; 18$cc='gcc';
19if ($debug) 19if ($debug)
20 { $cflags="-g2 -ggdb"; } 20 { $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; }
21else 21else
22 { $cflags="-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall"; } 22 { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -m486 -Wall"; }
23
24if ($gaswin and !$no_asm)
25 {
26 $bn_asm_obj='$(OBJ_D)/bn-win32.o';
27 $bn_asm_src='crypto/bn/asm/bn-win32.s';
28 $bnco_asm_obj='$(OBJ_D)/co-win32.o';
29 $bnco_asm_src='crypto/bn/asm/co-win32.s';
30 $des_enc_obj='$(OBJ_D)/d-win32.o $(OBJ_D)/y-win32.o';
31 $des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s';
32 $bf_enc_obj='$(OBJ_D)/b-win32.o';
33 $bf_enc_src='crypto/bf/asm/b-win32.s';
34# $cast_enc_obj='$(OBJ_D)/c-win32.o';
35# $cast_enc_src='crypto/cast/asm/c-win32.s';
36 $rc4_enc_obj='$(OBJ_D)/r4-win32.o';
37 $rc4_enc_src='crypto/rc4/asm/r4-win32.s';
38 $rc5_enc_obj='$(OBJ_D)/r5-win32.o';
39 $rc5_enc_src='crypto/rc5/asm/r5-win32.s';
40 $md5_asm_obj='$(OBJ_D)/m5-win32.o';
41 $md5_asm_src='crypto/md5/asm/m5-win32.s';
42 $rmd160_asm_obj='$(OBJ_D)/rm-win32.o';
43 $rmd160_asm_src='crypto/ripemd/asm/rm-win32.s';
44 $sha1_asm_obj='$(OBJ_D)/s1-win32.o';
45 $sha1_asm_src='crypto/sha/asm/s1-win32.s';
46 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM";
47 }
48
23 49
24$obj='.o'; 50$obj='.o';
25$ofile='-o '; 51$ofile='-o ';
@@ -42,12 +68,12 @@ $lfile='';
42 68
43$asm='as'; 69$asm='as';
44$afile='-o '; 70$afile='-o ';
45$bn_asm_obj=""; 71#$bn_asm_obj="";
46$bn_asm_src=""; 72#$bn_asm_src="";
47$des_enc_obj=""; 73#$des_enc_obj="";
48$des_enc_src=""; 74#$des_enc_src="";
49$bf_enc_obj=""; 75#$bf_enc_obj="";
50$bf_enc_src=""; 76#$bf_enc_src="";
51 77
52sub do_lib_rule 78sub do_lib_rule
53 { 79 {
@@ -76,4 +102,3 @@ sub do_link_rule
76 return($ret); 102 return($ret);
77 } 103 }
781; 1041;
79
diff --git a/src/lib/libcrypto/util/pl/VC-16.pl b/src/lib/libcrypto/util/pl/VC-16.pl
index a6e6c0241c..7cda5e67a9 100644
--- a/src/lib/libcrypto/util/pl/VC-16.pl
+++ b/src/lib/libcrypto/util/pl/VC-16.pl
@@ -1,10 +1,9 @@
1#!/usr/bin/perl 1#!/usr/local/bin/perl
2# VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries 2# VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries
3# 3#
4 4
5$ssl= "ssleay16"; 5$ssl= "ssleay16";
6$crypto="libeay16"; 6$crypto="libeay16";
7$RSAref="RSAref16";
8 7
9$o='\\'; 8$o='\\';
10$cp='copy'; 9$cp='copy';
@@ -34,7 +33,7 @@ $lflags="$base_lflags /STACK:20000";
34 33
35if ($win16) 34if ($win16)
36 { 35 {
37 $cflags.=" -DWINDOWS -DWIN16"; 36 $cflags.=" -DOPENSSL_SYSNAME_WIN16";
38 $app_cflag="/Gw /FPi87"; 37 $app_cflag="/Gw /FPi87";
39 $lib_cflag="/Gw"; 38 $lib_cflag="/Gw";
40 $lib_cflag.=" -D_WINDLL -D_DLL" if $shlib; 39 $lib_cflag.=" -D_WINDLL -D_DLL" if $shlib;
@@ -84,8 +83,8 @@ $lfile='';
84$asm='ml /Cp /c /Cx'; 83$asm='ml /Cp /c /Cx';
85$afile='/Fo'; 84$afile='/Fo';
86 85
87$bn_mulw_obj=''; 86$bn_asm_obj='';
88$bn_mulw_src=''; 87$bn_asm_src='';
89$des_enc_obj=''; 88$des_enc_obj='';
90$des_enc_src=''; 89$des_enc_src='';
91$bf_enc_obj=''; 90$bf_enc_obj='';
@@ -95,13 +94,13 @@ if (!$no_asm)
95 { 94 {
96 if ($asmbits == 32) 95 if ($asmbits == 32)
97 { 96 {
98 $bn_mulw_obj='crypto\bn\asm\x86w32.obj'; 97 $bn_asm_obj='crypto\bn\asm\x86w32.obj';
99 $bn_mulw_src='crypto\bn\asm\x86w32.asm'; 98 $bn_asm_src='crypto\bn\asm\x86w32.asm';
100 } 99 }
101 else 100 else
102 { 101 {
103 $bn_mulw_obj='crypto\bn\asm\x86w16.obj'; 102 $bn_asm_obj='crypto\bn\asm\x86w16.obj';
104 $bn_mulw_src='crypto\bn\asm\x86w16.asm'; 103 $bn_asm_src='crypto\bn\asm\x86w16.asm';
105 } 104 }
106 } 105 }
107 106
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl
index 701e282c33..50bfb34385 100644
--- a/src/lib/libcrypto/util/pl/VC-32.pl
+++ b/src/lib/libcrypto/util/pl/VC-32.pl
@@ -1,18 +1,17 @@
1#!/usr/bin/perl 1#!/usr/local/bin/perl
2# VCw32lib.pl - the file for Visual C++ 4.[01] for windows NT, static libraries 2# VCw32lib.pl - the file for Visual C++ 4.[01] for windows NT, static libraries
3# 3#
4 4
5$ssl= "ssleay32"; 5$ssl= "ssleay32";
6$crypto="libeay32"; 6$crypto="libeay32";
7$RSAref="RSAref32";
8 7
9$o='\\'; 8$o='\\';
10$cp='copy'; 9$cp='copy nul+'; # Timestamps get stuffed otherwise
11$rm='del'; 10$rm='del';
12 11
13# C compiler stuff 12# C compiler stuff
14$cc='cl'; 13$cc='cl';
15$cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN'; 14$cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32';
16$lflags="/nologo /subsystem:console /machine:I386 /opt:ref"; 15$lflags="/nologo /subsystem:console /machine:I386 /opt:ref";
17$mlflags=''; 16$mlflags='';
18 17
@@ -22,10 +21,11 @@ $inc_def="inc32";
22 21
23if ($debug) 22if ($debug)
24 { 23 {
25 $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWINDOWS -DWIN32 -D_DEBUG -DL_ENDIAN"; 24 $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DOPENSSL_SYSNAME_WIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG -DDSO_WIN32";
26 $lflags.=" /debug"; 25 $lflags.=" /debug";
27 $mlflags.=' /debug'; 26 $mlflags.=' /debug';
28 } 27 }
28$cflags .= " -DOPENSSL_SYSNAME_WINNT" if $NT == 1;
29 29
30$obj='.obj'; 30$obj='.obj';
31$ofile="/Fo"; 31$ofile="/Fo";
@@ -48,13 +48,17 @@ $lfile='/out:';
48 48
49$shlib_ex_obj=""; 49$shlib_ex_obj="";
50$app_ex_obj="setargv.obj"; 50$app_ex_obj="setargv.obj";
51 51if ($nasm) {
52$asm='ml /Cp /coff /c /Cx'; 52 $asm='nasmw -f win32';
53$asm.=" /Zi" if $debug; 53 $afile='-o ';
54$afile='/Fo'; 54} else {
55 55 $asm='ml /Cp /coff /c /Cx';
56$bn_mulw_obj=''; 56 $asm.=" /Zi" if $debug;
57$bn_mulw_src=''; 57 $afile='/Fo';
58}
59
60$bn_asm_obj='';
61$bn_asm_src='';
58$des_enc_obj=''; 62$des_enc_obj='';
59$des_enc_src=''; 63$des_enc_src='';
60$bf_enc_obj=''; 64$bf_enc_obj='';
@@ -62,8 +66,8 @@ $bf_enc_src='';
62 66
63if (!$no_asm) 67if (!$no_asm)
64 { 68 {
65 $bn_mulw_obj='crypto\bn\asm\bn-win32.obj'; 69 $bn_asm_obj='crypto\bn\asm\bn-win32.obj';
66 $bn_mulw_src='crypto\bn\asm\bn-win32.asm'; 70 $bn_asm_src='crypto\bn\asm\bn-win32.asm';
67 $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; 71 $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj';
68 $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; 72 $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm';
69 $bf_enc_obj='crypto\bf\asm\b-win32.obj'; 73 $bf_enc_obj='crypto\bf\asm\b-win32.obj';
@@ -87,11 +91,13 @@ if ($shlib)
87 { 91 {
88 $mlflags.=" $lflags /dll"; 92 $mlflags.=" $lflags /dll";
89# $cflags =~ s| /MD| /MT|; 93# $cflags =~ s| /MD| /MT|;
90 $lib_cflag=" /GD -D_WINDLL -D_DLL"; 94 $lib_cflag=" -D_WINDLL -D_DLL";
91 $out_def="out32dll"; 95 $out_def="out32dll";
92 $tmp_def="tmp32dll"; 96 $tmp_def="tmp32dll";
93 } 97 }
94 98
99$cflags.=" /Fd$out_def";
100
95sub do_lib_rule 101sub do_lib_rule
96 { 102 {
97 local($objs,$target,$name,$shlib)=@_; 103 local($objs,$target,$name,$shlib)=@_;
@@ -105,12 +111,13 @@ sub do_lib_rule
105 if (!$shlib) 111 if (!$shlib)
106 { 112 {
107# $ret.="\t\$(RM) \$(O_$Name)\n"; 113# $ret.="\t\$(RM) \$(O_$Name)\n";
108 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs\n<<\n"; 114 $ex =' advapi32.lib';
115 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs $ex\n<<\n";
109 } 116 }
110 else 117 else
111 { 118 {
112 local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; 119 local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':'';
113 $ex.=' wsock32.lib gdi32.lib'; 120 $ex.=' wsock32.lib gdi32.lib advapi32.lib';
114 $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; 121 $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
115 } 122 }
116 $ret.="\n"; 123 $ret.="\n";
diff --git a/src/lib/libcrypto/util/pl/linux.pl b/src/lib/libcrypto/util/pl/linux.pl
index 2b13da1bfc..8924ed5480 100644
--- a/src/lib/libcrypto/util/pl/linux.pl
+++ b/src/lib/libcrypto/util/pl/linux.pl
@@ -1,4 +1,4 @@
1#!/usr/bin/perl 1#!/usr/local/bin/perl
2# 2#
3# linux.pl - the standard unix makefile stuff. 3# linux.pl - the standard unix makefile stuff.
4# 4#
@@ -12,13 +12,17 @@ $rm='/bin/rm -f';
12$cc='gcc'; 12$cc='gcc';
13if ($debug) 13if ($debug)
14 { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; } 14 { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; }
15elsif ($profile)
16 { $cflags="-pg -O3"; }
15else 17else
16 { $cflags="-O3 -fomit-frame-pointer"; } 18 { $cflags="-O3 -fomit-frame-pointer"; }
17 19
18if (!$no_asm) 20if (!$no_asm)
19 { 21 {
20 $bn_mulw_obj='$(OBJ_D)/bn86-elf.o'; 22 $bn_asm_obj='$(OBJ_D)/bn86-elf.o';
21 $bn_mulw_src='crypto/bn/asm/bn86unix.cpp'; 23 $bn_asm_src='crypto/bn/asm/bn86unix.cpp';
24 $bnco_asm_obj='$(OBJ_D)/co86-elf.o';
25 $bnco_asm_src='crypto/bn/asm/co86unix.cpp';
22 $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; 26 $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o';
23 $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; 27 $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp';
24 $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; 28 $bf_enc_obj='$(OBJ_D)/bx86-elf.o';
@@ -27,8 +31,12 @@ if (!$no_asm)
27 $cast_enc_src='crypto/cast/asm/cx86unix.cpp'; 31 $cast_enc_src='crypto/cast/asm/cx86unix.cpp';
28 $rc4_enc_obj='$(OBJ_D)/rx86-elf.o'; 32 $rc4_enc_obj='$(OBJ_D)/rx86-elf.o';
29 $rc4_enc_src='crypto/rc4/asm/rx86unix.cpp'; 33 $rc4_enc_src='crypto/rc4/asm/rx86unix.cpp';
34 $rc5_enc_obj='$(OBJ_D)/r586-elf.o';
35 $rc5_enc_src='crypto/rc5/asm/r586unix.cpp';
30 $md5_asm_obj='$(OBJ_D)/mx86-elf.o'; 36 $md5_asm_obj='$(OBJ_D)/mx86-elf.o';
31 $md5_asm_src='crypto/md5/asm/mx86unix.cpp'; 37 $md5_asm_src='crypto/md5/asm/mx86unix.cpp';
38 $rmd160_asm_obj='$(OBJ_D)/rm86-elf.o';
39 $rmd160_asm_src='crypto/ripemd/asm/rm86unix.cpp';
32 $sha1_asm_obj='$(OBJ_D)/sx86-elf.o'; 40 $sha1_asm_obj='$(OBJ_D)/sx86-elf.o';
33 $sha1_asm_src='crypto/sha/asm/sx86unix.cpp'; 41 $sha1_asm_src='crypto/sha/asm/sx86unix.cpp';
34 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; 42 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM";
@@ -51,9 +59,9 @@ sub do_shlib_rule
51 $target =~ s/\//$o/g if $o ne '/'; 59 $target =~ s/\//$o/g if $o ne '/';
52 ($Name=$name) =~ tr/a-z/A-Z/; 60 ($Name=$name) =~ tr/a-z/A-Z/;
53 61
54 $ret.="\$(LIB_D)$o$target: \$(${Name}OBJ)\n"; 62 $ret.="$target: \$(${Name}OBJ)\n";
55 $ret.="\t\$(RM) \$(LIB_D)$o$target\n"; 63 $ret.="\t\$(RM) target\n";
56 $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o \$(LIB_D)$o$target \$(${Name}OBJ)\n"; 64 $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o $target \$(${Name}OBJ)\n";
57 ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/; 65 ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/;
58 if ($so_name ne "") 66 if ($so_name ne "")
59 { 67 {
diff --git a/src/lib/libcrypto/util/pl/unix.pl b/src/lib/libcrypto/util/pl/unix.pl
index ab4978fd20..146611ad99 100644
--- a/src/lib/libcrypto/util/pl/unix.pl
+++ b/src/lib/libcrypto/util/pl/unix.pl
@@ -1,4 +1,4 @@
1#!/usr/bin/perl 1#!/usr/local/bin/perl
2# 2#
3# unix.pl - the standard unix makefile stuff. 3# unix.pl - the standard unix makefile stuff.
4# 4#
@@ -38,7 +38,7 @@ $ex_libs="";
38# static library stuff 38# static library stuff
39$mklib='ar r'; 39$mklib='ar r';
40$mlflags=''; 40$mlflags='';
41$ranlib='util/ranlib.sh'; 41$ranlib=&which("ranlib") or $ranlib="true";
42$plib='lib'; 42$plib='lib';
43$libp=".a"; 43$libp=".a";
44$shlibp=".a"; 44$shlibp=".a";
@@ -46,8 +46,8 @@ $lfile='';
46 46
47$asm='as'; 47$asm='as';
48$afile='-o '; 48$afile='-o ';
49$bn_mulw_obj=""; 49$bn_asm_obj="";
50$bn_mulw_src=""; 50$bn_asm_src="";
51$des_enc_obj=""; 51$des_enc_obj="";
52$des_enc_src=""; 52$des_enc_src="";
53$bf_enc_obj=""; 53$bf_enc_obj="";
@@ -59,7 +59,7 @@ sub do_lib_rule
59 local($ret,$_,$Name); 59 local($ret,$_,$Name);
60 60
61 $target =~ s/\//$o/g if $o ne '/'; 61 $target =~ s/\//$o/g if $o ne '/';
62 $target="\$(LIB_D)$o$target"; 62 $target="$target";
63 ($Name=$name) =~ tr/a-z/A-Z/; 63 ($Name=$name) =~ tr/a-z/A-Z/;
64 64
65 $ret.="$target: \$(${Name}OBJ)\n"; 65 $ret.="$target: \$(${Name}OBJ)\n";
@@ -80,4 +80,17 @@ sub do_link_rule
80 return($ret); 80 return($ret);
81 } 81 }
82 82
83sub which
84 {
85 my ($name)=@_;
86 my $path;
87 foreach $path (split /:/, $ENV{PATH})
88 {
89 if (-x "$path/$name")
90 {
91 return "$path/$name";
92 }
93 }
94 }
95
831; 961;