2005-04-13 17:14:06 +08:00
|
|
|
# -DCOLLISION_CHECK if you believe that SHA1's
|
|
|
|
# 1461501637330902918203684832716283019655932542976 hashes do not give you
|
|
|
|
# enough guarantees about no collisions between objects ever hapenning.
|
2005-04-13 17:20:38 +08:00
|
|
|
#
|
|
|
|
# -DNSEC if you want git to care about sub-second file mtimes and ctimes.
|
|
|
|
# Note that you need some new glibc (at least >2.2.4) for this, and it will
|
|
|
|
# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly
|
|
|
|
# break unless your underlying filesystem supports those sub-second times
|
|
|
|
# (my ext3 doesn't).
|
2005-04-09 00:59:28 +08:00
|
|
|
CFLAGS=-g -O3 -Wall
|
2005-04-13 17:14:06 +08:00
|
|
|
|
2005-04-08 06:13:13 +08:00
|
|
|
CC=gcc
|
|
|
|
|
2005-04-13 17:20:38 +08:00
|
|
|
|
2005-04-13 17:02:34 +08:00
|
|
|
PROG= update-cache show-diff init-db write-tree read-tree commit-tree \
|
2005-04-12 15:23:14 +08:00
|
|
|
cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \
|
2005-04-18 10:52:54 +08:00
|
|
|
check-files ls-tree merge-base merge-cache
|
2005-04-08 06:13:13 +08:00
|
|
|
|
|
|
|
all: $(PROG)
|
|
|
|
|
|
|
|
install: $(PROG)
|
|
|
|
install $(PROG) $(HOME)/bin/
|
|
|
|
|
2005-04-09 06:31:19 +08:00
|
|
|
LIBS= -lssl -lz
|
2005-04-08 06:13:13 +08:00
|
|
|
|
|
|
|
init-db: init-db.o
|
|
|
|
|
|
|
|
update-cache: update-cache.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)
|
|
|
|
|
|
|
|
show-diff: show-diff.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)
|
|
|
|
|
|
|
|
write-tree: write-tree.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)
|
|
|
|
|
|
|
|
read-tree: read-tree.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)
|
|
|
|
|
|
|
|
commit-tree: commit-tree.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)
|
|
|
|
|
|
|
|
cat-file: cat-file.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)
|
|
|
|
|
2005-04-19 02:39:48 +08:00
|
|
|
fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o
|
|
|
|
$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)
|
2005-04-09 06:04:51 +08:00
|
|
|
|
2005-04-10 00:53:05 +08:00
|
|
|
checkout-cache: checkout-cache.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)
|
|
|
|
|
2005-04-10 04:00:54 +08:00
|
|
|
diff-tree: diff-tree.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)
|
|
|
|
|
2005-04-19 02:39:48 +08:00
|
|
|
rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o
|
|
|
|
$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)
|
2005-04-12 04:55:10 +08:00
|
|
|
|
2005-04-12 09:55:38 +08:00
|
|
|
show-files: show-files.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)
|
|
|
|
|
2005-04-12 15:23:14 +08:00
|
|
|
check-files: check-files.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)
|
|
|
|
|
2005-04-13 17:02:34 +08:00
|
|
|
ls-tree: ls-tree.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)
|
|
|
|
|
2005-04-19 02:39:48 +08:00
|
|
|
merge-base: merge-base.o read-cache.o object.o commit.o tree.o blob.o
|
|
|
|
$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)
|
2005-04-18 03:18:17 +08:00
|
|
|
|
2005-04-18 10:52:54 +08:00
|
|
|
merge-cache: merge-cache.o read-cache.o
|
|
|
|
$(CC) $(CFLAGS) -o merge-cache merge-cache.o read-cache.o $(LIBS)
|
|
|
|
|
2005-04-08 06:13:13 +08:00
|
|
|
read-cache.o: cache.h
|
|
|
|
show-diff.o: cache.h
|
|
|
|
|
|
|
|
clean:
|
2005-04-12 23:08:12 +08:00
|
|
|
rm -f *.o $(PROG)
|
2005-04-08 06:13:13 +08:00
|
|
|
|
|
|
|
backup: clean
|
|
|
|
cd .. ; tar czvf dircache.tar.gz dir-cache
|