1406dc7a7df91030d8517844fb7c862d803ede88
[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
9 CFLAGS+=        -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto \
10                 -I${LCRYPTO_SRC}/crypto/engine -I${.OBJDIR}
11
12 CFLAGS+=        -DOPENSSL_NO_GMP
13 CFLAGS+=        -DOPENSSL_NO_CMS
14 CFLAGS+=        -DOPENSSL_NO_JPAKE
15
16 .if !defined(WANT_IDEA)
17 CFLAGS+=        -DOPENSSL_NO_IDEA
18 .endif
19
20 .if ${MACHINE_ARCH} == "i386"
21 CFLAGS+= -DL_ENDIAN
22 .endif
23
24 MANDIR= ${SHAREDIR}/openssl/man/man
25
26 .if defined(LIB)
27 _docs=  ${LIB}
28 _sec=   3
29 .else
30 _docs=  apps
31 _sec=   1
32 .endif
33
34 man-update:
35 .for manpage in ${MAN}
36         @(sec=${manpage:E}; \
37         pod=${manpage:R}.pod; \
38         cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
39         pod2man --section=$$sec --release="${OSSLVERSION}" --center="OpenSSL" \
40           $$pod > ${.CURDIR}/man/${manpage}; \
41         rm $$pod; \
42         ${ECHO} ${manpage})
43 .endfor
44
45 man-makefile-update:
46         rm -f ${.CURDIR}/Makefile.man
47         echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
48             ${.CURDIR}/Makefile.man
49         for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
50                 fn=`basename $$i .pod`; \
51                 sec=`perl ${LCRYPTO_SRC}/util/extract-section.pl < $$i`; \
52                 sec=$${sec:-${_sec}}; \
53                 ${ECHO} "MAN+= $$fn.$$sec" >> ${.CURDIR}/Makefile.man; \
54                 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
55                   sed -Ee "/^$$fn\$$/d;s/^(.*)/MLINKS+= $$fn.$$sec \1.$$sec/" >> \
56                     ${.CURDIR}/Makefile.man; \
57         done