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