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-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 CFLAGS+= -DOPENSSL_NO_GMP
13 CFLAGS+= -DOPENSSL_NO_CMS
15 .if !defined(WANT_IDEA)
16 CFLAGS+= -DOPENSSL_NO_IDEA
21 .if ${MACHINE_ARCH} == "i386"
26 ../e_os.h ../e_os2.h \
33 aes/aes.h aes/aes_locl.h \
34 asn1/asn1.h asn1/asn1_mac.h asn1/asn1t.h \
42 conf/conf.h conf/conf_api.h \
43 des/des.h des/des_old.h \
50 engine/eng_int.h engine/engine.h \
61 objects/objects.h objects/obj_mac.h \
62 pem/pem.h pem/pem2.h \
63 pkcs12/pkcs12.h pkcs7/pkcs7.h \
64 pqueue/pqueue.h pqueue/pq_compat.h \
66 rc2/rc2.h rc4/rc4.h rc5/rc5.h \
69 stack/stack.h stack/safestack.h \
73 ui/ui.h ui/ui_compat.h ui/ui_locl.h \
74 x509/x509.h x509/x509_vfy.h x509v3/x509v3.h
77 dtls1.h kssl.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h
79 HDRS+= ${CRYTPO_HDRS:S,^,crypto/,} \
82 SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h
83 CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h
87 ( echo "#ifndef MK1MF_BUILD"; \
88 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
89 echo " #define CFLAGS \"$(CC)\""; \
90 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
91 echo " #define DATE \"`LC_ALL=C date`\""; \
92 echo "#endif" ) > ${.TARGET}
94 openssl/opensslconf.h: openssl/.dummy ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h
95 cp ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
97 openssl/evp.h: openssl/.dummy ${LCRYPTO_SRC}/crypto/evp/evp.h
98 .if !defined(WANT_IDEA)
99 sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC:Nopenssl/.dummy} > ${.TARGET}
101 ${INSTALL} -C -m 444 ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
104 SRCS+= ${HDRS:T:S;^;openssl/;}
105 .for h in ${HDRS:S,^,${LCRYPTO_SRC}/,}
106 openssl/${h:T}: openssl/.dummy ${h}
107 ${INSTALL} -C -m 444 ${h} openssl
110 # mkdir the required directory as its own target, so multiple
111 # mkdir commands do not race against each other.
115 if [ ! -f ${.TARGET} ]; then touch ${.TARGET}; fi
117 MANDIR= ${SHAREDIR}/openssl/man/man
128 .for manpage in ${MAN}
129 @(sec=${manpage:E}; \
130 pod=${manpage:R}.pod; \
131 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
132 pod2man --section=$$sec --release="${OSSLVERSION}" --center="OpenSSL" \
133 $$pod > ${.CURDIR}/man/${manpage}; \
139 rm -f ${.CURDIR}/Makefile.man
140 echo '# $$''DragonFly$$' >> ${.CURDIR}/Makefile.man
141 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
142 ${.CURDIR}/Makefile.man
143 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
144 fn=`basename $$i .pod`; \
145 sec=`perl ${LCRYPTO_SRC}/util/extract-section.pl < $$i`; \
146 sec=$${sec:-${_sec}}; \
147 ${ECHO} "MAN+= $$fn.$$sec" >> ${.CURDIR}/Makefile.man; \
148 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
149 sed -Ee "/^$$fn\$$/d;s/^(.*)/MLINKS+= $$fn.$$sec \1.$$sec/" >> \
150 ${.CURDIR}/Makefile.man; \