$COMMON=aes_misc.c aes_ecb.c $AESASM
SOURCE[../../libcrypto]=$COMMON aes_cfb.c aes_ofb.c aes_ige.c aes_wrap.c
-DEFINE[../../libcrypto]=$AESDEF
SOURCE[../../providers/libfips.a]=$COMMON
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../../libcrypto]=$AESDEF
DEFINE[../../providers/libfips.a]=$AESDEF
+DEFINE[../../providers/libimplementations.a]=$AESDEF
+# fipsprov.c needs access to AESNI.
+DEFINE[../../providers/fips]=$AESDEF
GENERATE[aes-ia64.s]=asm/aes-ia64.S
bn_const.c bn_x931p.c bn_intern.c bn_dh.c \
bn_rsa_fips186_4.c $BNASM
SOURCE[../../libcrypto]=$COMMON bn_print.c bn_err.c bn_depr.c bn_srp.c
-DEFINE[../../libcrypto]=$BNDEF
SOURCE[../../providers/libfips.a]=$COMMON
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../../libcrypto]=$BNDEF
DEFINE[../../providers/libfips.a]=$BNDEF
+DEFINE[../../providers/libimplementations.a]=$BNDEF
INCLUDE[../../libcrypto]=../../crypto/include
cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \
o_fopen.c getenv.c o_init.c o_fips.c init.c trace.c provider.c \
$UPLINKSRC
-DEFINE[../libcrypto]=$UTIL_DEFINE $UPLINKDEF
SOURCE[../providers/libfips.a]=$UTIL_COMMON
-DEFINE[../providers/libfips.a]=$UTIL_DEFINE
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../libcrypto]=$UTIL_DEFINE $UPLINKDEF
+DEFINE[../providers/libfips.a]=$UTIL_DEFINE
+DEFINE[../providers/fips]=$UTIL_DEFINE
+DEFINE[../providers/libimplementations.a]=$UTIL_DEFINE
DEPEND[info.o]=buildinf.h
DEPEND[cversion.o]=buildinf.h
$ECASM
SOURCE[../../libcrypto]=$COMMON ec_ameth.c ec_pmeth.c ecx_meth.c ec_err.c \
ecdh_kdf.c eck_prn.c
-DEFINE[../../libcrypto]=$ECDEF
SOURCE[../../providers/libfips.a]=$COMMON
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../../libcrypto]=$ECDEF
DEFINE[../../providers/libfips.a]=$ECDEF
+DEFINE[../../providers/libimplementations.a]=$ECDEF
GENERATE[ecp_nistz256-x86.s]=asm/ecp_nistz256-x86.pl
ENDIF
SOURCE[../../libcrypto]=md5_dgst.c md5_one.c md5_sha1.c $MD5ASM
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
DEFINE[../../libcrypto]=$MD5DEF
+DEFINE[../../providers/libimplementations.a]=$MD5DEF
GENERATE[md5-586.s]=asm/md5-586.pl
wrap128.c $MODESASM
SOURCE[../../libcrypto]=$COMMON \
cts128.c ocb128.c siv128.c
+SOURCE[../../providers/libfips.a]=$COMMON
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
DEFINE[../../libcrypto]=$MODESDEF
-SOURCE[../../providers/libfips.a]=$COMMON
DEFINE[../../providers/libfips.a]=$MODESDEF
+DEFINE[../../providers/libimplementations.a]=$MODESDEF
+
INCLUDE[gcm128.o]=..
ENDIF
SOURCE[../../libcrypto]=poly1305_ameth.c poly1305.c $POLY1305ASM
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
DEFINE[../../libcrypto]=$POLY1305DEF
+DEFINE[../providers/libimplementations.a]=$POLY1305DEF
GENERATE[poly1305-sparcv9.S]=asm/poly1305-sparcv9.pl
INCLUDE[poly1305-sparcv9.o]=..
ENDIF
SOURCE[../../libcrypto]=rmd_dgst.c rmd_one.c $RMD160ASM
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules
DEFINE[../../libcrypto]=$RMD160DEF
+DEFINE[../providers/libimplementations.a]=$RMD160DEF
GENERATE[rmd-586.s]=asm/rmd-586.pl
DEPEND[rmd-586.s]=../perlasm/x86asm.pl
$COMMON=sha1dgst.c sha256.c sha512.c sha3.c $SHA1ASM $KECCAK1600ASM
SOURCE[../../libcrypto]=$COMMON sha1_one.c
-DEFINE[../../libcrypto]=$SHA1DEF $KECCAK1600DEF
SOURCE[../../providers/libfips.a]= $COMMON
-DEFINE[../../providers/libfips.a]= $SHA1DEF $KECCAK1600DEF
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
+DEFINE[../../libcrypto]=$SHA1DEF $KECCAK1600DEF
+DEFINE[../../providers/libfips.a]=$SHA1DEF $KECCAK1600DEF
+DEFINE[../../providers/libimplementations.a]=$SHA1DEF $KECCAK1600DEF
GENERATE[sha1-586.s]=asm/sha1-586.pl
DEPEND[sha1-586.s]=../perlasm/x86asm.pl
ENDIF
SOURCE[../../libcrypto]=wp_dgst.c $WPASM
+
+# Implementations are now spread across several libraries, so the defines
+# need to be applied to all affected libraries and modules.
DEFINE[../../libcrypto]=$WPDEF
+DEFINE[../../providers/libimplementations.a]=$WPDEF
GENERATE[wp-mmx.s]=asm/wp-mmx.pl
DEPEND[wp-mmx.s]=../perlasm/x86asm.pl