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