Add missing Makefile and fix couple of typos in commentary.

This commit is contained in:
Andy Polyakov 2005-11-28 20:16:56 +00:00
parent d1593e6b15
commit 4adfe93cc5
3 changed files with 94 additions and 2 deletions

92
crypto/whrlpool/Makefile Normal file
View File

@ -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

View File

@ -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];

View File

@ -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),