2 # VCw32lib.pl - the file for Visual C++ 4.[01] for windows NT, static libraries
10 $cp='copy nul+'; # Timestamps get stuffed otherwise
15 $cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN';
16 $lflags="/nologo /subsystem:console /machine:I386 /opt:ref";
25 $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWINDOWS -DWIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG";
39 else { $ex_libs="wsock32.lib user32.lib gdi32.lib"; }
41 # static library stuff
46 $shlibp=($shlib)?".dll":".lib";
50 $app_ex_obj="setargv.obj";
52 $asm='ml /Cp /coff /c /Cx';
53 $asm.=" /Zi" if $debug;
65 $bn_asm_obj='crypto\bn\asm\bn-win32.obj';
66 $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';
68 $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';
70 $bf_enc_src='crypto\bf\asm\b-win32.asm';
71 $cast_enc_obj='crypto\cast\asm\c-win32.obj';
72 $cast_enc_src='crypto\cast\asm\c-win32.asm';
73 $rc4_enc_obj='crypto\rc4\asm\r4-win32.obj';
74 $rc4_enc_src='crypto\rc4\asm\r4-win32.asm';
75 $rc5_enc_obj='crypto\rc5\asm\r5-win32.obj';
76 $rc5_enc_src='crypto\rc5\asm\r5-win32.asm';
77 $md5_asm_obj='crypto\md5\asm\m5-win32.obj';
78 $md5_asm_src='crypto\md5\asm\m5-win32.asm';
79 $sha1_asm_obj='crypto\sha\asm\s1-win32.obj';
80 $sha1_asm_src='crypto\sha\asm\s1-win32.asm';
81 $rmd160_asm_obj='crypto\ripemd\asm\rm-win32.obj';
82 $rmd160_asm_src='crypto\ripemd\asm\rm-win32.asm';
83 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM";
88 $mlflags.=" $lflags /dll";
89 # $cflags =~ s| /MD| /MT|;
90 $lib_cflag=" /GD -D_WINDLL -D_DLL";
95 $cflags.=" /Fd$out_def";
99 local($objs,$target,$name,$shlib)=@_;
102 $taget =~ s/\//$o/g if $o ne '/';
103 ($Name=$name) =~ tr/a-z/A-Z/;
105 # $target="\$(LIB_D)$o$target";
106 $ret.="$target: $objs\n";
109 # $ret.="\t\$(RM) \$(O_$Name)\n";
110 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs\n<<\n";
114 local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':'';
115 $ex.=' wsock32.lib gdi32.lib';
116 $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
124 local($target,$files,$dep_libs,$libs)=@_;
127 $file =~ s/\//$o/g if $o ne '/';
129 $ret.="$target: $files $dep_libs\n";
130 $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n";
131 $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n";