
ASM_X86_64_MACOSX = aes/aes-macosx-x86_64.S
ASM_X86_64_MACOSX += aes/aesni-macosx-x86_64.S
ASM_X86_64_MACOSX += bn/modexp512-macosx-x86_64.S
ASM_X86_64_MACOSX += bn/mont-macosx-x86_64.S
ASM_X86_64_MACOSX += bn/mont5-macosx-x86_64.S
ASM_X86_64_MACOSX += modes/ghash-macosx-x86_64.S
ASM_X86_64_MACOSX += rc4/rc4-macosx-x86_64.S

ASM_X86_64_MACOSX += bn/arch/amd64/bignum_add.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmadd.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmul.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_modadd.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_modsub.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_6_12.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_6_12_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_6_12.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_6_12_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sub.S
ASM_X86_64_MACOSX += bn/arch/amd64/word_clz.S

EXTRA_DIST += $(ASM_X86_64_MACOSX)

if HOST_ASM_MACOSX_X86_64
libcrypto_la_SOURCES += aes/aes_amd64.c
libcrypto_la_SOURCES += bn/arch/amd64/bn_arch.c
libcrypto_la_SOURCES += modes/gcm128_amd64.c

libcrypto_la_CPPFLAGS += -DLIBRESSL_USE_AES_ASSEMBLY
libcrypto_la_CPPFLAGS += -DLIBRESSL_USE_BN_ASSEMBLY
libcrypto_la_CPPFLAGS += -DLIBRESSL_USE_GCM_ASSEMBLY
libcrypto_la_CPPFLAGS += -DLIBRESSL_USE_RC4_ASSEMBLY

libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT
libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5

libcrypto_la_SOURCES += $(ASM_X86_64_MACOSX)
endif
