This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / sbin / md5 / Makefile
CommitLineData
6ed62336 1# $Id: Makefile,v 1.2 1994/04/13 22:07:30 phk Exp $
2b269b96 2
2787cf07
PHK
3PROG= md5
4MAN1= md5.1
5SRCS= md5c.c mddriver.c
6CFLAGS+= -DMD=5
7CLEANFILES= test.rfc
2b269b96 8
2787cf07
PHK
9# For security reasons, this has to be static.
10LDFLAGS= -static
2b269b96 11
2787cf07 12all: ${PROG} test
2b269b96
PHK
13
14test: md5 test.rfc
15 -./md5 -x | diff - test.rfc > diffs 2>&1
2787cf07
PHK
16 @-if test -s diffs ; then \
17 echo '*** MD5 TEST FAILED'; cat diffs; \
18 else \
6ed62336 19 echo ' MD5 Test Passed'; \
2787cf07 20 fi
2b269b96
PHK
21 rm -f diffs
22
23# test.rfc is taken from Appendix 5 of RFC 1321.
24test.rfc:
2787cf07
PHK
25 @echo 'MD5 test suite:' > test.rfc
26 @echo 'MD5 ("") = d41d8cd98f00b204e9800998ecf8427e' >> test.rfc
27 @echo 'MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661' >> test.rfc
28 @echo 'MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72' >> test.rfc
29 @echo 'MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0' >> test.rfc
30 @echo 'MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b' >> test.rfc
31 @echo 'MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = d174ab98d277d9f5a5611c2c9f419d9f' >> test.rfc
32 @echo 'MD5 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 57edf4a22be3c955ac49da2e2107b67a' >> test.rfc
2b269b96 33
2787cf07 34.include <bsd.prog.mk>