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
|
2013-02-13 23:07:20 +00:00
|
|
|
OPENSSL_VER= 1.0.1e
|
|
|
|
OPENSSL_DATE= 2013-02-11
|
2010-04-01 15:35:29 +00:00
|
|
|
|
2003-01-28 22:58:14 +00:00
|
|
|
LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl
|
|
|
|
LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc
|
|
|
|
|
2003-02-09 14:59:56 +00:00
|
|
|
CFLAGS+= -DTERMIOS -DANSI_SOURCE
|
2003-01-28 22:58:14 +00:00
|
|
|
CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR}
|
2006-07-17 11:47:35 +00:00
|
|
|
CFLAGS+= -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H
|
2003-01-28 22:58:14 +00:00
|
|
|
|
2012-07-12 19:30:53 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
|
|
|
CFLAGS+=-DL_ENDIAN -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
|
2012-07-12 21:31:53 +00:00
|
|
|
CFLAGS+=-DGHASH_ASM
|
2012-07-12 19:30:53 +00:00
|
|
|
CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
|
2012-07-12 21:31:53 +00:00
|
|
|
CFLAGS+=-DWHIRLPOOL_ASM
|
2012-07-12 19:30:53 +00:00
|
|
|
.elif ${MACHINE_CPUARCH} == "i386"
|
|
|
|
CFLAGS+=-DL_ENDIAN -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
|
2012-07-12 21:31:53 +00:00
|
|
|
CFLAGS+=-DGHASH_ASM
|
2012-07-12 19:30:53 +00:00
|
|
|
CFLAGS+=-DRMD160_ASM
|
|
|
|
CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
|
2012-07-12 21:31:53 +00:00
|
|
|
CFLAGS+=-DWHIRLPOOL_ASM
|
2000-01-14 05:49:29 +00:00
|
|
|
.endif
|
|
|
|
|
2003-02-10 19:57:56 +00:00
|
|
|
MANDIR= ${SHAREDIR}/openssl/man/man
|
|
|
|
|
|
|
|
.if defined(LIB)
|
|
|
|
_docs= ${LIB}
|
|
|
|
_skip= des_modes
|
|
|
|
_sec= 3
|
|
|
|
.else
|
|
|
|
_docs= apps
|
|
|
|
_skip= config
|
|
|
|
_sec= 1
|
|
|
|
.endif
|
|
|
|
|
2003-01-28 22:58:14 +00:00
|
|
|
man-update:
|
2003-02-10 19:57:56 +00:00
|
|
|
.for manpage in ${MAN}
|
|
|
|
@(sec=${manpage:E}; \
|
|
|
|
pod=${manpage:R}.pod; \
|
|
|
|
cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
|
2010-04-01 15:35:29 +00:00
|
|
|
pod2man --section=$$sec --release="${OPENSSL_VER}" \
|
|
|
|
--date="${OPENSSL_DATE}" --center="OpenSSL" \
|
2003-02-10 19:57:56 +00:00
|
|
|
$$pod > ${.CURDIR}/man/${manpage}; \
|
2006-07-29 19:41:41 +00:00
|
|
|
rm -f $$pod; \
|
2003-02-10 19:57:56 +00:00
|
|
|
${ECHO} ${manpage})
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
man-makefile-update:
|
|
|
|
rm -f ${.CURDIR}/Makefile.man
|
2005-02-25 06:04:12 +00:00
|
|
|
echo '# $$'FreeBSD'$$' >> ${.CURDIR}/Makefile.man
|
2003-02-10 19:57:56 +00:00
|
|
|
echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
|
|
|
|
${.CURDIR}/Makefile.man
|
|
|
|
for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
|
|
|
if [ "$$fn" != "${_skip}" ]; then \
|
|
|
|
${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
|
|
|
if [ "$$fn" != "${_skip}" ]; then \
|
|
|
|
perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
|
|
|
|
awk "/^$$fn\$$/ { next; } \
|
|
|
|
{ print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \
|
|
|
|
${.CURDIR}/Makefile.man; \
|
|
|
|
fi; \
|
2003-01-28 22:58:14 +00:00
|
|
|
done
|