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