From: Andy Polyakov Date: Mon, 28 Nov 2005 20:16:56 +0000 (+0000) Subject: Add missing Makefile and fix couple of typos in commentary. X-Git-Tag: OpenSSL_0_9_8k^2~1688 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=4adfe93cc5b409ee0d6b7556cae7d8dce70b61a9 Add missing Makefile and fix couple of typos in commentary. --- diff --git a/crypto/whrlpool/Makefile b/crypto/whrlpool/Makefile new file mode 100644 index 0000000000..4d7fa88fb3 --- /dev/null +++ b/crypto/whrlpool/Makefile @@ -0,0 +1,92 @@ +# +# crypto/whrlpool/Makefile +# + +DIR= whrlpool +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) +AFLAGS= $(ASFLAGS) + +GENERAL=Makefile +TEST=wp_test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=wp_dgst.c wp_block.c +LIBOBJ=wp_dgst.o wp_block.o + +SRC= $(LIBSRC) + +EXHEADER= whrlpool.h +HEADER= wp_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +x86mmx-elf.s: asm/wp-mmx.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) wp-mmx.pl elf $(CFLAGS) $(PROCESSOR)) > $@ +x86mmx-cof.s: asm/wp-mmx.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) wp-mmx.pl coff $(CFLAGS) $(PROCESSOR)) > $@ +x86mmx-out.s: asm/wp-mmx.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) wp-mmx.pl a.out $(CFLAGS) $(PROCESSOR)) > $@ + +$(LIBOBJ): $(LIBSRC) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +wp_block.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +wp_block.o: ../../include/openssl/whrlpool.h wp_block.c wp_locl.h +wp_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +wp_dgst.o: ../../include/openssl/whrlpool.h wp_dgst.c wp_locl.h diff --git a/crypto/whrlpool/whrlpool.h b/crypto/whrlpool/whrlpool.h index 64fde8a3ad..bf9d7f5f0c 100644 --- a/crypto/whrlpool/whrlpool.h +++ b/crypto/whrlpool/whrlpool.h @@ -15,7 +15,7 @@ extern "C" { typedef struct { union { unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; - /* double q is here to ensures 64-bit alignment */ + /* double q is here to ensure 64-bit alignment */ double q[WHIRLPOOL_DIGEST_LENGTH/sizeof(double)]; } H; unsigned char data[WHIRLPOOL_BBLOCK/8]; diff --git a/crypto/whrlpool/wp_block.c b/crypto/whrlpool/wp_block.c index b478e110b2..221f6cc59f 100644 --- a/crypto/whrlpool/wp_block.c +++ b/crypto/whrlpool/wp_block.c @@ -193,7 +193,7 @@ union { u8 c[(256*N+ROUNDS)*sizeof(u64)]; u64 q[(256*N+ROUNDS)]; } Cx = { { - /* Note edian-neutral representation:-) */ + /* Note endian-neutral representation:-) */ LL(0x18,0x18,0x60,0x18,0xc0,0x78,0x30,0xd8), LL(0x23,0x23,0x8c,0x23,0x05,0xaf,0x46,0x26), LL(0xc6,0xc6,0x3f,0xc6,0x7e,0xf9,0x91,0xb8),