2000-01-14 05:49:29 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2003-01-28 22:58:14 +00:00
|
|
|
LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl
|
|
|
|
LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc
|
|
|
|
|
2003-02-09 14:59:56 +00:00
|
|
|
CFLAGS+= -DTERMIOS -DANSI_SOURCE
|
2003-01-28 22:58:14 +00:00
|
|
|
CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR}
|
|
|
|
|
2000-07-14 09:18:21 +00:00
|
|
|
.if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
|
2003-01-29 02:19:15 +00:00
|
|
|
CFLAGS+= -DOPENSSL_NO_IDEA
|
2003-01-28 22:58:14 +00:00
|
|
|
.else
|
|
|
|
_idea_h= idea/idea.h
|
2000-06-24 06:50:58 +00:00
|
|
|
.endif
|
2000-01-14 05:49:29 +00:00
|
|
|
|
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
2003-01-28 22:58:14 +00:00
|
|
|
CFLAGS+= -DL_ENDIAN
|
2000-05-15 23:29:03 +00:00
|
|
|
.elif ${MACHINE_ARCH} == "alpha"
|
2000-01-14 05:49:29 +00:00
|
|
|
# no ENDIAN stuff defined for alpha (64-bit)
|
|
|
|
.endif
|
|
|
|
|
2003-01-28 22:58:14 +00:00
|
|
|
HDRS+= \
|
|
|
|
../e_os.h ../e_os2.h \
|
|
|
|
crypto.h \
|
|
|
|
ebcdic.h \
|
|
|
|
opensslv.h \
|
|
|
|
ossl_typ.h \
|
|
|
|
symhacks.h \
|
|
|
|
tmdiff.h \
|
|
|
|
aes/aes.h aes/aes_locl.h \
|
|
|
|
asn1/asn1.h asn1/asn1_mac.h asn1/asn1t.h \
|
|
|
|
bio/bio.h \
|
|
|
|
bf/blowfish.h \
|
|
|
|
bn/bn.h \
|
|
|
|
buffer/buffer.h \
|
|
|
|
cast/cast.h \
|
|
|
|
comp/comp.h \
|
|
|
|
conf/conf.h conf/conf_api.h \
|
|
|
|
des/des.h des/des_old.h \
|
|
|
|
dh/dh.h \
|
|
|
|
dsa/dsa.h \
|
|
|
|
dso/dso.h \
|
|
|
|
ec/ec.h \
|
|
|
|
engine/eng_int.h engine/engine.h engine/hw_4758_cca_err.h \
|
|
|
|
engine/hw_aep_err.h engine/hw_atalla_err.h engine/hw_cswift_err.h \
|
|
|
|
engine/hw_ncipher_err.h engine/hw_nuron_err.h engine/hw_sureware_err.h \
|
|
|
|
engine/hw_ubsec_err.h \
|
|
|
|
err/err.h \
|
|
|
|
hmac/hmac.h \
|
|
|
|
${_idea_h} \
|
|
|
|
krb5/krb5_asn.h \
|
|
|
|
lhash/lhash.h \
|
|
|
|
md2/md2.h \
|
|
|
|
md4/md4.h \
|
|
|
|
md5/md5.h \
|
|
|
|
mdc2/mdc2.h \
|
|
|
|
ocsp/ocsp.h \
|
|
|
|
objects/objects.h objects/obj_mac.h \
|
|
|
|
pem/pem.h pem/pem2.h \
|
|
|
|
pkcs12/pkcs12.h pkcs7/pkcs7.h \
|
|
|
|
rand/rand.h \
|
|
|
|
rc2/rc2.h rc4/rc4.h rc5/rc5.h \
|
|
|
|
ripemd/ripemd.h \
|
|
|
|
rsa/rsa.h \
|
|
|
|
stack/stack.h stack/safestack.h \
|
|
|
|
sha/sha.h \
|
|
|
|
txt_db/txt_db.h \
|
|
|
|
ui/ui.h ui/ui_compat.h ui/ui_locl.h \
|
|
|
|
x509/x509.h x509/x509_vfy.h x509v3/x509v3.h
|
2000-09-17 06:45:27 +00:00
|
|
|
|
|
|
|
SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h
|
|
|
|
CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h
|
2000-04-13 07:37:35 +00:00
|
|
|
CLEANDIRS+= openssl
|
|
|
|
|
2000-05-15 17:28:06 +00:00
|
|
|
buildinf.h:
|
2000-04-13 07:37:35 +00:00
|
|
|
( echo "#ifndef MK1MF_BUILD"; \
|
|
|
|
echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
|
|
|
|
echo " #define CFLAGS \"$(CC)\""; \
|
|
|
|
echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
|
2001-03-02 16:52:14 +00:00
|
|
|
echo " #define DATE \"`LC_ALL=C date`\""; \
|
2000-04-13 07:37:35 +00:00
|
|
|
echo "#endif" ) > ${.TARGET}
|
|
|
|
|
2003-01-28 22:58:14 +00:00
|
|
|
openssl/opensslconf.h: ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h
|
2000-05-15 17:28:06 +00:00
|
|
|
mkdir -p openssl
|
2000-04-13 07:37:35 +00:00
|
|
|
cp ${.OODATE} ${.TARGET}
|
2000-08-23 11:41:01 +00:00
|
|
|
|
2003-01-28 22:58:14 +00:00
|
|
|
openssl/evp.h: ${LCRYPTO_SRC}/crypto/evp/evp.h
|
2002-05-12 16:01:00 +00:00
|
|
|
mkdir -p openssl
|
2000-09-17 06:45:27 +00:00
|
|
|
.if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
|
2003-01-29 02:19:15 +00:00
|
|
|
sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.OODATE} > ${.TARGET}
|
2000-09-17 06:45:27 +00:00
|
|
|
.else
|
2002-03-23 18:01:01 +00:00
|
|
|
${INSTALL} -C -m 444 ${.OODATE} ${.TARGET}
|
2000-09-17 06:45:27 +00:00
|
|
|
.endif
|
2002-09-19 13:24:27 +00:00
|
|
|
|
2002-09-20 12:33:19 +00:00
|
|
|
SRCS+= ${HDRS:T:S;^;openssl/;}
|
2003-01-28 22:58:14 +00:00
|
|
|
.for h in ${HDRS:S/^/${LCRYPTO_SRC}\/crypto\//}
|
2002-09-19 13:24:27 +00:00
|
|
|
openssl/${h:T}: ${h}
|
|
|
|
mkdir -p openssl
|
|
|
|
${INSTALL} -C -m 444 ${h} openssl
|
|
|
|
.endfor
|
2003-01-28 22:58:14 +00:00
|
|
|
|
2003-02-10 19:57:56 +00:00
|
|
|
MANDIR= ${SHAREDIR}/openssl/man/man
|
|
|
|
|
|
|
|
.if defined(LIB)
|
|
|
|
_docs= ${LIB}
|
|
|
|
_skip= des_modes
|
|
|
|
_sec= 3
|
|
|
|
.else
|
|
|
|
_docs= apps
|
|
|
|
_skip= config
|
|
|
|
_sec= 1
|
|
|
|
.endif
|
|
|
|
|
2003-01-28 22:58:14 +00:00
|
|
|
man-update:
|
2003-02-10 19:57:56 +00:00
|
|
|
.for manpage in ${MAN}
|
|
|
|
@(sec=${manpage:E}; \
|
|
|
|
pod=${manpage:R}.pod; \
|
|
|
|
cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
|
|
|
|
pod2man --section=$$sec --release="0.9.7" --center="OpenSSL" \
|
|
|
|
$$pod > ${.CURDIR}/man/${manpage}; \
|
|
|
|
rm $$pod; \
|
|
|
|
${ECHO} ${manpage})
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
man-makefile-update:
|
|
|
|
rm -f ${.CURDIR}/Makefile.man
|
|
|
|
echo '# $$FreeBSD$$' >> ${.CURDIR}/Makefile.man
|
|
|
|
echo '# DO NOT EDIT: generated from man-makefile-update target' >> \
|
|
|
|
${.CURDIR}/Makefile.man
|
|
|
|
for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
|
|
|
if [ "$$fn" != "${_skip}" ]; then \
|
|
|
|
${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
|
|
|
|
fn=`basename $$i .pod`; \
|
|
|
|
if [ "$$fn" != "${_skip}" ]; then \
|
|
|
|
perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
|
|
|
|
awk "/^$$fn\$$/ { next; } \
|
|
|
|
{ print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \
|
|
|
|
${.CURDIR}/Makefile.man; \
|
|
|
|
fi; \
|
2003-01-28 22:58:14 +00:00
|
|
|
done
|