2 # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si>
14 $lflags="-ap -Tpe -x -Gn ";
20 #enable max error messages, disable most common warnings
21 $cflags="-DWIN32_LEAN_AND_MEAN -q -w-ccc -w-rch -w-pia -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp -D_strnicmp=strnicmp ";
24 $cflags.="-Od -y -v -vi- -D_DEBUG";
29 $cflags.="-O2 -ff -fp";
41 else { $ex_libs="cw32mt.lib import32.lib crypt32.lib ws2_32.lib"; }
43 # static library stuff
48 $shlibp=($shlib)?
".dll":".lib";
52 $app_ex_obj="c0x32.obj";
54 $asm=(`nasm -v 2>NUL` ge `nasmw -v 2>NUL`?
"nasm":"nasmw")." -f obj -d__omf__";
55 $asm.=" -g" if $debug;
67 $bn_mulw_obj='crypto\bn\asm\bn_win32.obj';
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";
90 $mlflags.=" $lflags /dll";
91 # $cflags =~ s| /MD| /MT|;
92 $lib_cflag=" /GD -D_WINDLL -D_DLL";
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";
110 -\$(RM) $lfile$target
111 \$(MKLIB) $lfile$target \@&&!
119 local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO
)':'';
120 $ex.=' ws2_32
.lib gdi32
.lib
';
121 $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
129 local($target,$files,$dep_libs,$libs)=@_;
132 $file =~ s/\//$o/g if $o ne '/';
134 $ret.="$target: $files $dep_libs\n";
135 $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n";