1994-08-09 13:07:27 -04:00
|
|
|
#
|
1999-08-27 20:22:10 -04:00
|
|
|
# $FreeBSD$
|
1994-08-09 13:07:27 -04:00
|
|
|
#
|
|
|
|
|
|
2016-02-04 16:16:35 -05:00
|
|
|
PACKAGE=lib${LIB}
|
2015-06-15 15:28:07 -04:00
|
|
|
SHLIBDIR?= /lib
|
2006-03-18 06:01:06 -05:00
|
|
|
|
2014-05-06 00:22:01 -04:00
|
|
|
.include <src.opts.mk>
|
2006-03-17 13:54:44 -05:00
|
|
|
|
2009-07-19 13:25:24 -04:00
|
|
|
SHLIB_MAJOR= 5
|
2000-12-28 05:32:02 -05:00
|
|
|
LIB= crypt
|
1999-09-21 10:44:27 -04:00
|
|
|
|
2017-01-19 23:52:29 -05:00
|
|
|
.PATH: ${SRCTOP}/lib/libmd ${SRCTOP}/sys/crypto/sha2
|
2003-06-02 15:29:27 -04:00
|
|
|
SRCS= crypt.c misc.c \
|
|
|
|
|
crypt-md5.c md5c.c \
|
2011-04-09 10:02:04 -04:00
|
|
|
crypt-nthash.c md4c.c \
|
|
|
|
|
crypt-sha256.c sha256c.c \
|
2016-06-01 16:55:25 -04:00
|
|
|
crypt-sha512.c sha512c.c
|
2001-03-27 12:27:19 -05:00
|
|
|
MAN= crypt.3
|
2016-08-10 11:16:28 -04:00
|
|
|
MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_r.3 \
|
|
|
|
|
crypt.3 crypt_set_format.3
|
2017-01-19 23:52:29 -05:00
|
|
|
CFLAGS+= -I${SRCTOP}/lib/libmd -I${SRCTOP}/lib/libutil \
|
|
|
|
|
-I${SRCTOP}/sys/crypto/sha2
|
2003-06-02 15:29:27 -04:00
|
|
|
|
|
|
|
|
# Pull in the strong crypto, if it is present.
|
2017-01-19 23:52:29 -05:00
|
|
|
.if exists(${SRCTOP}/secure/lib/libcrypt) && ${MK_CRYPT} != "no"
|
|
|
|
|
.PATH: ${SRCTOP}/secure/lib/libcrypt
|
2001-03-11 11:05:43 -05:00
|
|
|
SRCS+= crypt-des.c crypt-blowfish.c blowfish.c
|
|
|
|
|
CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH
|
2000-12-28 05:32:02 -05:00
|
|
|
.endif
|
2003-06-02 15:29:27 -04:00
|
|
|
|
2012-06-12 13:14:19 -04:00
|
|
|
.for sym in MD4Init MD4Final MD4Update MD4Pad \
|
2011-04-27 17:33:56 -04:00
|
|
|
MD5Init MD5Final MD5Update MD5Pad \
|
|
|
|
|
SHA256_Init SHA256_Final SHA256_Update \
|
2016-05-28 12:06:07 -04:00
|
|
|
SHA512_224_Init SHA512_224_Final SHA512_224_Update \
|
|
|
|
|
SHA512_256_Init SHA512_256_Final SHA512_256_Update \
|
2015-12-27 12:33:59 -05:00
|
|
|
SHA384_Init SHA384_Final SHA384_Update \
|
2016-06-01 16:55:25 -04:00
|
|
|
SHA512_Init SHA512_Final SHA512_Update
|
2000-12-28 05:32:02 -05:00
|
|
|
CFLAGS+= -D${sym}=__${sym}
|
|
|
|
|
.endfor
|
2003-06-02 15:29:27 -04:00
|
|
|
|
2010-01-02 04:58:07 -05:00
|
|
|
WARNS?= 2
|
|
|
|
|
|
2004-10-24 11:33:08 -04:00
|
|
|
PRECIOUSLIB=
|
1999-01-23 03:27:46 -05:00
|
|
|
|
2013-10-25 01:25:19 -04:00
|
|
|
.if ${MK_TESTS} != "no"
|
|
|
|
|
SUBDIR+= tests
|
|
|
|
|
.endif
|
|
|
|
|
|
1994-08-09 13:07:27 -04:00
|
|
|
.include <bsd.lib.mk>
|
2013-10-25 01:25:19 -04:00
|
|
|
.include <bsd.subdir.mk>
|