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.
This commit is contained in:
parent
00974e2521
commit
a9c87f32ee
@ -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
|
||||
|
||||
@ -24,6 +33,13 @@ afterinstall:
|
||||
rm -f ${LCRYPTSO}; \
|
||||
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 \
|
||||
|
Loading…
Reference in New Issue
Block a user