1 # $NetBSD: Makefile,v 1.51 2008/05/26 16:51:07 christos Exp $
4 # Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
6 # @(#) Copyright (c) 1994 Simon J. Gerraty
8 # This file is provided in the hope that it will
9 # be of use. There is absolutely NO WARRANTY.
10 # Permission to copy, redistribute or otherwise
11 # use this file is hereby granted provided that
12 # the above copyright notice and this notice are
15 # Please send copies of changes and bug-fixes to:
20 USE_FORT?
= yes
# cryptographic software
25 .
include <bsd.shlib.mk
>
26 .
include <bsd.sys.mk
> # for HOST_SH
28 # XXX There's a bit of work to do before we can enable warnings.
31 CPPFLAGS
+= -Dlib
${LIB} -I.
-I
${OPENSSLSRC}/crypto
-I
${OPENSSLSRC} -I
${OPENSSLSRC}/crypto
/asn1
-I
${OPENSSLSRC}/crypto
/evp
33 CRYPTODIST
= ${NETBSDSRCDIR}/crypto
35 .
include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
42 .if
${OBJECT_FMT} == "ELF"
44 LIBDPLIBS
+= crypt
${NETBSDSRCDIR}/lib
/libcrypt
47 # XXX: This is broken because we compile with the wrong des headers.
48 # NetBSD's crypt(3) library, in lieu of the one included with OpenSSL,
49 # since NetBSD's also supports MD5, SHA1 and Blowfish passwords.
50 .PATH
: ${NETBSDSRCDIR}/lib
/libcrypt
51 SRCS
+= crypt.c md5crypt.c bcrypt.c crypt-sha1.c util.c
54 OS_VERSION
!= ${HOST_SH} ${NETBSDSRCDIR}/sys
/conf
/osrelease.sh
56 # XXX CFLAGS: While it would be nice to know which compiler flags
57 # XXX the library was built with, we don't want pathname information
58 # XXX for the host toolchain embedded in the image.
61 @echo
"#ifndef MK1MF_BUILD" >buildinf.h
62 @echo
"#define CFLAGS \"`${CC} -v 2>&1 | grep version`\"" >>buildinf.h
63 @echo
"#define PLATFORM \"NetBSD-${MACHINE_ARCH}\"" >>buildinf.h
64 @echo
"#define DATE \"NetBSD ${OS_VERSION}\"" >>buildinf.h
65 @echo
"#endif" >>buildinf.h
67 CLEANFILES
+= buildinf.h
69 # This list is built from the contents of the include/openssl
70 # directory in the OpenSSL source distribution.
71 INCS
+= aes.h asn1.h asn1_mac.h asn1t.h bio.h blowfish.h bn.h \
72 buffer.h cast.h cms.h comp.h conf.h conf_api.h crypto.h des.h \
73 dh.h dsa.h dso.h e_os2.h ebcdic.h ec.h ecdh.h ecdsa.h engine.h \
74 err.h evp.h hmac.h krb5_asn.h lhash.h md2.h md4.h md5.h modes.h \
75 obj_mac.h objects.h ocsp.h opensslconf.h opensslv.h ossl_typ.h \
76 pem.h pem2.h pkcs12.h pkcs7.h rand.h rc2.h rc4.h ripemd.h \
77 rsa.h safestack.h sha.h stack.h store.h symhacks.h ts.h txt_db.h \
78 ui.h ui_compat.h x509.h x509_vfy.h x509v3.h pqueue.h camellia.h
81 # IDEA - patented, but we install the header anyways
84 # RC5 - patented, but we install the header anyways
87 # MDC2 - patented, but we install the header anyways
90 .if
(${USE_FIPS} != "no")
92 # This part is always included, because OpenSSL does not protect
93 # The FIPS include files
94 .PATH
: ${OPENSSLSRC}/fips
${OPENSSLSRC}/fips
/rand
95 INCS
+= fips.h fips_rand.h
98 .if
(${USE_FIPS} != "no")
99 CPPFLAGS
+=-DOPENSSL_FIPS
100 .PATH
: ${OPENSSLSRC}/fips
/aes
101 SRCS
+=fips_aes_core.c fips_aes_selftest.c
102 .PATH
: ${OPENSSLSRC}/fips
/des
103 SRCS
+=fips_des_enc.c fips_des_selftest.c fips_set_key.c
104 # asm/fips-dx86-elf.s
105 .PATH
: ${OPENSSLSRC}/fips
/dh
106 SRCS
+=fips_dh_check.c fips_dh_gen.c fips_dh_key.c
107 .PATH
: ${OPENSSLSRC}/fips
/dsa
108 SRCS
+=fips_dsa_ossl.c fips_dsa_gen.c fips_dsa_selftest.c
109 #.PATH: ${OPENSSLSRC}/fips/rand
111 .PATH
: ${OPENSSLSRC}/fips
/rsa
112 SRCS
+=fips_rsa_eay.c fips_rsa_gen.c fips_rsa_selftest.c
113 SRCS
+=fips_sha1dgst.c fips_sha1_selftest.c
115 .PATH
: ${OPENSSLSRC}/fips
/sha1
116 #.PATH: ${OPENSSLSRC}/fips
117 SRCS
+=fips.c fips_err_wrapper.c
119 SRCS
+=rc5_skey.c i_skey.c mdc2dgst.c
122 COPTS.eng_padlock.c
= -Wno-stack-protector
124 INCSDIR
=/usr
/include/openssl
126 .
include <bsd.lib.mk
>