6db607c7b28ee95d61d3a2f60bad9732bfa035a1
[dragonfly.git] / secure / lib / libcrypto / Makefile.inc
1 # $FreeBSD: src/secure/lib/libcrypto/Makefile.inc,v 1.7.2.11 2003/02/20 15:07:32 nectar Exp $
2 # $DragonFly: src/secure/lib/libcrypto/Makefile.inc,v 1.18 2008/09/27 21:04:45 pavalos Exp $
3
4 OSSLVERSION=    0.9.8m
5 LCRYPTO_SRC=    ${.CURDIR}/../../../crypto/openssl
6 LCRYPTO_DOC=    ${LCRYPTO_SRC}/doc
7
8 CFLAGS+=        -DTERMIOS -DANSI_SOURCE -DL_ENDIAN
9 CFLAGS+=        -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto \
10                 -I${LCRYPTO_SRC}/crypto/engine -I${.OBJDIR}
11
12 MANDIR= ${SHAREDIR}/openssl/man/man
13
14 .if defined(LIB)
15 _docs=  ${LIB}
16 _sec=   3
17 .else
18 _docs=  apps
19 _sec=   1
20 .endif
21
22 man-update:
23 .for manpage in ${MAN}
24         @(sec=${manpage:E}; \
25         pod=${manpage:R}.pod; \
26         cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
27         pod2man --section=$$sec --release="${OSSLVERSION}" --center="OpenSSL" \
28           $$pod > ${.CURDIR}/man/${manpage}; \
29         rm $$pod; \
30         ${ECHO} ${manpage})
31 .endfor
32
33 man-makefile-update:
34         rm -f ${.CURDIR}/Makefile.man
35         echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
36             ${.CURDIR}/Makefile.man
37         for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
38                 fn=`basename $$i .pod`; \
39                 sec=`perl ${LCRYPTO_SRC}/util/extract-section.pl < $$i`; \
40                 sec=$${sec:-${_sec}}; \
41                 ${ECHO} "MAN+= $$fn.$$sec" >> ${.CURDIR}/Makefile.man; \
42                 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
43                   sed -Ee "/^$$fn\$$/d;s/^(.*)/MLINKS+= $$fn.$$sec \1.$$sec/" >> \
44                     ${.CURDIR}/Makefile.man; \
45         done