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.7 2004/12/18 20:53:19 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 \
51 ../fips/fips.h ../fips/rand/fips_rand.h \
61 objects/objects.h objects/obj_mac.h \
62 pem/pem.h pem/pem2.h \
63 pkcs12/pkcs12.h pkcs7/pkcs7.h \
65 rc2/rc2.h rc4/rc4.h rc5/rc5.h \
68 stack/stack.h stack/safestack.h \
71 ui/ui.h ui/ui_compat.h ui/ui_locl.h \
72 x509/x509.h x509/x509_vfy.h x509v3/x509v3.h
74 SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h
75 CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h
79 ( echo "#ifndef MK1MF_BUILD"; \
80 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
81 echo " #define CFLAGS \"$(CC)\""; \
82 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
83 echo " #define DATE \"`LC_ALL=C date`\""; \
84 echo "#endif" ) > ${.TARGET}
86 openssl/opensslconf.h: openssl/.dummy ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h
87 cp ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
89 openssl/evp.h: openssl/.dummy ${LCRYPTO_SRC}/crypto/evp/evp.h
90 .if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
91 sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC:Nopenssl/.dummy} > ${.TARGET}
93 ${INSTALL} -C -m 444 ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
96 SRCS+= ${HDRS:T:S;^;openssl/;}
97 .for h in ${HDRS:S/^/${LCRYPTO_SRC}\/crypto\//}
98 openssl/${h:T}: openssl/.dummy ${h}
99 ${INSTALL} -C -m 444 ${h} openssl
102 # mkdir the required directory as its own target, so multiple
103 # mkdir commands do not race against each other.
107 if [ ! -f ${.TARGET} ]; then touch ${.TARGET}; fi
109 MANDIR= ${SHAREDIR}/openssl/man/man
122 .for manpage in ${MAN}
123 @(sec=${manpage:E}; \
124 pod=${manpage:R}.pod; \
125 cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
126 pod2man --section=$$sec --release="${OSSLVERSION}" --center="OpenSSL" \
127 $$pod > ${.CURDIR}/man/${manpage}; \
133 rm -f ${.CURDIR}/Makefile.man
134 echo '# $$DragonFly: src/secure/lib/libcrypto/Makefile.inc,v 1.7 2004/12/18 20:53:19 asmodai Exp $$' >> ${.CURDIR}/Makefile.man
135 echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
136 ${.CURDIR}/Makefile.man
137 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
138 fn=`basename $$i .pod`; \
139 if [ "$$fn" != "${_skip}" ]; then \
140 ${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \
143 for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
144 fn=`basename $$i .pod`; \
145 if [ "$$fn" != "${_skip}" ]; then \
146 perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
147 awk "/^$$fn\$$/ { next; } \
148 { print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \
149 ${.CURDIR}/Makefile.man; \