LIBS=../../libcrypto
-SOURCE[../../libcrypto]=\
- rmd_dgst.c rmd_one.c {- $target{rmd160_asm_src} -}
+
+$RMD160ASM=
+IF[{- !$disabled{asm} -}]
+ $RMD160ASM_x86=rmd-586.s
+
+ # Now that we have defined all the arch specific variables, use the
+ # appropriate one, and define the appropriate macros
+ IF[$RMD160ASM_{- $target{asm_arch} -}]
+ $RMD160ASM=$RMD160ASM_{- $target{asm_arch} -}
+ $RMD160DEF=RMD160_ASM
+ ENDIF
+ENDIF
+
+SOURCE[../../libcrypto]=rmd_dgst.c rmd_one.c $RMD160ASM
+DEFINE[../../libcrypto]=$RMD160DEF
GENERATE[rmd-586.s]=asm/rmd-586.pl \
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS)