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