1 1.18 christos # $NetBSD: Makefile,v 1.18 2018/09/27 18:18:53 christos Exp $ 2 1.1 christos 3 1.1 christos # RCSid: 4 1.1 christos # Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp 5 1.1 christos # 6 1.1 christos # @(#) Copyright (c) 1994 Simon J. Gerraty 7 1.1 christos # 8 1.1 christos # This file is provided in the hope that it will 9 1.1 christos # be of use. There is absolutely NO WARRANTY. 10 1.1 christos # Permission to copy, redistribute or otherwise 11 1.1 christos # use this file is hereby granted provided that 12 1.1 christos # the above copyright notice and this notice are 13 1.1 christos # left intact. 14 1.1 christos # 15 1.1 christos # Please send copies of changes and bug-fixes to: 16 1.1 christos # sjg (at] quick.com.au 17 1.1 christos # 18 1.1 christos 19 1.1 christos LIB= crypto 20 1.1 christos USE_FORT?= yes # cryptographic software 21 1.1 christos USE_SHLIBDIR= yes 22 1.1 christos USE_FIPS= no 23 1.18 christos #DBG=-g 24 1.1 christos 25 1.1 christos .include <bsd.own.mk> 26 1.1 christos .include <bsd.shlib.mk> 27 1.1 christos 28 1.1 christos # XXX There's a bit of work to do before we can enable warnings. 29 1.1 christos WARNS=0 30 1.3 joerg CWARNFLAGS.clang+= -Wno-empty-body -Wno-unused-value -Wno-parentheses 31 1.1 christos 32 1.15 christos # XXX Not yet. 33 1.15 christos LINTFLAGS+=-D__int128='long long' 34 1.15 christos 35 1.6 christos CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} 36 1.13 christos CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include 37 1.6 christos CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp 38 1.12 spz CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes 39 1.13 christos CPPFLAGS+= -I${OPENSSLSRC}/../include 40 1.1 christos 41 1.1 christos CRYPTODIST= ${NETBSDSRCDIR}/crypto 42 1.1 christos 43 1.1 christos .include "${NETBSDSRCDIR}/crypto/Makefile.openssl" 44 1.13 christos .PATH: ${OPENSSLSRC} ${OPENSSLSRC}/include/openssl 45 1.13 christos .PATH: ${OPENSSLSRC}/../include/openssl ${OPENSSLSRC}/include/internal 46 1.1 christos 47 1.1 christos .include "srcs.inc" 48 1.1 christos 49 1.1 christos AFLAGS+=-DELF 50 1.1 christos LIBDPLIBS+= crypt ${NETBSDSRCDIR}/lib/libcrypt 51 1.1 christos 52 1.1 christos OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh 53 1.1 christos 54 1.1 christos # XXX CFLAGS: While it would be nice to know which compiler flags 55 1.1 christos # XXX the library was built with, we don't want pathname information 56 1.1 christos # XXX for the host toolchain embedded in the image. 57 1.1 christos ${SRCS}: buildinf.h 58 1.1 christos buildinf.h: Makefile 59 1.1 christos @echo "#ifndef MK1MF_BUILD" >buildinf.h 60 1.17 christos @echo "#define compiler_flags \"`${CC} -v 2>&1 | grep 'gcc version'`\"" >>buildinf.h 61 1.1 christos @echo "#define PLATFORM \"NetBSD-${MACHINE_ARCH}\"" >>buildinf.h 62 1.1 christos @echo "#define DATE \"NetBSD ${OS_VERSION}\"" >>buildinf.h 63 1.1 christos @echo "#endif" >>buildinf.h 64 1.1 christos 65 1.1 christos CLEANFILES+= buildinf.h 66 1.1 christos 67 1.1 christos # This list is built from the contents of the include/openssl 68 1.1 christos # directory in the OpenSSL source distribution. 69 1.17 christos INCS+= \ 70 1.17 christos aes.h \ 71 1.17 christos asn1.h \ 72 1.17 christos asn1_mac.h \ 73 1.17 christos asn1err.h \ 74 1.17 christos asn1t.h \ 75 1.17 christos async.h \ 76 1.17 christos asyncerr.h \ 77 1.17 christos bio.h \ 78 1.17 christos bioerr.h \ 79 1.17 christos blowfish.h \ 80 1.17 christos bn.h \ 81 1.17 christos bnerr.h \ 82 1.17 christos buffer.h \ 83 1.17 christos buffererr.h \ 84 1.17 christos camellia.h \ 85 1.17 christos cast.h \ 86 1.17 christos cmac.h \ 87 1.17 christos cms.h \ 88 1.17 christos cmserr.h \ 89 1.17 christos comp.h \ 90 1.17 christos comperr.h \ 91 1.17 christos conf.h \ 92 1.17 christos conf_api.h \ 93 1.17 christos conferr.h \ 94 1.17 christos crypto.h \ 95 1.17 christos cryptoerr.h \ 96 1.17 christos ct.h \ 97 1.17 christos cterr.h \ 98 1.17 christos des.h \ 99 1.17 christos dh.h \ 100 1.17 christos dherr.h \ 101 1.17 christos dsa.h \ 102 1.17 christos dsaerr.h \ 103 1.17 christos dtls1.h \ 104 1.17 christos e_os2.h \ 105 1.17 christos ebcdic.h \ 106 1.17 christos ec.h \ 107 1.17 christos ecdh.h \ 108 1.17 christos ecdsa.h \ 109 1.17 christos ecerr.h \ 110 1.17 christos engine.h \ 111 1.17 christos engineerr.h \ 112 1.17 christos err.h \ 113 1.17 christos evp.h \ 114 1.17 christos evperr.h \ 115 1.17 christos hmac.h \ 116 1.17 christos kdf.h \ 117 1.17 christos kdferr.h \ 118 1.17 christos lhash.h \ 119 1.17 christos md2.h \ 120 1.17 christos md4.h \ 121 1.17 christos md5.h \ 122 1.17 christos modes.h \ 123 1.17 christos obj_mac.h \ 124 1.17 christos objects.h \ 125 1.17 christos objectserr.h \ 126 1.17 christos ocsp.h \ 127 1.17 christos ocsperr.h \ 128 1.17 christos opensslconf.h \ 129 1.17 christos opensslv.h \ 130 1.17 christos ossl_typ.h \ 131 1.17 christos pem.h \ 132 1.17 christos pem2.h \ 133 1.17 christos pemerr.h \ 134 1.17 christos pkcs12.h \ 135 1.17 christos pkcs12err.h \ 136 1.17 christos pkcs7.h \ 137 1.17 christos pkcs7err.h \ 138 1.17 christos rand.h \ 139 1.17 christos rand_drbg.h \ 140 1.17 christos randerr.h \ 141 1.17 christos rc2.h \ 142 1.17 christos rc4.h \ 143 1.17 christos ripemd.h \ 144 1.17 christos rsa.h \ 145 1.17 christos rsaerr.h \ 146 1.17 christos safestack.h \ 147 1.17 christos seed.h \ 148 1.17 christos sha.h \ 149 1.17 christos srp.h \ 150 1.17 christos srtp.h \ 151 1.17 christos ssl.h \ 152 1.17 christos ssl2.h \ 153 1.17 christos ssl3.h \ 154 1.17 christos sslerr.h \ 155 1.17 christos stack.h \ 156 1.17 christos store.h \ 157 1.17 christos storeerr.h \ 158 1.17 christos symhacks.h \ 159 1.17 christos tls1.h \ 160 1.17 christos ts.h \ 161 1.17 christos tserr.h \ 162 1.17 christos txt_db.h \ 163 1.17 christos ui.h \ 164 1.17 christos uierr.h \ 165 1.17 christos whrlpool.h \ 166 1.17 christos x509.h \ 167 1.17 christos x509_vfy.h \ 168 1.17 christos x509err.h \ 169 1.17 christos x509v3.h \ 170 1.17 christos x509v3err.h 171 1.1 christos 172 1.1 christos # IDEA - patented, but we install the header anyways 173 1.1 christos INCS+= idea.h 174 1.1 christos 175 1.1 christos # RC5 - patented, but we install the header anyways 176 1.1 christos INCS+= rc5.h 177 1.1 christos 178 1.1 christos # MDC2 - patented, but we install the header anyways 179 1.1 christos INCS+= mdc2.h 180 1.1 christos 181 1.1 christos .if (${USE_FIPS} != "no") 182 1.1 christos # FIPS 183 1.1 christos # This part is always included, because OpenSSL does not protect 184 1.1 christos # The FIPS include files 185 1.1 christos .PATH: ${OPENSSLSRC}/fips ${OPENSSLSRC}/fips/rand 186 1.1 christos INCS+= fips.h fips_rand.h 187 1.1 christos .endif 188 1.1 christos 189 1.1 christos .if (${USE_FIPS} != "no") 190 1.1 christos CPPFLAGS+=-DOPENSSL_FIPS 191 1.1 christos .PATH: ${OPENSSLSRC}/fips/aes 192 1.1 christos SRCS+=fips_aes_core.c fips_aes_selftest.c 193 1.1 christos .PATH: ${OPENSSLSRC}/fips/des 194 1.1 christos SRCS+=fips_des_enc.c fips_des_selftest.c fips_set_key.c 195 1.1 christos # asm/fips-dx86-elf.s 196 1.1 christos .PATH: ${OPENSSLSRC}/fips/dh 197 1.1 christos SRCS+=fips_dh_check.c fips_dh_gen.c fips_dh_key.c 198 1.1 christos .PATH: ${OPENSSLSRC}/fips/dsa 199 1.1 christos SRCS+=fips_dsa_ossl.c fips_dsa_gen.c fips_dsa_selftest.c 200 1.1 christos #.PATH: ${OPENSSLSRC}/fips/rand 201 1.1 christos SRCS+=fips_rand.c 202 1.1 christos .PATH: ${OPENSSLSRC}/fips/rsa 203 1.1 christos SRCS+=fips_rsa_eay.c fips_rsa_gen.c fips_rsa_selftest.c 204 1.1 christos SRCS+=fips_sha1dgst.c fips_sha1_selftest.c 205 1.1 christos # asm/sx86-elf.s 206 1.1 christos .PATH: ${OPENSSLSRC}/fips/sha1 207 1.1 christos #.PATH: ${OPENSSLSRC}/fips 208 1.1 christos SRCS+=fips.c fips_err_wrapper.c 209 1.1 christos 210 1.1 christos SRCS+=rc5_skey.c i_skey.c mdc2dgst.c 211 1.1 christos .endif 212 1.1 christos 213 1.1 christos COPTS.eng_padlock.c = -Wno-stack-protector 214 1.1 christos 215 1.1 christos INCSDIR=/usr/include/openssl 216 1.1 christos 217 1.14 christos LDFLAGS+=-Wl,--version-script=${.CURDIR}/crypto.map 218 1.14 christos 219 1.7 christos PKGCONFIG=libcrypto 220 1.7 christos .include "${.CURDIR}/../../pkgconfig.mk" 221 1.7 christos 222 1.14 christos 223 1.1 christos .include <bsd.lib.mk> 224 1.14 christos 225