3 # linux.pl - the standard unix makefile stuff.
14 { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; }
16 { $cflags="-pg -O3"; }
18 { $cflags="-O3 -fomit-frame-pointer"; }
22 $bn_asm_obj='$(OBJ_D)/bn86-elf.o';
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';
26 $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o';
27 $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp';
28 $bf_enc_obj='$(OBJ_D)/bx86-elf.o';
29 $bf_enc_src='crypto/bf/asm/bx86unix.cpp';
30 $cast_enc_obj='$(OBJ_D)/cx86-elf.o';
31 $cast_enc_src='crypto/cast/asm/cx86unix.cpp';
32 $rc4_enc_obj='$(OBJ_D)/rx86-elf.o';
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';
36 $md5_asm_obj='$(OBJ_D)/mx86-elf.o';
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';
40 $sha1_asm_obj='$(OBJ_D)/sx86-elf.o';
41 $sha1_asm_src='crypto/sha/asm/sx86unix.cpp';
42 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS";
45 $cflags.=" -DTERMIO -DL_ENDIAN -m486 -Wall";
49 $shl_cflag=" -DPIC -fpic";
50 $shlibp=".so.$ssl_version";
56 local($obj,$target,$name,$shlib,$so_name)=@_;
59 $target =~ s/\//$o/g if $o ne '/';
60 ($Name=$name) =~ tr/a-z/A-Z/;
62 $ret.="$target: \$(${Name}OBJ)\n";
63 $ret.="\t\$(RM) target\n";
64 $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o $target \$(${Name}OBJ)\n";
65 ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/;
68 $ret.="\t\$(RM) \$(LIB_D)$o$so_name\n";
69 $ret.="\tln -s $target \$(LIB_D)$o$so_name\n\n";
75 local($target,$files,$dep_libs,$libs)=@_;
78 $file =~ s/\//$o/g if $o ne '/';
80 $ret.="$target: $files $dep_libs\n";
81 $ret.="\t\$(LINK_CMD) ${efile}$target \$(LFLAGS) $files $libs\n\n";
87 local($target,$src)=@_;
90 $target =~ s/\//$o/g if $o ne "/";
91 $src =~ s/\//$o/g if $o ne "/";
94 @t=split(/\s+/,$target);
96 for ($i=0; $i<=$#s; $i++)
98 $ret.="$t[$i]: $s[$i]\n";
99 $ret.="\tgcc -E -DELF \$(SRC_D)$o$s[$i]|\$(AS) $afile$t[$i]\n\n";