summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/pl/VC-32.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util/pl/VC-32.pl')
-rw-r--r--src/lib/libcrypto/util/pl/VC-32.pl41
1 files changed, 24 insertions, 17 deletions
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";