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 $
5 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl
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 CFLAGS+= -DOPENSSL_NO_GMP
13 CFLAGS+= -DOPENSSL_NO_CMS
14 CFLAGS+= -DOPENSSL_NO_JPAKE
16 .if !defined(WANT_IDEA)
17 CFLAGS+= -DOPENSSL_NO_IDEA
22 .if ${MACHINE_ARCH} == "i386"
27 ../e_os.h ../e_os2.h \
35 aes/aes.h aes/aes_locl.h \
36 asn1/asn1.h asn1/asn1_mac.h asn1/asn1t.h \
44 conf/conf.h conf/conf_api.h \
45 des/des.h des/des_old.h \
52 engine/eng_int.h engine/engine.h \
63 objects/objects.h objects/obj_mac.h \
64 pem/pem.h pem/pem2.h \
65 pkcs12/pkcs12.h pkcs7/pkcs7.h \
66 pqueue/pqueue.h pqueue/pq_compat.h \
68 rc2/rc2.h rc4/rc4.h rc5/rc5.h \
71 stack/stack.h stack/safestack.h \
75 ui/ui.h ui/ui_compat.h ui/ui_locl.h \
76 x509/x509.h x509/x509_vfy.h x509v3/x509v3.h
79 dtls1.h kssl.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h
81 HDRS+= ${CRYTPO_HDRS:S,^,crypto/,} \
84 SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h
85 CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h
89 ( echo "#ifndef MK1MF_BUILD"; \
90 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
91 echo " #define CFLAGS \"$(CC)\""; \
92 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
93 echo " #define DATE \"`LC_ALL=C date`\""; \
94 echo "#endif" ) > ${.TARGET}
96 openssl/opensslconf.h: openssl/.dummy ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h
97 .if defined(WANT_IDEA)
98 sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC:Nopenssl/.dummy} > ${.TARGET}
100 cp ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
103 openssl/evp.h: openssl/.dummy ${LCRYPTO_SRC}/crypto/evp/evp.h
104 cp ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
106 SRCS+= ${HDRS:T:S;^;openssl/;}
107 .for h in ${HDRS:S,^,${LCRYPTO_SRC}/,}
108 openssl/${h:T}: openssl/.dummy ${h}
112 # mkdir the required directory as its own target, so multiple
113 # mkdir commands do not race against each other.
117 if [ ! -f ${.TARGET} ]; then touch ${.TARGET}; fi
119 MANDIR= ${SHAREDIR}/openssl/man/man
130 .for manpage in ${MAN}
131 @(sec=${manpage:E}; \
132 pod=${manpage:R}.pod; \
133 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
134 pod2man --section=$$sec --release="${OSSLVERSION}" --center="OpenSSL" \
135 $$pod > ${.CURDIR}/man/${manpage}; \
141 rm -f ${.CURDIR}/Makefile.man
142 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
143 ${.CURDIR}/Makefile.man
144 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
145 fn=`basename $$i .pod`; \
146 sec=`perl ${LCRYPTO_SRC}/util/extract-section.pl < $$i`; \
147 sec=$${sec:-${_sec}}; \
148 ${ECHO} "MAN+= $$fn.$$sec" >> ${.CURDIR}/Makefile.man; \
149 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
150 sed -Ee "/^$$fn\$$/d;s/^(.*)/MLINKS+= $$fn.$$sec \1.$$sec/" >> \
151 ${.CURDIR}/Makefile.man; \