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