diff options
author | peter <peter@FreeBSD.org> | 1997-09-05 12:12:35 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-09-05 12:12:35 +0000 |
commit | 83e3c439a7dab0261f60a560f3c0456d44bf912c (patch) | |
tree | c8668e786207586edf4f40d1efbbdfef10cc2a22 /lib | |
parent | be5fa44882170641d42910ac344e9122870be5d5 (diff) | |
download | FreeBSD-src-83e3c439a7dab0261f60a560f3c0456d44bf912c.zip FreeBSD-src-83e3c439a7dab0261f60a560f3c0456d44bf912c.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypt/Makefile | 22 |
1 files changed, 19 insertions, 3 deletions
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; \ |