1994-08-09 17:07:27 +00:00
|
|
|
#
|
1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1994-08-09 17:07:27 +00:00
|
|
|
#
|
|
|
|
|
1999-09-21 17:52:05 +00:00
|
|
|
SHLIB_MAJOR= 2
|
1999-09-20 12:45:49 +00:00
|
|
|
LIB= scrypt
|
|
|
|
|
|
|
|
LCRYPTBASE= libcrypt
|
|
|
|
LSCRYPTBASE= lib${LIB}
|
1997-09-05 12:12:35 +00:00
|
|
|
|
|
|
|
LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR}
|
|
|
|
LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR}
|
1994-08-09 18:49:04 +00:00
|
|
|
|
1999-09-21 14:44:27 +00:00
|
|
|
.if ${OBJFORMAT} == elf
|
|
|
|
SONAME= ${LCRYPTSO}
|
|
|
|
.endif
|
|
|
|
|
1999-09-20 12:45:49 +00:00
|
|
|
.PATH: ${.CURDIR}/../libmd
|
|
|
|
SRCS= crypt.c crypt-md5.c crypt-shs.c misc.c
|
|
|
|
STATICSRCS= md5c.c sha0c.c sha1c.c
|
|
|
|
STATICOBJS= ${STATICSRCS:S/.c/.o/g}
|
|
|
|
MAN3= crypt.3
|
|
|
|
CFLAGS+= -I${.CURDIR}/../libmd
|
|
|
|
CFLAGS+= -DLIBC_SCCS -Wall
|
|
|
|
PRECIOUSLIB= yes
|
1999-01-23 08:27:46 +00:00
|
|
|
|
1999-09-20 12:45:49 +00:00
|
|
|
LDADD+= -lmd
|
|
|
|
DPADD+= ${LIBMD}
|
1999-01-23 08:27:46 +00:00
|
|
|
|
1999-03-23 03:41:09 +00:00
|
|
|
# Include this early to pick up the definitions of SHLIB_MAJOR and
|
|
|
|
# SHLIB_MINOR which are used in the existence tests.
|
|
|
|
.include "${.CURDIR}/../Makefile.inc"
|
|
|
|
|
1999-01-23 08:27:46 +00:00
|
|
|
# We only install the links if they do not already exist.
|
|
|
|
# This may have to be revised
|
1999-03-23 03:41:09 +00:00
|
|
|
.if !exists(${DESTDIR}${LIBDIR}/${LCRYPTBASE}.a)
|
|
|
|
SYMLINKS+= ${LSCRYPTBASE}.a ${LIBDIR}/${LCRYPTBASE}.a
|
|
|
|
.endif
|
|
|
|
.if !defined(NOPROFILE) && !exists(${DESTDIR}${LIBDIR}/${LCRYPTBASE}_p.a)
|
|
|
|
SYMLINKS+= ${LSCRYPTBASE}_p.a ${LIBDIR}/${LCRYPTBASE}_p.a
|
1997-09-05 12:12:35 +00:00
|
|
|
.endif
|
1999-03-23 03:41:09 +00:00
|
|
|
.if !defined(NOPIC) && !exists(${DESTDIR}${SHLIBDIR}/${LCRYPTSO})
|
|
|
|
SYMLINKS+= ${LSCRYPTSO} ${SHLIBDIR}/${LCRYPTSO}
|
1994-08-12 21:12:37 +00:00
|
|
|
.endif
|
1999-03-23 03:41:09 +00:00
|
|
|
.if !defined(NOPIC) && ${OBJFORMAT} == elf && \
|
|
|
|
!exists(${DESTDIR}${SHLIBDIR}/${LCRYPTBASE}.so)
|
|
|
|
SYMLINKS+= ${LSCRYPTBASE}.so ${SHLIBDIR}/${LCRYPTBASE}.so
|
1994-08-20 18:13:59 +00:00
|
|
|
.endif
|
1994-08-09 18:49:04 +00:00
|
|
|
|
1994-08-09 17:07:27 +00:00
|
|
|
.include <bsd.lib.mk>
|
1999-09-20 12:45:49 +00:00
|
|
|
|
|
|
|
afterinstall:
|
|
|
|
.if !defined(NOPIC)
|
|
|
|
@cd ${DESTDIR}${SHLIBDIR}; \
|
|
|
|
rm -f ${LCRYPTSO}; \
|
|
|
|
ln -sf ${LSCRYPTSO} ${LCRYPTSO};
|
|
|
|
.endif
|
|
|
|
.if !defined(NOPIC) && ${OBJFORMAT} == elf
|
|
|
|
@cd ${DESTDIR}${SHLIBDIR}; \
|
|
|
|
rm -f ${LCRYPTBASE}.so; \
|
|
|
|
ln -sf ${LSCRYPTBASE}.so libcrypt.so
|
|
|
|
.endif
|
|
|
|
@cd ${DESTDIR}${LIBDIR}; \
|
|
|
|
rm -f ${LCRYPTBASE}.a; \
|
|
|
|
ln -sf ${LSCRYPTBASE}.a libcrypt.a
|
|
|
|
.if !defined(NOPROFILE)
|
|
|
|
@cd ${DESTDIR}${LIBDIR}; \
|
|
|
|
rm -f ${LCRYPTBASE}_p.a; \
|
|
|
|
ln -sf ${LSCRYPTBASE}_p.a libcrypt_p.a
|
|
|
|
.endif
|