diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 8b47ad248281..29d563f3232d 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -13,8 +13,16 @@ CFLAGS+= -DTERMIOS -DANSI_SOURCE CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR} CFLAGS+= -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H +.include + +.if ${TARGET_ENDIANNESS} == 1234 +CFLAGS+=-DL_ENDIAN +.elif ${TARGET_ENDIANNESS} == 4321 +CFLAGS+=-DB_ENDIAN +.endif + .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+=-DL_ENDIAN -DOPENSSL_IA32_SSE2 +CFLAGS+=-DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DBSAES_ASM -DVPAES_ASM CFLAGS+=-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DMD5_ASM @@ -22,7 +30,7 @@ CFLAGS+=-DGHASH_ASM CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM CFLAGS+=-DWHIRLPOOL_ASM .elif ${MACHINE_CPUARCH} == "i386" -CFLAGS+=-DL_ENDIAN -DOPENSSL_IA32_SSE2 +CFLAGS+=-DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DVPAES_ASM CFLAGS+=-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DMD5_ASM