1# $FreeBSD$ 2 3LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl 4LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc 5 6CFLAGS+= -DTERMIOS -DANSI_SOURCE -DOPENSSL_NO_KRB5 7CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR} 8 9.if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES 10CFLAGS+= -DOPENSSL_NO_IDEA 11.else 12_idea_h= idea/idea.h 13.endif 14 15.if ${MACHINE_ARCH} == "i386" 16CFLAGS+= -DL_ENDIAN 17.elif ${MACHINE_ARCH} == "alpha" 18# no ENDIAN stuff defined for alpha (64-bit) 19.endif 20 21HDRS+= \ 22 ../e_os.h ../e_os2.h \ 23 crypto.h \ 24 ebcdic.h \ 25 opensslv.h \ 26 ossl_typ.h \ 27 symhacks.h \ 28 tmdiff.h \ 29 aes/aes.h aes/aes_locl.h \ 30 asn1/asn1.h asn1/asn1_mac.h asn1/asn1t.h \ 31 bio/bio.h \ 32 bf/blowfish.h \ 33 bn/bn.h \ 34 buffer/buffer.h \ 35 cast/cast.h \ 36 comp/comp.h \ 37 conf/conf.h conf/conf_api.h \ 38 des/des.h des/des_old.h \ 39 dh/dh.h \ 40 dsa/dsa.h \ 41 dso/dso.h \ 42 ec/ec.h \ 43 engine/eng_int.h engine/engine.h engine/hw_4758_cca_err.h \ 44 engine/hw_aep_err.h engine/hw_atalla_err.h engine/hw_cswift_err.h \ 45 engine/hw_ncipher_err.h engine/hw_nuron_err.h engine/hw_sureware_err.h \ 46 engine/hw_ubsec_err.h \ 47 err/err.h \ 48 hmac/hmac.h \ 49 ${_idea_h} \ 50 krb5/krb5_asn.h \ 51 lhash/lhash.h \ 52 md2/md2.h \ 53 md4/md4.h \ 54 md5/md5.h \ 55 mdc2/mdc2.h \ 56 ocsp/ocsp.h \ 57 objects/objects.h objects/obj_mac.h \ 58 pem/pem.h pem/pem2.h \ 59 pkcs12/pkcs12.h pkcs7/pkcs7.h \ 60 rand/rand.h \ 61 rc2/rc2.h rc4/rc4.h rc5/rc5.h \ 62 ripemd/ripemd.h \ 63 rsa/rsa.h \ 64 stack/stack.h stack/safestack.h \ 65 sha/sha.h \ 66 txt_db/txt_db.h \ 67 ui/ui.h ui/ui_compat.h ui/ui_locl.h \ 68 x509/x509.h x509/x509_vfy.h x509v3/x509v3.h 69 70SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h 71CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h 72CLEANDIRS+= openssl 73 74buildinf.h: 75 ( echo "#ifndef MK1MF_BUILD"; \ 76 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \ 77 echo " #define CFLAGS \"$(CC)\""; \ 78 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \ 79 echo " #define DATE \"`LC_ALL=C date`\""; \ 80 echo "#endif" ) > ${.TARGET} 81 82openssl/opensslconf.h: ../../lib/libcrypto/opensslconf-${MACHINE_ARCH}.h 83 mkdir -p openssl 84 cp ${.OODATE} ${.TARGET} 85 86openssl/evp.h: ${LCRYPTO_SRC}/crypto/evp/evp.h 87 mkdir -p openssl 88.if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES 89 sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.OODATE} > ${.TARGET} 90.else 91 ${INSTALL} -C -m 444 ${.OODATE} ${.TARGET} 92.endif 93 94SRCS+= ${HDRS:T:S;^;openssl/;} 95.for h in ${HDRS:S/^/${LCRYPTO_SRC}\/crypto\//} 96openssl/${h:T}: ${h} 97 mkdir -p openssl 98 ${INSTALL} -C -m 444 ${h} openssl 99.endfor 100 101man-update: 102 for i in `( cd ${LCRYPTO_DOC}/${LIB}${PROG} ; ls *.pod )` ; do \ 103 cp ${LCRYPTO_DOC}/${LIB}/$$i . ;\ 104 pod2man --section=3 --release="0.9.7" --center="OpenSSL" \ 105 $$i > ${.CURDIR}/man/$${i%%.pod}.3 ;\ 106 rm $$i ;\ 107 echo $${i%%.pod} ;\ 108 done 109