1# 2# 3 4SHLIBDIR?= /lib 5 6.include <src.opts.mk> 7 8PACKAGE= runtime 9 10SHLIB_MAJOR= 5 11LIB= crypt 12 13SRCS= crypt.c misc.c \ 14 crypt-md5.c \ 15 crypt-nthash.c \ 16 crypt-sha256.c \ 17 crypt-sha512.c 18MAN= crypt.3 19MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_r.3 \ 20 crypt.3 crypt_set_format.3 21CFLAGS+= -I${SRCTOP}/lib/libmd 22 23# Pull in the strong crypto, if it is present. 24.if exists(${SRCTOP}/secure/lib/libcrypt) && ${MK_CRYPT} != "no" 25.PATH: ${SRCTOP}/secure/lib/libcrypt 26SRCS+= crypt-des.c crypt-blowfish.c blowfish.c 27CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH 28.endif 29 30WARNS?= 2 31 32PRECIOUSLIB= 33 34HAS_TESTS= 35SUBDIR.${MK_TESTS}+= tests 36 37LIBADD+= md 38SHLIB_LDSCRIPT= libcrypt.ldscript 39STATIC_LDSCRIPT= libcrypt.aldscript 40CLEANFILES+= libcrypt.ald 41 42libcrypt.ald: ${.CURDIR}/${STATIC_LDSCRIPT} 43 sed -e 's,@@LIB@@,${LIB},g' \ 44 -e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \ 45 ${.ALLSRC} > ${.TARGET} 46 47all: ${STATIC_LDSCRIPT} libcrypt.ald 48 49install-libcrypt.a: libcrypt.ald 50 ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 51 ${_INSTALLFLAGS} libcrypt.ald ${DESTDIR}${_LIBDIR}/lib${LIB}.a 52 53realinstall: install-libcrypt.a 54 55.include <bsd.lib.mk> 56