3 # OS2-EMX.pl - for EMX GCC on OS/2
10 $preamble = "SHELL=sh\n";
15 $cflags="-DL_ENDIAN -O3 -fomit-frame-pointer -m486 -Zmtd -Wall ";
16 $cflags.="-Zomf " if $shlib;
23 $obj=$shlib ?
'.obj' : '.o';
28 $lflags='${CFLAGS} -Zbsd-signals -s';
33 # static library stuff
38 $libp=$shlib ?
".lib" : ".a";
39 $shlibp=$shlib ?
".dll" : ".a";
42 $asm=$shlib ?
'as -Zomf' : 'as';
53 $bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj";
54 $bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm";
55 $des_enc_obj="crypto/des/asm/d-os2$obj crypto/des/asm/y-os2$obj";
56 $des_enc_src="crypto/des/asm/d-os2.asm crypto/des/asm/y-os2.asm";
57 $bf_enc_obj="crypto/bf/asm/b-os2$obj";
58 $bf_enc_src="crypto/bf/asm/b-os2.asm";
59 $cast_enc_obj="crypto/cast/asm/c-os2$obj";
60 $cast_enc_src="crypto/cast/asm/c-os2.asm";
61 $rc4_enc_obj="crypto/rc4/asm/r4-os2$obj";
62 $rc4_enc_src="crypto/rc4/asm/r4-os2.asm";
63 $rc5_enc_obj="crypto/rc5/asm/r5-os2$obj";
64 $rc5_enc_src="crypto/rc5/asm/r5-os2.asm";
65 $md5_asm_obj="crypto/md5/asm/m5-os2$obj";
66 $md5_asm_src="crypto/md5/asm/m5-os2.asm";
67 $sha1_asm_obj="crypto/sha/asm/s1-os2$obj";
68 $sha1_asm_src="crypto/sha/asm/s1-os2.asm";
69 $rmd160_asm_obj="crypto/ripemd/asm/rm-os2$obj";
70 $rmd160_asm_src="crypto/ripemd/asm/rm-os2.asm";
71 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS";
76 $mlflags.=" $lflags -Zdll";
84 local($obj,$target,$name,$shlib)=@_;
87 $target =~ s/\//$o/g if $o ne '/';
89 ($Name=$name) =~ tr/a-z/A-Z/;
91 $ret.="$target: \$(${Name}OBJ)\n";
94 $ret.="\t\$(RM) $target\n";
95 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
96 $ret.="\t\$(RANLIB) $target\n\n";
100 local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO
)':'';
102 $ret.="\t\$(LINK) \$(SHLIB_CFLAGS) \$(MLFLAGS) $efile$target \$(SHLIB_EX_OBJ) \$(${Name}OBJ) $ex os2/${Name}.def\n";
103 $ret.="\temximp -o $out_def/$name.a os2/${Name}.def\n";
104 $ret.="\temximp -o $out_def/$name.lib os2/${Name}.def\n\n";
110 local($target,$files,$dep_libs,$libs)=@_;
113 $file =~ s/\//$o/g if $o ne '/';
115 $ret.="$target: $files $dep_libs\n";
116 $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n\n";