| @@ -1,117 +1,117 @@ | | | @@ -1,117 +1,117 @@ |
1 | # $NetBSD: Makefile,v 1.3 2011/05/26 12:56:25 joerg Exp $ | | 1 | # $NetBSD: Makefile,v 1.4 2011/06/06 06:44:57 spz Exp $ |
2 | | | 2 | |
3 | # RCSid: | | 3 | # RCSid: |
4 | # Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp | | 4 | # Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp |
5 | # | | 5 | # |
6 | # @(#) Copyright (c) 1994 Simon J. Gerraty | | 6 | # @(#) Copyright (c) 1994 Simon J. Gerraty |
7 | # | | 7 | # |
8 | # This file is provided in the hope that it will | | 8 | # This file is provided in the hope that it will |
9 | # be of use. There is absolutely NO WARRANTY. | | 9 | # be of use. There is absolutely NO WARRANTY. |
10 | # Permission to copy, redistribute or otherwise | | 10 | # Permission to copy, redistribute or otherwise |
11 | # use this file is hereby granted provided that | | 11 | # use this file is hereby granted provided that |
12 | # the above copyright notice and this notice are | | 12 | # the above copyright notice and this notice are |
13 | # left intact. | | 13 | # left intact. |
14 | # | | 14 | # |
15 | # Please send copies of changes and bug-fixes to: | | 15 | # Please send copies of changes and bug-fixes to: |
16 | # sjg@quick.com.au | | 16 | # sjg@quick.com.au |
17 | # | | 17 | # |
18 | | | 18 | |
19 | LIB= crypto | | 19 | LIB= crypto |
20 | USE_FORT?= yes # cryptographic software | | 20 | USE_FORT?= yes # cryptographic software |
21 | USE_SHLIBDIR= yes | | 21 | USE_SHLIBDIR= yes |
22 | USE_FIPS= no | | 22 | USE_FIPS= no |
23 | | | 23 | |
24 | .include <bsd.own.mk> | | 24 | .include <bsd.own.mk> |
25 | .include <bsd.shlib.mk> | | 25 | .include <bsd.shlib.mk> |
26 | .include <bsd.sys.mk> # for HOST_SH | | 26 | .include <bsd.sys.mk> # for HOST_SH |
27 | | | 27 | |
28 | # XXX There's a bit of work to do before we can enable warnings. | | 28 | # XXX There's a bit of work to do before we can enable warnings. |
29 | WARNS=0 | | 29 | WARNS=0 |
30 | CWARNFLAGS.clang+= -Wno-empty-body -Wno-unused-value -Wno-parentheses | | 30 | CWARNFLAGS.clang+= -Wno-empty-body -Wno-unused-value -Wno-parentheses |
31 | | | 31 | |
32 | CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp | | 32 | CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp |
33 | | | 33 | |
34 | CRYPTODIST= ${NETBSDSRCDIR}/crypto | | 34 | CRYPTODIST= ${NETBSDSRCDIR}/crypto |
35 | | | 35 | |
36 | .include "${NETBSDSRCDIR}/crypto/Makefile.openssl" | | 36 | .include "${NETBSDSRCDIR}/crypto/Makefile.openssl" |
37 | .PATH: ${OPENSSLSRC} | | 37 | .PATH: ${OPENSSLSRC} |
38 | | | 38 | |
39 | .include "srcs.inc" | | 39 | .include "srcs.inc" |
40 | | | 40 | |
41 | | | 41 | |
42 | AFLAGS+=-DELF | | 42 | AFLAGS+=-DELF |
43 | LIBDPLIBS+= crypt ${NETBSDSRCDIR}/lib/libcrypt | | 43 | LIBDPLIBS+= crypt ${NETBSDSRCDIR}/lib/libcrypt |
44 | | | 44 | |
45 | OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh | | 45 | OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh |
46 | | | 46 | |
47 | # XXX CFLAGS: While it would be nice to know which compiler flags | | 47 | # XXX CFLAGS: While it would be nice to know which compiler flags |
48 | # XXX the library was built with, we don't want pathname information | | 48 | # XXX the library was built with, we don't want pathname information |
49 | # XXX for the host toolchain embedded in the image. | | 49 | # XXX for the host toolchain embedded in the image. |
50 | ${SRCS}: buildinf.h | | 50 | ${SRCS}: buildinf.h |
51 | buildinf.h: Makefile | | 51 | buildinf.h: Makefile |
52 | @echo "#ifndef MK1MF_BUILD" >buildinf.h | | 52 | @echo "#ifndef MK1MF_BUILD" >buildinf.h |
53 | @echo "#define CFLAGS \"`${CC} -v 2>&1 | grep version`\"" >>buildinf.h | | 53 | @echo "#define CFLAGS \"`${CC} -v 2>&1 | grep version`\"" >>buildinf.h |
54 | @echo "#define PLATFORM \"NetBSD-${MACHINE_ARCH}\"" >>buildinf.h | | 54 | @echo "#define PLATFORM \"NetBSD-${MACHINE_ARCH}\"" >>buildinf.h |
55 | @echo "#define DATE \"NetBSD ${OS_VERSION}\"" >>buildinf.h | | 55 | @echo "#define DATE \"NetBSD ${OS_VERSION}\"" >>buildinf.h |
56 | @echo "#endif" >>buildinf.h | | 56 | @echo "#endif" >>buildinf.h |
57 | | | 57 | |
58 | CLEANFILES+= buildinf.h | | 58 | CLEANFILES+= buildinf.h |
59 | | | 59 | |
60 | # This list is built from the contents of the include/openssl | | 60 | # This list is built from the contents of the include/openssl |
61 | # directory in the OpenSSL source distribution. | | 61 | # directory in the OpenSSL source distribution. |
62 | INCS+= aes.h asn1.h asn1_mac.h asn1t.h bio.h blowfish.h bn.h \ | | 62 | INCS+= aes.h asn1.h asn1_mac.h asn1t.h bio.h blowfish.h bn.h \ |
63 | buffer.h cast.h cms.h comp.h conf.h conf_api.h crypto.h des.h \ | | 63 | buffer.h cast.h cmac.h cms.h comp.h conf.h conf_api.h crypto.h des.h \ |
64 | dh.h dsa.h dso.h e_os2.h ebcdic.h ec.h ecdh.h ecdsa.h engine.h \ | | 64 | dh.h dsa.h dso.h e_os2.h ebcdic.h ec.h ecdh.h ecdsa.h engine.h \ |
65 | err.h evp.h hmac.h krb5_asn.h lhash.h md2.h md4.h md5.h modes.h \ | | 65 | err.h evp.h hmac.h krb5_asn.h lhash.h md2.h md4.h md5.h modes.h \ |
66 | obj_mac.h objects.h ocsp.h opensslconf.h opensslv.h ossl_typ.h \ | | 66 | obj_mac.h objects.h ocsp.h opensslconf.h opensslv.h ossl_typ.h \ |
67 | pem.h pem2.h pkcs12.h pkcs7.h rand.h rc2.h rc4.h ripemd.h \ | | 67 | pem.h pem2.h pkcs12.h pkcs7.h rand.h rc2.h rc4.h ripemd.h \ |
68 | rsa.h safestack.h sha.h stack.h store.h symhacks.h ts.h txt_db.h \ | | 68 | rsa.h safestack.h sha.h srp.h stack.h store.h symhacks.h ts.h txt_db.h \ |
69 | ui.h ui_compat.h x509.h x509_vfy.h x509v3.h pqueue.h camellia.h | | 69 | ui.h ui_compat.h x509.h x509_vfy.h x509v3.h pqueue.h camellia.h |
70 | # des_old.h | | 70 | # des_old.h |
71 | | | 71 | |
72 | # IDEA - patented, but we install the header anyways | | 72 | # IDEA - patented, but we install the header anyways |
73 | INCS+= idea.h | | 73 | INCS+= idea.h |
74 | | | 74 | |
75 | # RC5 - patented, but we install the header anyways | | 75 | # RC5 - patented, but we install the header anyways |
76 | INCS+= rc5.h | | 76 | INCS+= rc5.h |
77 | | | 77 | |
78 | # MDC2 - patented, but we install the header anyways | | 78 | # MDC2 - patented, but we install the header anyways |
79 | INCS+= mdc2.h | | 79 | INCS+= mdc2.h |
80 | | | 80 | |
81 | .if (${USE_FIPS} != "no") | | 81 | .if (${USE_FIPS} != "no") |
82 | # FIPS | | 82 | # FIPS |
83 | # This part is always included, because OpenSSL does not protect | | 83 | # This part is always included, because OpenSSL does not protect |
84 | # The FIPS include files | | 84 | # The FIPS include files |
85 | .PATH: ${OPENSSLSRC}/fips ${OPENSSLSRC}/fips/rand | | 85 | .PATH: ${OPENSSLSRC}/fips ${OPENSSLSRC}/fips/rand |
86 | INCS+= fips.h fips_rand.h | | 86 | INCS+= fips.h fips_rand.h |
87 | .endif | | 87 | .endif |
88 | | | 88 | |
89 | .if (${USE_FIPS} != "no") | | 89 | .if (${USE_FIPS} != "no") |
90 | CPPFLAGS+=-DOPENSSL_FIPS | | 90 | CPPFLAGS+=-DOPENSSL_FIPS |
91 | .PATH: ${OPENSSLSRC}/fips/aes | | 91 | .PATH: ${OPENSSLSRC}/fips/aes |
92 | SRCS+=fips_aes_core.c fips_aes_selftest.c | | 92 | SRCS+=fips_aes_core.c fips_aes_selftest.c |
93 | .PATH: ${OPENSSLSRC}/fips/des | | 93 | .PATH: ${OPENSSLSRC}/fips/des |
94 | SRCS+=fips_des_enc.c fips_des_selftest.c fips_set_key.c | | 94 | SRCS+=fips_des_enc.c fips_des_selftest.c fips_set_key.c |
95 | # asm/fips-dx86-elf.s | | 95 | # asm/fips-dx86-elf.s |
96 | .PATH: ${OPENSSLSRC}/fips/dh | | 96 | .PATH: ${OPENSSLSRC}/fips/dh |
97 | SRCS+=fips_dh_check.c fips_dh_gen.c fips_dh_key.c | | 97 | SRCS+=fips_dh_check.c fips_dh_gen.c fips_dh_key.c |
98 | .PATH: ${OPENSSLSRC}/fips/dsa | | 98 | .PATH: ${OPENSSLSRC}/fips/dsa |
99 | SRCS+=fips_dsa_ossl.c fips_dsa_gen.c fips_dsa_selftest.c | | 99 | SRCS+=fips_dsa_ossl.c fips_dsa_gen.c fips_dsa_selftest.c |
100 | #.PATH: ${OPENSSLSRC}/fips/rand | | 100 | #.PATH: ${OPENSSLSRC}/fips/rand |
101 | SRCS+=fips_rand.c | | 101 | SRCS+=fips_rand.c |
102 | .PATH: ${OPENSSLSRC}/fips/rsa | | 102 | .PATH: ${OPENSSLSRC}/fips/rsa |
103 | SRCS+=fips_rsa_eay.c fips_rsa_gen.c fips_rsa_selftest.c | | 103 | SRCS+=fips_rsa_eay.c fips_rsa_gen.c fips_rsa_selftest.c |
104 | SRCS+=fips_sha1dgst.c fips_sha1_selftest.c | | 104 | SRCS+=fips_sha1dgst.c fips_sha1_selftest.c |
105 | # asm/sx86-elf.s | | 105 | # asm/sx86-elf.s |
106 | .PATH: ${OPENSSLSRC}/fips/sha1 | | 106 | .PATH: ${OPENSSLSRC}/fips/sha1 |
107 | #.PATH: ${OPENSSLSRC}/fips | | 107 | #.PATH: ${OPENSSLSRC}/fips |
108 | SRCS+=fips.c fips_err_wrapper.c | | 108 | SRCS+=fips.c fips_err_wrapper.c |
109 | | | 109 | |
110 | SRCS+=rc5_skey.c i_skey.c mdc2dgst.c | | 110 | SRCS+=rc5_skey.c i_skey.c mdc2dgst.c |
111 | .endif | | 111 | .endif |
112 | | | 112 | |
113 | COPTS.eng_padlock.c = -Wno-stack-protector | | 113 | COPTS.eng_padlock.c = -Wno-stack-protector |
114 | | | 114 | |
115 | INCSDIR=/usr/include/openssl | | 115 | INCSDIR=/usr/include/openssl |
116 | | | 116 | |
117 | .include <bsd.lib.mk> | | 117 | .include <bsd.lib.mk> |