diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-21 12:33:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-21 12:33:22 -0700 |
commit | cef661fc799a3a13ffdea4a3f69f1acd295de53d (patch) | |
tree | 690494557d393ca78f69a8569880ed4a3aeda276 /Makefile | |
parent | cc1ad5c8309fbace11e3a68e3ec8ffcbded442a6 (diff) | |
download | git-cef661fc799a3a13ffdea4a3f69f1acd295de53d.tar.gz |
Add support for alternate SHA1 library implementations.
This one includes the Mozilla SHA1 implementation sent in by Edgar Toernig.
It's dual-licenced under MPL-1.1 or GPL, so in the context of git, we
obviously use the GPL version.
Side note: the Mozilla SHA1 implementation is about twice as fast as the
default openssl one on my G5, but the default openssl one has optimized
x86 assembly language on x86. So choose wisely.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -29,22 +29,22 @@ LIB_H=cache.h object.h LIBS = $(LIB_FILE) LIBS += -lz -LIBS += -lssl + +ifdef MOZILLA_SHA1 + SHA1_HEADER="mozilla-sha1/sha1.h" + LIB_OBJS += mozilla-sha1/sha1.o +else + SHA1_HEADER=<openssl/sha.h> + LIBS += -lssl +endif + +CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)' $(LIB_FILE): $(LIB_OBJS) $(AR) rcs $@ $(LIB_OBJS) init-db: init-db.o -fsck-cache: fsck-cache.o $(LIB_FILE) object.o commit.o tree.o blob.o - $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o $(LIBS) - -rev-tree: rev-tree.o $(LIB_FILE) object.o commit.o tree.o blob.o - $(CC) $(CFLAGS) -o rev-tree rev-tree.o $(LIBS) - -merge-base: merge-base.o $(LIB_FILE) object.o commit.o tree.o blob.o - $(CC) $(CFLAGS) -o merge-base merge-base.o $(LIBS) - %: %.o $(LIB_FILE) $(CC) $(CFLAGS) -o $@ $< $(LIBS) @@ -77,7 +77,7 @@ unpack-file.o: $(LIB_H) write-tree.o: $(LIB_H) clean: - rm -f *.o $(PROG) $(LIB_FILE) + rm -f *.o mozilla-sha1/*.o $(PROG) $(LIB_FILE) backup: clean cd .. ; tar czvf dircache.tar.gz dir-cache |