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.5 2004/03/23 07:47:14 dillon Exp $
4 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl
5 LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc
7 CFLAGS+= -DTERMIOS -DANSI_SOURCE
8 CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto \
9 -I${LCRYPTO_SRC}/crypto/engine -I${.OBJDIR}
11 .if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
12 CFLAGS+= -DOPENSSL_NO_IDEA
17 .if ${MACHINE_ARCH} == "i386"
19 .elif ${MACHINE_ARCH} == "alpha"
20 # no ENDIAN stuff defined for alpha (64-bit)
24 ../e_os.h ../e_os2.h \
31 aes/aes.h aes/aes_locl.h \
32 asn1/asn1.h asn1/asn1_mac.h asn1/asn1t.h \
39 conf/conf.h conf/conf_api.h \
40 des/des.h des/des_old.h \
45 engine/eng_int.h engine/engine.h engine/hw_4758_cca_err.h \
46 engine/hw_aep_err.h engine/hw_atalla_err.h engine/hw_cswift_err.h \
47 engine/hw_ncipher_err.h engine/hw_nuron_err.h engine/hw_sureware_err.h \
48 engine/hw_ubsec_err.h \
59 objects/objects.h objects/obj_mac.h \
60 pem/pem.h pem/pem2.h \
61 pkcs12/pkcs12.h pkcs7/pkcs7.h \
63 rc2/rc2.h rc4/rc4.h rc5/rc5.h \
66 stack/stack.h stack/safestack.h \
69 ui/ui.h ui/ui_compat.h ui/ui_locl.h \
70 x509/x509.h x509/x509_vfy.h x509v3/x509v3.h
72 SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h
73 CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h
77 ( echo "#ifndef MK1MF_BUILD"; \
78 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
79 echo " #define CFLAGS \"$(CC)\""; \
80 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
81 echo " #define DATE \"`LC_ALL=C date`\""; \
82 echo "#endif" ) > ${.TARGET}
84 openssl/opensslconf.h: openssl/.dummy ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h
85 cp ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
87 openssl/evp.h: openssl/.dummy ${LCRYPTO_SRC}/crypto/evp/evp.h
88 .if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
89 sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC:Nopenssl/.dummy} > ${.TARGET}
91 ${INSTALL} -C -m 444 ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
94 SRCS+= ${HDRS:T:S;^;openssl/;}
95 .for h in ${HDRS:S/^/${LCRYPTO_SRC}\/crypto\//}
96 openssl/${h:T}: openssl/.dummy ${h}
97 ${INSTALL} -C -m 444 ${h} openssl
100 # mkdir the required directory as its own target, so multiple
101 # mkdir commands do not race against each other.
105 if [ ! -f ${.TARGET} ]; then touch ${.TARGET}; fi
107 MANDIR= ${SHAREDIR}/openssl/man/man
120 .for manpage in ${MAN}
121 @(sec=${manpage:E}; \
122 pod=${manpage:R}.pod; \
123 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
124 pod2man --section=$$sec --release="0.9.7a" --center="OpenSSL" \
125 $$pod > ${.CURDIR}/man/${manpage}; \
131 rm -f ${.CURDIR}/Makefile.man
132 echo '# $$FreeBSD: src/secure/lib/libcrypto/Makefile.inc,v 1.7.2.11 2003/02/20 15:07:32 nectar Exp $$' >> ${.CURDIR}/Makefile.man
133 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
134 ${.CURDIR}/Makefile.man
135 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
136 fn=`basename $$i .pod`; \
137 if [ "$$fn" != "${_skip}" ]; then \
138 ${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \
141 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
142 fn=`basename $$i .pod`; \
143 if [ "$$fn" != "${_skip}" ]; then \
144 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
145 awk "/^$$fn\$$/ { next; } \
146 { print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \
147 ${.CURDIR}/Makefile.man; \