aboutsummaryrefslogtreecommitdiff
path: root/lib/libcrypt
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1997-09-05 12:12:35 +0000
committerPeter Wemm <peter@FreeBSD.org>1997-09-05 12:12:35 +0000
commita9c87f32eef195b846fbd662d94b7975d9a35d11 (patch)
tree640cdaf4963d766905e2a027e1bd54ba4ced0c90 /lib/libcrypt
parent00974e25216ee9661517c31f72d1944d44e66ac4 (diff)
downloadsrc-a9c87f32eef195b846fbd662d94b7975d9a35d11.tar.gz
src-a9c87f32eef195b846fbd662d94b7975d9a35d11.zip
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.
Notes
Notes: svn path=/head/; revision=29146
Diffstat (limited to 'lib/libcrypt')
-rw-r--r--lib/libcrypt/Makefile22
1 files changed, 19 insertions, 3 deletions
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index 6fd0c737594d..953f9d017a62 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; \