1# 2# $FreeBSD$ 3# 4 5SHLIBDIR?= /lib 6 7.include <src.opts.mk> 8 9SHLIB_MAJOR= 5 10LIB= crypt 11 12.PATH: ${.CURDIR}/../libmd ${.CURDIR}/../../sys/crypto/sha2 13SRCS= crypt.c misc.c \ 14 crypt-md5.c md5c.c \ 15 crypt-nthash.c md4c.c \ 16 crypt-sha256.c sha256c.c \ 17 crypt-sha512.c sha512c.c 18MAN= crypt.3 19MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3 20CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil \ 21 -I${.CURDIR}/../../sys/crypto/sha2 22 23# Pull in the strong crypto, if it is present. 24.if exists(${.CURDIR}/../../secure/lib/libcrypt) && ${MK_CRYPT} != "no" 25.PATH: ${.CURDIR}/../../secure/lib/libcrypt 26SRCS+= crypt-des.c crypt-blowfish.c blowfish.c 27CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH 28.endif 29 30.for sym in MD4Init MD4Final MD4Update MD4Pad \ 31 MD5Init MD5Final MD5Update MD5Pad \ 32 SHA256_Init SHA256_Final SHA256_Update \ 33 SHA384_Init SHA384_Final SHA384_Update \ 34 SHA512_Init SHA512_Final SHA512_Update 35CFLAGS+= -D${sym}=__${sym} 36.endfor 37 38WARNS?= 2 39 40PRECIOUSLIB= 41 42.if ${MK_TESTS} != "no" 43SUBDIR+= tests 44.endif 45 46.include <bsd.lib.mk> 47.include <bsd.subdir.mk> 48