1# $FreeBSD$ 2 3LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl/crypto 4CFLAGS+= -DTERMIOS -DANSI_SOURCE -I${LCRYPTO_SRC} -I${.OBJDIR} 5.if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES 6CFLAGS+= -DNO_IDEA 7.endif 8 9.if ${MACHINE_ARCH} == "i386" 10CFLAGS+= -DL_ENDIAN -DSHA1_ASM -DBN_ASM -DMD5_ASM -DRMD160_ASM 11.elif ${MACHINE_ARCH} == "alpha" 12# no ENDIAN stuff defined for alpha (64-bit) 13.endif 14 15WITH_RSA?= YES 16 17HDRS= asn1/asn1.h asn1/asn1_mac.h bio/bio.h bf/blowfish.h bn/bn.h \ 18 buffer/buffer.h cast/cast.h comp/comp.h conf/conf.h crypto.h \ 19 des/des.h dh/dh.h dsa/dsa.h ../e_os.h ../e_os2.h ebcdic.h \ 20 err/err.h hmac/hmac.h lhash/lhash.h md2/md2.h \ 21 md5/md5.h mdc2/mdc2.h objects/objects.h opensslv.h pem/pem.h \ 22 pem/pem2.h pkcs12/pkcs12.h pkcs7/pkcs7.h rand/rand.h rc2/rc2.h \ 23 rc4/rc4.h rc5/rc5.h ripemd/ripemd.h rsa/rsa.h stack/safestack.h \ 24 sha/sha.h stack/stack.h tmdiff.h txt_db/txt_db.h x509/x509.h \ 25 x509/x509_vfy.h x509v3/x509v3.h symhacks.h objects/obj_mac.h \ 26 md4/md4.h dso/dso.h conf/conf_api.h 27 28.if defined(MAKE_IDEA) && ${MAKE_IDEA} == YES 29HDRS+= idea/idea.h 30.endif 31 32.for h in ${HDRS} 33CRYPTO_HDRS+= ${LCRYPTO_SRC}/${h} 34.endfor 35 36SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h 37CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h 38CLEANDIRS+= openssl 39 40buildinf.h: 41 ( echo "#ifndef MK1MF_BUILD"; \ 42 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \ 43 echo " #define CFLAGS \"$(CC)\""; \ 44 echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \ 45 echo " #define DATE \"`LC_ALL=C date`\""; \ 46 echo "#endif" ) > ${.TARGET} 47 48# XXX: The openssl/ dependencies are not correct, in that a change in 49# any of ${CRYPTO_HDRS} ${EXTRA_HDRS} will no repopulate openssl/. 50# This deficiency will be fixed in a later commit. 51 52.ORDER: openssl/opensslconf.h openssl/evp.h 53 54openssl/opensslconf.h: ../libcrypto/opensslconf-${MACHINE_ARCH}.h 55 mkdir -p openssl 56 cp ${.OODATE} ${.TARGET} 57 ${INSTALL} -C -m 444 ${CRYPTO_HDRS} ${EXTRA_HDRS} openssl 58 59openssl/evp.h: ${LCRYPTO_SRC}/evp/evp.h 60.if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES 61 sed '/^#ifndef NO_IDEA$$/,/^#endif$$/d' ${.OODATE} > ${.TARGET} 62.else 63 ${INSTALL} -C -m 444 ${.OODATE} ${.TARGET} 64.endif 65