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
|
|
|
|
2014-03-15 21:43:23 -04:00
|
|
|
.PATH: ${.CURDIR}/../libmd ${.CURDIR}/../../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 \
|
|
|
|
|
crypt-sha512.c sha512c.c
|
2001-03-27 12:27:19 -05:00
|
|
|
MAN= crypt.3
|
2000-08-21 22:15:54 -04:00
|
|
|
MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3
|
2015-11-25 14:45:04 -05:00
|
|
|
CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil \
|
|
|
|
|
-I${.CURDIR}/../../sys/crypto/sha2
|
2003-06-02 15:29:27 -04:00
|
|
|
|
|
|
|
|
# Pull in the strong crypto, if it is present.
|
2006-03-17 13:54:44 -05:00
|
|
|
.if exists(${.CURDIR}/../../secure/lib/libcrypt) && ${MK_CRYPT} != "no"
|
2000-12-28 05:32:02 -05:00
|
|
|
.PATH: ${.CURDIR}/../../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 \
|
2015-12-27 12:33:59 -05:00
|
|
|
SHA384_Init SHA384_Final SHA384_Update \
|
2011-04-27 17:33:56 -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>
|