From 83e3c439a7dab0261f60a560f3c0456d44bf912c Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 5 Sep 1997 12:12:35 +0000 Subject: When compiling under elf, use correct library naming conventions. Also add the required extra symlink. Set the -soname to libcrypt.so so that the symlink is used at runtime rather than resolved at compile time. --- lib/libcrypt/Makefile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'lib/libcrypt') diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile index 6fd0c73..953f9d0 100644 --- a/lib/libcrypt/Makefile +++ b/lib/libcrypt/Makefile @@ -1,12 +1,17 @@ # -# $Id$ +# $Id: Makefile,v 1.9 1997/02/22 15:06:14 peter Exp $ # LCRYPTBASE= libcrypt -LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} - LSCRYPTBASE= libscrypt + +.if ${BINFORMAT} != elf +LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +.else +LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR} +LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR} +.endif # called libscrypt - for scramble crypt! .PATH: ${.CURDIR}/../libmd @@ -14,6 +19,10 @@ LIB= scrypt SRCS= crypt.c md5c.c CFLAGS+= -I${.CURDIR}/../libmd +.if ${BINFORMAT} == elf +SONAME= ${LCRYPTBASE}.so.${SHLIB_MAJOR} +.endif + # We only install the links if they do not already exist. # This may have to be revised @@ -25,6 +34,13 @@ afterinstall: ln -s ${LSCRYPTSO} ${LCRYPTSO}; \ fi .endif +.if !defined(NOPIC) && ${BINFORMAT} == elf + @cd ${DESTDIR}${LIBDIR}; \ + if [ ! -e ${LCRYPTBASE}.so ]; then \ + rm -f ${LCRYPTBASE}.so; \ + ln -s ${LSCRYPTBASE}.so libcrypt.so; \ + fi +.endif @cd ${DESTDIR}${LIBDIR}; \ if [ ! -e ${LCRYPTBASE}.a ]; then \ rm -f ${LCRYPTBASE}.a; \ -- cgit v1.1