1#
| 1#
|
2# $Id: Makefile,v 1.13 1998/08/30 02:43:45 jb Exp $
| 2# $Id: Makefile,v 1.14 1998/09/02 15:09:15 bde Exp $
|
3# 4
| 3# 4
|
5LCRYPTBASE= libcrypt 6LSCRYPTBASE= libscrypt
| 5SHLIB_MAJOR= 3 6.PATH: ${.CURDIR}/../../lib/libmd 7SRCS= crypt.c crypt-md5.c md5c.c crypt-shs.c shs.c 8MAN3= crypt.3 shs.3 descrypt.3 9CFLAGS+= -I${.CURDIR}/../libmd -DLIBC_SCCS 10DESCRYPT= ${.CURDIR}/../../secure/lib/libcrypt/crypt-des.c
|
7
| 11
|
| 12## build exportable crypt or des crypt? 13.if exists(${DESCRYPT}) && !defined(NOCRYPT) && !defined(NOSECURE) 14.PATH: ${.CURDIR}/../../secure/lib/libcrypt 15CIPHERTYPE= des 16SRCS+= crypt-des.c 17CFLAGS+= -I${.CURDIR} -DDES_CRYPT 18.else 19CIPHERTYPE= exp 20.endif 21 22LIB=${CIPHERTYPE}crypt 23LCRYPTBASE= libcrypt 24LSCRYPTBASE= lib${LIB} 25
|
8.if ${OBJFORMAT} != elf 9LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} 10LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} 11.else
| 26.if ${OBJFORMAT} != elf 27LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} 28LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} 29.else
|
| 30SONAME= ${LCRYPTBASE}.so.${SHLIB_MAJOR}
|
12LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR} 13LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR} 14.endif 15
| 31LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR} 32LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR} 33.endif 34
|
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}; \
| 35afterinstall: 36.if !defined(NOPIC) 37 @cd ${DESTDIR}${SHLIBDIR}; \
|
32 if [ ! -e ${LCRYPTSO} ]; then \
| |
33 rm -f ${LCRYPTSO}; \ 34 ln -s ${LSCRYPTSO} ${LCRYPTSO}; \
| 38 rm -f ${LCRYPTSO}; \ 39 ln -s ${LSCRYPTSO} ${LCRYPTSO}; \
|
35 fi
| 40 rm -f ${LCRYPTBASE}.so.2; \ 41 ln -s ${LSCRYPTSO} ${LCRYPTBASE}.so.2
|
36.endif 37.if !defined(NOPIC) && ${OBJFORMAT} == elf 38 @cd ${DESTDIR}${SHLIBDIR}; \
| 42.endif 43.if !defined(NOPIC) && ${OBJFORMAT} == elf 44 @cd ${DESTDIR}${SHLIBDIR}; \
|
39 if [ ! -e ${LCRYPTBASE}.so ]; then \
| |
40 rm -f ${LCRYPTBASE}.so; \
| 45 rm -f ${LCRYPTBASE}.so; \
|
41 ln -s ${LSCRYPTBASE}.so libcrypt.so; \ 42 fi
| 46 ln -s ${LSCRYPTBASE}.so libcrypt.so
|
43.endif 44 @cd ${DESTDIR}${LIBDIR}; \
| 47.endif 48 @cd ${DESTDIR}${LIBDIR}; \
|
45 if [ ! -e ${LCRYPTBASE}.a ]; then \
| |
46 rm -f ${LCRYPTBASE}.a; \
| 49 rm -f ${LCRYPTBASE}.a; \
|
47 ln -s ${LSCRYPTBASE}.a libcrypt.a; \ 48 fi
| 50 ln -s ${LSCRYPTBASE}.a libcrypt.a
|
49.if !defined(NOPROFILE) 50 @cd ${DESTDIR}${LIBDIR}; \
| 51.if !defined(NOPROFILE) 52 @cd ${DESTDIR}${LIBDIR}; \
|
51 if [ ! -e ${LCRYPTBASE}_p.a ]; then \
| |
52 rm -f ${LCRYPTBASE}_p.a; \
| 53 rm -f ${LCRYPTBASE}_p.a; \
|
53 ln -s ${LSCRYPTBASE}_p.a libcrypt_p.a; \ 54 fi
| 54 ln -s ${LSCRYPTBASE}_p.a libcrypt_p.a
|
55.endif 56 57.include <bsd.lib.mk>
| 55.endif 56 57.include <bsd.lib.mk>
|