c6fdf6b07d72d18da0cc8cf827290848bcabeabd
[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=    1.0.1
5 OSSLDATE=       2012-03-14
6 LCRYPTO_SRC=    ${.CURDIR}/../../../crypto/openssl
7 LCRYPTO_DOC=    ${LCRYPTO_SRC}/doc
8
9 CFLAGS+=        -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIOS
10 CFLAGS+=        -DOPENSSL_THREADS
11 CFLAGS+=        -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT \
12                 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM \
13                 -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM \
14                 -DWHIRLPOOL_ASM -DGHASH_ASM
15 .if ${MACHINE_ARCH} == "i386"
16 CFLAGS+=        -DOPENSSL_BN_ASM_PART_WORDS -DRMD160_ASM
17 .elif ${MACHINE_ARCH} == "x86_64"
18 CFLAGS+=        -DOPENSSL_BN_ASM_MONT5 -DBSAES_ASM
19 .endif
20 CFLAGS+=        -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto \
21                 -I${LCRYPTO_SRC}/crypto/asn1 -I${LCRYPTO_SRC}/crypto/evp \
22                 -I${LCRYPTO_SRC}/crypto/modes \
23                 -I${LCRYPTO_SRC}/crypto/engine -I${.OBJDIR}
24
25 MANDIR= ${SHAREDIR}/openssl/man/man
26
27 .if defined(LIB)
28 _docs=  ${LIB}
29 _sec=   3
30 .else
31 _docs=  apps
32 _sec=   1
33 .endif
34
35 man-update:
36 .for manpage in ${MAN}
37         @(sec=${manpage:E}; \
38         pod=${manpage:R}.pod; \
39         cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
40         pod2man --section=$$sec --release="${OSSLVERSION}" \
41           --date="${OSSLDATE}" --center="OpenSSL" \
42           $$pod > ${.CURDIR}/man/${manpage}; \
43         rm $$pod; \
44         ${ECHO} ${manpage})
45 .endfor
46
47 man-makefile-update:
48         rm -f ${.CURDIR}/Makefile.man
49         echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
50             ${.CURDIR}/Makefile.man
51         for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
52                 fn=`basename $$i .pod`; \
53                 sec=`perl ${LCRYPTO_SRC}/util/extract-section.pl < $$i`; \
54                 sec=$${sec:-${_sec}}; \
55                 ${ECHO} "MAN+= $$fn.$$sec" >> ${.CURDIR}/Makefile.man; \
56                 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
57                   sed -Ee "/^$$fn\$$/d;s/^(.*)/MLINKS+= $$fn.$$sec \1.$$sec/" >> \
58                     ${.CURDIR}/Makefile.man; \
59         done