1# $FreeBSD$ 2 3.include <bsd.own.mk> 4 5LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl 6LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc 7 8CFLAGS+= -DTERMIOS -DANSI_SOURCE 9CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR} 10CFLAGS+= -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H 11 12.if ${MK_IDEA} == "no" 13CFLAGS+= -DOPENSSL_NO_IDEA 14.endif 15 16.if ${MACHINE_ARCH} == "i386" 17CFLAGS+= -DL_ENDIAN 18.endif 19 20MANDIR= ${SHAREDIR}/openssl/man/man 21 22.if defined(LIB) 23_docs= ${LIB} 24_skip= des_modes 25_sec= 3 26.else 27_docs= apps 28_skip= config 29_sec= 1 30.endif 31 32man-update: 33.for manpage in ${MAN} 34 @(sec=${manpage:E}; \ 35 pod=${manpage:R}.pod; \ 36 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \ 37 pod2man --section=$$sec --release="0.9.8d" --center="OpenSSL" \ 38 $$pod > ${.CURDIR}/man/${manpage}; \ 39 rm -f $$pod; \ 40 ${ECHO} ${manpage}) 41.endfor 42 43man-makefile-update: 44 rm -f ${.CURDIR}/Makefile.man 45 echo '# $$'FreeBSD'$$' >> ${.CURDIR}/Makefile.man 46 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \ 47 ${.CURDIR}/Makefile.man 48 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \ 49 fn=`basename $$i .pod`; \ 50 if [ "$$fn" != "${_skip}" ]; then \ 51 ${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \ 52 fi; \ 53 done 54 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \ 55 fn=`basename $$i .pod`; \ 56 if [ "$$fn" != "${_skip}" ]; then \ 57 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \ 58 awk "/^$$fn\$$/ { next; } \ 59 { print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \ 60 ${.CURDIR}/Makefile.man; \ 61 fi; \ 62 done 63