Makefile revision 38635
1#
2# $Id: Makefile,v 1.12 1998/08/30 01:48:55 jb Exp $
3#
4
5LCRYPTBASE= 	libcrypt
6LSCRYPTBASE= 	libscrypt
7
8.if ${OBJFORMAT} != elf
9LCRYPTSO=	${LCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
10LSCRYPTSO=	${LSCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
11.else
12LCRYPTSO=	${LCRYPTBASE}.so.${SHLIB_MAJOR}
13LSCRYPTSO=	${LSCRYPTBASE}.so.${SHLIB_MAJOR}
14.endif
15
16# called libscrypt - for scramble crypt!
17.PATH:	${.CURDIR}/../libmd
18LIB=	scrypt
19SRCS=	crypt.c md5c.c
20CFLAGS+=	-I${.CURDIR}/../libmd -DLIBC_SCCS
21
22.if ${OBJFORMAT} == elf
23SONAME=	${LCRYPTBASE}.so.${SHLIB_MAJOR}
24.endif
25
26# We only install the links if they do not already exist.
27# This may have to be revised
28
29afterinstall:
30.if !defined(NOPIC)
31	@cd ${DESTDIR}${SHLIBDIR}; \
32	if [ ! -e ${LCRYPTSO} ]; then \
33	rm -f ${LCRYPTSO}; \
34	ln -s ${LSCRYPTSO} ${LCRYPTSO}; \
35	fi
36.endif
37.if !defined(NOPIC) && ${OBJFORMAT} == elf
38	@cd  ${DESTDIR}${LIBDIR}; \
39	if [ ! -e ${LCRYPTBASE}.so ]; then \
40	rm -f ${LCRYPTBASE}.so; \
41	ln -s ${LSCRYPTBASE}.so libcrypt.so; \
42	fi
43.endif
44	@cd  ${DESTDIR}${LIBDIR}; \
45	if [ ! -e ${LCRYPTBASE}.a ]; then \
46	rm -f ${LCRYPTBASE}.a; \
47	ln -s ${LSCRYPTBASE}.a libcrypt.a; \
48	fi
49.if !defined(NOPROFILE)
50	@cd  ${DESTDIR}${LIBDIR}; \
51	if [ ! -e ${LCRYPTBASE}_p.a ]; then \
52	rm -f ${LCRYPTBASE}_p.a; \
53	ln -s ${LSCRYPTBASE}_p.a libcrypt_p.a; \
54	fi
55.endif
56
57.include <bsd.lib.mk>
58