1 # $NetBSD: Makefile,v 1.1 2023/05/07 16:22:10 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 NOLINT= # don't build a lint library 19 NOPROFILE= # don't build a profile library 20 NOPICINSTALL= # don't install _pic.a library 21 LIB= legacy 22 USE_FORT?= yes # cryptographic software 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 -Wno-implicit-int-float-conversion 31 # XXX: This warning seems to trigger incorrectly 32 CWARNFLAGS.clang+= -Wno-atomic-alignment 33 34 LINTFLAGS+= -X 161 # constant in conditional context 35 LINTFLAGS+= -X 129 # expression has null effect 36 LINTFLAGS+= -X 117 # bitwise '>>' on signed value possibly nonportable 37 LINTFLAGS+= -X 231 # argument '%s' unused in function '%s' 38 LINTFLAGS+= -X 220 # fallthrough on case statement 39 LINTFLAGS+= -X 118 # semantics of '%s' change in ANSI C; use explicit cast 40 41 CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} -I${.CURDIR} 42 CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include 43 CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp 44 CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes 45 CPPFLAGS+= -I${OPENSSLSRC}/../include 46 CPPFLAGS+= -I${OPENSSLSRC}/providers/common/include 47 CPPFLAGS+= -I${OPENSSLSRC}/providers/implementations/include 48 CPPFLAGS+= -I${.CURDIR}/../libdefault 49 50 51 CRYPTODIST= ${NETBSDSRCDIR}/crypto 52 OPENSSLINC= ${OPENSSLSRC}/include/openssl 53 54 .include "${NETBSDSRCDIR}/crypto/Makefile.openssl" 55 .PATH: ${OPENSSLSRC} ${OPENSSLINC} 56 .PATH: ${OPENSSLSRC}/../include/openssl 57 .PATH: ${OPENSSLSRC}/providers/implementations/digests 58 .PATH: ${OPENSSLSRC}/providers/implementations/macs 59 60 .include "srcs.inc" 61 62 AFLAGS+=-DELF 63 64 OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh 65 66 67 SHLIB_MAJOR=0 68 SHLIB_MINOR=0 69 70 LIBDIR=${OSSL_MODULESDIR} 71 72 .if ${MKPIC} != "no" 73 .PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so 74 libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so 75 .else 76 libinstall:: 77 .endif 78 79 LDFLAGS+=-Wl,--version-script=${.CURDIR}/${LIB}.map 80 81 .include <bsd.lib.mk> 82 83 ${DESTDIR}${LIBDIR}/${LIB}.so: lib${LIB}.so.${SHLIB_FULLVERSION} 84 ${_MKTARGET_INSTALL} 85 ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 86 ${.ALLSRC} ${.TARGET} 87