summaryrefslogtreecommitdiffstats
path: root/lib/libcrypt/Makefile
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1999-09-20 12:45:49 +0000
committermarkm <markm@FreeBSD.org>1999-09-20 12:45:49 +0000
commit9bc938e5c504726347763bf8eb4fc058ff930a42 (patch)
tree837f738fed44f5cd28fd1914b5b7e4c6144f4fa7 /lib/libcrypt/Makefile
parent351e996436c4acb17453e4194703114754736d74 (diff)
downloadFreeBSD-src-9bc938e5c504726347763bf8eb4fc058ff930a42.zip
FreeBSD-src-9bc938e5c504726347763bf8eb4fc058ff930a42.tar.gz
Big code cleanup. (Inspired by Brandon Gillespie). Also move as
much as possible away from secure/ to make extending easier.
Diffstat (limited to 'lib/libcrypt/Makefile')
-rw-r--r--lib/libcrypt/Makefile50
1 files changed, 35 insertions, 15 deletions
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index c34fcf3..338853d 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -2,26 +2,26 @@
# $FreeBSD$
#
-LCRYPTBASE= libcrypt
-LSCRYPTBASE= libscrypt
+SHLIB_MAJOR= 3
+LIB= scrypt
+
+LCRYPTBASE= libcrypt
+LSCRYPTBASE= lib${LIB}
-.if ${OBJFORMAT} != 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
-LIB= scrypt
-SRCS= crypt.c md5c.c
-CFLAGS+= -I${.CURDIR}/../libmd -DLIBC_SCCS
+.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
-.if ${OBJFORMAT} == elf
-SONAME= ${LCRYPTBASE}.so.${SHLIB_MAJOR}
-.endif
+LDADD+= -lmd
+DPADD+= ${LIBMD}
# Include this early to pick up the definitions of SHLIB_MAJOR and
# SHLIB_MINOR which are used in the existence tests.
@@ -44,3 +44,23 @@ SYMLINKS+= ${LSCRYPTBASE}.so ${SHLIBDIR}/${LCRYPTBASE}.so
.endif
.include <bsd.lib.mk>
+
+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
OpenPOWER on IntegriCloud