1# $FreeBSD$ 2 3.include <bsd.own.mk> 4 5# OpenSSL version used for manual page generation 6OPENSSL_VER= 1.0.1i 7OPENSSL_DATE= 2014-08-06 8 9LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl 10LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc 11 12CFLAGS+= -DTERMIOS -DANSI_SOURCE 13CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR} 14CFLAGS+= -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H 15 16.if ${MACHINE_CPUARCH} == "amd64" 17CFLAGS+=-DL_ENDIAN -DOPENSSL_IA32_SSE2 18CFLAGS+=-DAES_ASM -DBSAES_ASM -DVPAES_ASM 19CFLAGS+=-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m 20CFLAGS+=-DMD5_ASM 21CFLAGS+=-DGHASH_ASM 22CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM 23CFLAGS+=-DWHIRLPOOL_ASM 24.elif ${MACHINE_CPUARCH} == "i386" 25CFLAGS+=-DL_ENDIAN -DOPENSSL_IA32_SSE2 26CFLAGS+=-DAES_ASM -DVPAES_ASM 27CFLAGS+=-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m 28CFLAGS+=-DMD5_ASM 29CFLAGS+=-DGHASH_ASM 30CFLAGS+=-DRMD160_ASM 31CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM 32CFLAGS+=-DWHIRLPOOL_ASM 33.endif 34 35MANDIR= ${SHAREDIR}/openssl/man/man 36 37.if defined(LIB) 38_docs= ${LIB} 39_skip= des_modes 40_sec= 3 41.else 42_docs= apps 43_skip= config 44_sec= 1 45.endif 46 47man-update: 48.for manpage in ${MAN} 49 @(sec=${manpage:E}; \ 50 pod=${manpage:R}.pod; \ 51 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \ 52 pod2man --section=$$sec --release="${OPENSSL_VER}" \ 53 --date="${OPENSSL_DATE}" --center="OpenSSL" \ 54 $$pod > ${.CURDIR}/man/${manpage}; \ 55 rm -f $$pod; \ 56 ${ECHO} ${manpage}) 57.endfor 58 59man-makefile-update: 60 rm -f ${.CURDIR}/Makefile.man 61 echo '# $$'FreeBSD'$$' >> ${.CURDIR}/Makefile.man 62 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \ 63 ${.CURDIR}/Makefile.man 64 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \ 65 fn=`basename $$i .pod`; \ 66 if [ "$$fn" != "${_skip}" ]; then \ 67 ${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \ 68 fi; \ 69 done 70 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \ 71 fn=`basename $$i .pod`; \ 72 if [ "$$fn" != "${_skip}" ]; then \ 73 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \ 74 awk "/^$$fn\$$/ { next; } \ 75 { print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \ 76 ${.CURDIR}/Makefile.man; \ 77 fi; \ 78 done 79