2000-01-14 05:49:29 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2010-04-01 15:35:29 +00:00
|
|
|
# OpenSSL version used for manual page generation
|
2020-04-21 19:38:32 +00:00
|
|
|
OPENSSL_VER= 1.1.1g
|
|
|
|
OPENSSL_DATE= 2020-04-21
|
2010-04-01 15:35:29 +00:00
|
|
|
|
2017-03-04 11:35:30 +00:00
|
|
|
LCRYPTO_SRC= ${SRCTOP}/crypto/openssl
|
2015-11-06 17:39:17 +00:00
|
|
|
LCRYPTO_DOC= ${LCRYPTO_SRC}/doc
|
2003-01-28 22:58:14 +00:00
|
|
|
|
2015-11-06 17:39:17 +00:00
|
|
|
CFLAGS+= -I${LCRYPTO_SRC}
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -I${LCRYPTO_SRC}/crypto/include
|
|
|
|
CFLAGS+= -I${LCRYPTO_SRC}/include
|
2003-01-28 22:58:14 +00:00
|
|
|
|
2015-10-28 22:49:37 +00:00
|
|
|
.include <bsd.endian.mk>
|
|
|
|
|
|
|
|
.if ${TARGET_ENDIANNESS} == 1234
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DL_ENDIAN
|
2015-10-28 22:49:37 +00:00
|
|
|
.elif ${TARGET_ENDIANNESS} == 4321
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DB_ENDIAN
|
2015-10-28 22:49:37 +00:00
|
|
|
.endif
|
|
|
|
|
2018-10-01 18:16:36 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
|
|
|
|
${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386"
|
2016-10-26 20:02:22 +00:00
|
|
|
ASM_${MACHINE_CPUARCH}=
|
2016-08-17 22:13:39 +00:00
|
|
|
.endif
|
|
|
|
|
2018-09-19 00:07:09 +00:00
|
|
|
.if defined(ASM_${MACHINE_CPUARCH})
|
|
|
|
CFLAGS+= -DOPENSSL_CPUID_OBJ
|
2016-10-26 20:02:22 +00:00
|
|
|
.if defined(ASM_aarch64)
|
2018-09-22 05:59:43 +00:00
|
|
|
CFLAGS+= -DOPENSSL_BN_ASM_MONT
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
|
2018-09-22 05:16:06 +00:00
|
|
|
CFLAGS+= -DKECCAK1600_ASM
|
|
|
|
CFLAGS+= -DVPAES_ASM
|
|
|
|
CFLAGS+= -DECP_NISTZ256_ASM
|
|
|
|
CFLAGS+= -DPOLY1305_ASM
|
2016-10-26 20:02:22 +00:00
|
|
|
.elif defined(ASM_amd64)
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DOPENSSL_IA32_SSE2
|
2018-09-22 05:16:06 +00:00
|
|
|
CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
|
|
|
|
CFLAGS+= -DOPENSSL_BN_ASM_GF2m
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
|
|
|
|
CFLAGS+= -DKECCAK1600_ASM
|
|
|
|
CFLAGS+= -DRC4_ASM
|
|
|
|
CFLAGS+= -DMD5_ASM
|
2019-09-10 21:08:17 +00:00
|
|
|
CFLAGS+= -DVPAES_ASM
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DGHASH_ASM
|
2018-09-20 22:47:55 +00:00
|
|
|
CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM
|
|
|
|
CFLAGS+= -DPADLOCK_ASM
|
|
|
|
CFLAGS+= -DPOLY1305_ASM
|
2018-09-22 05:16:06 +00:00
|
|
|
.elif defined(ASM_arm)
|
2018-09-22 05:59:43 +00:00
|
|
|
CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
|
2018-09-22 05:16:06 +00:00
|
|
|
CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
|
|
|
|
CFLAGS+= -DKECCAK1600_ASM
|
2019-09-10 21:08:17 +00:00
|
|
|
CFLAGS+= -DBSAES_ASM
|
2018-09-22 05:16:06 +00:00
|
|
|
CFLAGS+= -DGHASH_ASM
|
|
|
|
CFLAGS+= -DECP_NISTZ256_ASM
|
|
|
|
CFLAGS+= -DPOLY1305_ASM
|
2018-09-20 22:47:55 +00:00
|
|
|
.elif defined(ASM_i386)
|
|
|
|
CFLAGS+= -DOPENSSL_IA32_SSE2
|
|
|
|
CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT
|
|
|
|
CFLAGS+= -DOPENSSL_BN_ASM_GF2m
|
|
|
|
CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
|
|
|
|
CFLAGS+= -DRC4_ASM
|
|
|
|
CFLAGS+= -DMD5_ASM
|
|
|
|
CFLAGS+= -DRMD160_ASM
|
2019-09-10 21:08:17 +00:00
|
|
|
CFLAGS+= -DVPAES_ASM
|
2018-09-20 22:47:55 +00:00
|
|
|
CFLAGS+= -DWHIRLPOOL_ASM
|
|
|
|
CFLAGS+= -DGHASH_ASM
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DECP_NISTZ256_ASM
|
|
|
|
CFLAGS+= -DPADLOCK_ASM
|
|
|
|
CFLAGS+= -DPOLY1305_ASM
|
|
|
|
.endif
|
2000-01-14 05:49:29 +00:00
|
|
|
.endif
|
2003-02-10 19:57:56 +00:00
|
|
|
|
|
|
|
.if defined(LIB)
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\""
|
2020-06-01 18:58:09 +00:00
|
|
|
CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines\""
|
2003-02-10 19:57:56 +00:00
|
|
|
.endif
|
|
|
|
|
2018-09-19 00:07:09 +00:00
|
|
|
CFLAGS+= -DNDEBUG
|
2003-02-10 19:57:56 +00:00
|
|
|
|
2018-09-19 00:07:09 +00:00
|
|
|
MANDIR= ${SHAREDIR}/openssl/man/man
|