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