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