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.12 2006/09/06 17:10:26 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 \
39 conf/conf.h conf/conf_api.h \
40 des/des.h des/des_old.h \
47 engine/eng_int.h engine/engine.h \
58 objects/objects.h objects/obj_mac.h \
59 pem/pem.h pem/pem2.h \
60 pkcs12/pkcs12.h pkcs7/pkcs7.h \
61 pqueue/pqueue.h pqueue/pq_compat.h \
63 rc2/rc2.h rc4/rc4.h rc5/rc5.h \
66 stack/stack.h stack/safestack.h \
70 ui/ui.h ui/ui_compat.h ui/ui_locl.h \
71 x509/x509.h x509/x509_vfy.h x509v3/x509v3.h
74 dtls1.h kssl.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h
76 HDRS+= ${CRYTPO_HDRS:S,^,crypto/,} \
79 SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h
80 CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h
84 ( echo "#ifndef MK1MF_BUILD"; \
85 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
86 echo " #define CFLAGS \"$(CC)\""; \
87 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
88 echo " #define DATE \"`LC_ALL=C date`\""; \
89 echo "#endif" ) > ${.TARGET}
91 openssl/opensslconf.h: openssl/.dummy ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h
92 cp ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
94 openssl/evp.h: openssl/.dummy ${LCRYPTO_SRC}/crypto/evp/evp.h
95 .if !defined(WANT_IDEA)
96 sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC:Nopenssl/.dummy} > ${.TARGET}
98 ${INSTALL} -C -m 444 ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
101 SRCS+= ${HDRS:T:S;^;openssl/;}
102 .for h in ${HDRS:S,^,${LCRYPTO_SRC}/,}
103 openssl/${h:T}: openssl/.dummy ${h}
104 ${INSTALL} -C -m 444 ${h} openssl
107 # mkdir the required directory as its own target, so multiple
108 # mkdir commands do not race against each other.
112 if [ ! -f ${.TARGET} ]; then touch ${.TARGET}; fi
114 MANDIR= ${SHAREDIR}/openssl/man/man
125 .for manpage in ${MAN}
126 @(sec=${manpage:E}; \
127 pod=${manpage:R}.pod; \
128 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
129 pod2man --section=$$sec --release="${OSSLVERSION}" --center="OpenSSL" \
130 $$pod > ${.CURDIR}/man/${manpage}; \
136 rm -f ${.CURDIR}/Makefile.man
137 echo '# $$''DragonFly$$' >> ${.CURDIR}/Makefile.man
138 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
139 ${.CURDIR}/Makefile.man
140 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
141 fn=`basename $$i .pod`; \
142 sec=`perl ${LCRYPTO_SRC}/util/extract-section.pl < $$i`; \
143 sec=$${sec:-${_sec}}; \
144 ${ECHO} "MAN+= $$fn.$$sec" >> ${.CURDIR}/Makefile.man; \
145 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
146 sed -Ee "/^$$fn\$$/d;s/^(.*)/MLINKS+= $$fn.$$sec \1.$$sec/" >> \
147 ${.CURDIR}/Makefile.man; \