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.10 2005/12/03 14:06:13 corecode Exp $
5 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl-0.9
6 LCRYPTO_DOC= ${LCRYPTO_SRC}/doc
8 CFLAGS+= -DTERMIOS -DANSI_SOURCE
9 CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto \
10 -I${LCRYPTO_SRC}/crypto/engine -I${.OBJDIR}
12 .if !defined(WANT_IDEA)
13 CFLAGS+= -DOPENSSL_NO_IDEA
18 .if ${MACHINE_ARCH} == "i386"
23 ../e_os.h ../e_os2.h \
30 aes/aes.h aes/aes_locl.h \
31 asn1/asn1.h asn1/asn1_mac.h asn1/asn1t.h \
38 conf/conf.h conf/conf_api.h \
39 des/des.h des/des_old.h \
46 engine/eng_int.h engine/engine.h \
57 objects/objects.h objects/obj_mac.h \
58 pem/pem.h pem/pem2.h \
59 pkcs12/pkcs12.h pkcs7/pkcs7.h \
60 pqueue/pqueue.h pqueue/pq_compat.h \
62 rc2/rc2.h rc4/rc4.h rc5/rc5.h \
65 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(WANT_IDEA)
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
118 .for manpage in ${MAN}
119 @(sec=${manpage:E}; \
120 pod=${manpage:R}.pod; \
121 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
122 pod2man --section=$$sec --release="${OSSLVERSION}" --center="OpenSSL" \
123 $$pod > ${.CURDIR}/man/${manpage}; \
129 rm -f ${.CURDIR}/Makefile.man
130 echo '# $$''DragonFly$$' >> ${.CURDIR}/Makefile.man
131 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
132 ${.CURDIR}/Makefile.man
133 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
134 fn=`basename $$i .pod`; \
135 sec=`perl ${LCRYPTO_SRC}/util/extract-section.pl < $$i`; \
136 sec=$${sec:-${_sec}}; \
137 ${ECHO} "MAN+= $$fn.$$sec" >> ${.CURDIR}/Makefile.man; \
138 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
139 sed -Ee "/^$$fn\$$/d;s/^(.*)/MLINKS+= $$fn.$$sec \1.$$sec/" >> \
140 ${.CURDIR}/Makefile.man; \