thread_scheme => "(unknown)", # Assume we don't know
thread_defines => [],
- md5_asm_src => "",
cast_asm_src => "c_enc.c",
rc4_asm_src => "rc4_enc.c rc4_skey.c",
rmd160_asm_src => "",
x86_asm => {
template => 1,
- md5_asm_src => "md5-586.s",
cast_asm_src => "cast-586.s",
sha1_asm_src => "sha1-586.s sha256-586.s sha512-586.s",
rc4_asm_src => "rc4-586.s",
},
x86_64_asm => {
template => 1,
- md5_asm_src => "md5-x86_64.s",
sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s",
rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s",
wp_asm_src => "wp-x86_64.s",
},
sparcv9_asm => {
template => 1,
- md5_asm_src => "md5-sparcv9.S",
sha1_asm_src => "sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S",
cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c cmllt4-sparcv9.S",
modes_asm_src => "ghash-sparcv9.S",
export vars as
accessor functions.
- md5_asm_src => Assembler implementation of core MD5
- functions.
sha1_asm_src => Assembler implementation of core SHA1,
functions, and also possibly SHA256 and
SHA512 ones.
if ($target{rc4_asm_src} ne $table{DEFAULTS}->{rc4_asm_src}) {
push @{$config{lib_defines}}, "RC4_ASM";
}
- if ($target{md5_asm_src}) {
- push @{$config{lib_defines}}, "MD5_ASM";
- }
$target{cast_asm_src}=$table{DEFAULTS}->{cast_asm_src} unless $disabled{pic}; # CAST assembler is not PIC
if ($target{rmd160_asm_src}) {
push @{$config{lib_defines}}, "RMD160_ASM";
"loutflag",
"ex_libs",
"bn_ops",
- "md5_asm_src",
"cast_asm_src",
"sha1_asm_src",
"rc4_asm_src",
LIBS=../../libcrypto
-SOURCE[../../libcrypto]=\
- md5_dgst.c md5_one.c md5_sha1.c {- $target{md5_asm_src} -}
+
+$MD5ASM=
+IF[{- !$disabled{asm} -}]
+ $MD5ASM_x86=md5-586.s
+ $MD5ASM_x86_64=md5-x86_64.s
+ $MD5ASM_sparcv9=md5-sparcv9.S
+
+ # Now that we have defined all the arch specific variables, use the
+ # appropriate one, and define the appropriate macros
+ IF[$MD5ASM_{- $target{asm_arch} -}]
+ $MD5ASM=$MD5ASM_{- $target{asm_arch} -}
+ $MD5DEF=MD5_ASM
+ ENDIF
+ENDIF
+
+SOURCE[../../libcrypto]=md5_dgst.c md5_one.c md5_sha1.c $MD5ASM
+DEFINE[../../libcrypto]=$MD5DEF
GENERATE[md5-586.s]=asm/md5-586.pl \
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS)