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