Make 'fsck' able to take an arbitrary number of parents on the
[git/gitweb.git] / Makefile
blob92de1cb7928cf6368ea1f2054cc2000e30f78268
1 # -DCOLLISION_CHECK if you believe that SHA1's
2 # 1461501637330902918203684832716283019655932542976 hashes do not give you
3 # enough guarantees about no collisions between objects ever hapenning.
5 # -DNSEC if you want git to care about sub-second file mtimes and ctimes.
6 # Note that you need some new glibc (at least >2.2.4) for this, and it will
7 # BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly
8 # break unless your underlying filesystem supports those sub-second times
9 # (my ext3 doesn't).
10 CFLAGS=-g -O3 -Wall
12 CC=gcc
15 PROG= update-cache show-diff init-db write-tree read-tree commit-tree \
16 cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \
17 check-files ls-tree
19 all: $(PROG)
21 install: $(PROG)
22 install $(PROG) $(HOME)/bin/
24 LIBS= -lssl -lz
26 init-db: init-db.o
28 update-cache: update-cache.o read-cache.o
29 $(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)
31 show-diff: show-diff.o read-cache.o
32 $(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)
34 write-tree: write-tree.o read-cache.o
35 $(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)
37 read-tree: read-tree.o read-cache.o
38 $(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)
40 commit-tree: commit-tree.o read-cache.o
41 $(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)
43 cat-file: cat-file.o read-cache.o
44 $(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)
46 fsck-cache: fsck-cache.o read-cache.o
47 $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)
49 checkout-cache: checkout-cache.o read-cache.o
50 $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)
52 diff-tree: diff-tree.o read-cache.o
53 $(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)
55 rev-tree: rev-tree.o read-cache.o
56 $(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o $(LIBS)
58 show-files: show-files.o read-cache.o
59 $(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)
61 check-files: check-files.o read-cache.o
62 $(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)
64 ls-tree: ls-tree.o read-cache.o
65 $(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)
67 read-cache.o: cache.h
68 show-diff.o: cache.h
70 clean:
71 rm -f *.o $(PROG)
73 backup: clean
74 cd .. ; tar czvf dircache.tar.gz dir-cache