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.6 2004/09/02 08:57:05 asmodai Exp $
5 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl-${OSSLVERSION}
6 LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl-${OSSLVERSION}/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(MAKE_IDEA) || ${MAKE_IDEA} != YES
13 CFLAGS+= -DOPENSSL_NO_IDEA
18 .if ${MACHINE_ARCH} == "i386"
20 .elif ${MACHINE_ARCH} == "alpha"
21 # no ENDIAN stuff defined for alpha (64-bit)
25 ../e_os.h ../e_os2.h \
32 aes/aes.h aes/aes_locl.h \
33 asn1/asn1.h asn1/asn1_mac.h asn1/asn1t.h \
40 conf/conf.h conf/conf_api.h \
41 des/des.h des/des_old.h \
46 engine/eng_int.h engine/engine.h engine/hw_4758_cca_err.h \
47 engine/hw_aep_err.h engine/hw_atalla_err.h engine/hw_cswift_err.h \
48 engine/hw_ncipher_err.h engine/hw_nuron_err.h engine/hw_sureware_err.h \
49 engine/hw_ubsec_err.h \
60 objects/objects.h objects/obj_mac.h \
61 pem/pem.h pem/pem2.h \
62 pkcs12/pkcs12.h pkcs7/pkcs7.h \
64 rc2/rc2.h rc4/rc4.h rc5/rc5.h \
67 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
73 SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h
74 CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h
78 ( echo "#ifndef MK1MF_BUILD"; \
79 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
80 echo " #define CFLAGS \"$(CC)\""; \
81 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
82 echo " #define DATE \"`LC_ALL=C date`\""; \
83 echo "#endif" ) > ${.TARGET}
85 openssl/opensslconf.h: openssl/.dummy ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h
86 cp ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
88 openssl/evp.h: openssl/.dummy ${LCRYPTO_SRC}/crypto/evp/evp.h
89 .if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
90 sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC:Nopenssl/.dummy} > ${.TARGET}
92 ${INSTALL} -C -m 444 ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
95 SRCS+= ${HDRS:T:S;^;openssl/;}
96 .for h in ${HDRS:S/^/${LCRYPTO_SRC}\/crypto\//}
97 openssl/${h:T}: openssl/.dummy ${h}
98 ${INSTALL} -C -m 444 ${h} openssl
101 # mkdir the required directory as its own target, so multiple
102 # mkdir commands do not race against each other.
106 if [ ! -f ${.TARGET} ]; then touch ${.TARGET}; fi
108 MANDIR= ${SHAREDIR}/openssl/man/man
121 .for manpage in ${MAN}
122 @(sec=${manpage:E}; \
123 pod=${manpage:R}.pod; \
124 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
125 pod2man --section=$$sec --release="${OSSLVERSION}" --center="OpenSSL" \
126 $$pod > ${.CURDIR}/man/${manpage}; \
132 rm -f ${.CURDIR}/Makefile.man
133 echo '# $$DragonFly: src/secure/lib/libcrypto/Makefile.inc,v 1.6 2004/09/02 08:57:05 asmodai Exp $$' >> ${.CURDIR}/Makefile.man
134 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
135 ${.CURDIR}/Makefile.man
136 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
137 fn=`basename $$i .pod`; \
138 if [ "$$fn" != "${_skip}" ]; then \
139 ${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \
142 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
143 fn=`basename $$i .pod`; \
144 if [ "$$fn" != "${_skip}" ]; then \
145 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
146 awk "/^$$fn\$$/ { next; } \
147 { print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \
148 ${.CURDIR}/Makefile.man; \