]>
Commit | Line | Data |
---|---|---|
5c2a7fbc PB |
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. | |
bdd4da59 PB |
4 | # |
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). | |
19b2860c | 10 | CFLAGS=-g -O3 -Wall |
5c2a7fbc | 11 | |
e83c5163 | 12 | CC=gcc |
0a02ce72 | 13 | AR=ar |
e83c5163 | 14 | |
bdd4da59 | 15 | |
7912c070 | 16 | PROG= update-cache show-diff init-db write-tree read-tree commit-tree \ |
74b46e32 | 17 | cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \ |
75118b13 | 18 | check-files ls-tree merge-base merge-cache |
e83c5163 LT |
19 | |
20 | all: $(PROG) | |
21 | ||
22 | install: $(PROG) | |
23 | install $(PROG) $(HOME)/bin/ | |
24 | ||
0fcfd160 | 25 | LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o |
0a02ce72 LT |
26 | LIB_FILE=libgit.a |
27 | ||
28 | $(LIB_FILE): $(LIB_OBJS) | |
29 | $(AR) rcs $@ $(LIB_OBJS) | |
30 | ||
31 | LIBS= $(LIB_FILE) -lssl -lz | |
e83c5163 LT |
32 | |
33 | init-db: init-db.o | |
34 | ||
0a02ce72 LT |
35 | update-cache: update-cache.o $(LIB_FILE) |
36 | $(CC) $(CFLAGS) -o update-cache update-cache.o $(LIBS) | |
e83c5163 | 37 | |
0a02ce72 LT |
38 | show-diff: show-diff.o $(LIB_FILE) |
39 | $(CC) $(CFLAGS) -o show-diff show-diff.o $(LIBS) | |
e83c5163 | 40 | |
0a02ce72 LT |
41 | write-tree: write-tree.o $(LIB_FILE) |
42 | $(CC) $(CFLAGS) -o write-tree write-tree.o $(LIBS) | |
e83c5163 | 43 | |
0a02ce72 LT |
44 | read-tree: read-tree.o $(LIB_FILE) |
45 | $(CC) $(CFLAGS) -o read-tree read-tree.o $(LIBS) | |
e83c5163 | 46 | |
0a02ce72 LT |
47 | commit-tree: commit-tree.o $(LIB_FILE) |
48 | $(CC) $(CFLAGS) -o commit-tree commit-tree.o $(LIBS) | |
e83c5163 | 49 | |
0a02ce72 LT |
50 | cat-file: cat-file.o $(LIB_FILE) |
51 | $(CC) $(CFLAGS) -o cat-file cat-file.o $(LIBS) | |
e83c5163 | 52 | |
0a02ce72 LT |
53 | fsck-cache: fsck-cache.o $(LIB_FILE) object.o commit.o tree.o blob.o |
54 | $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o $(LIBS) | |
7660a188 | 55 | |
0a02ce72 LT |
56 | checkout-cache: checkout-cache.o $(LIB_FILE) |
57 | $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o $(LIBS) | |
33db5f4d | 58 | |
0a02ce72 LT |
59 | diff-tree: diff-tree.o $(LIB_FILE) |
60 | $(CC) $(CFLAGS) -o diff-tree diff-tree.o $(LIBS) | |
9174026c | 61 | |
0a02ce72 LT |
62 | rev-tree: rev-tree.o $(LIB_FILE) object.o commit.o tree.o blob.o |
63 | $(CC) $(CFLAGS) -o rev-tree rev-tree.o $(LIBS) | |
84fe9720 | 64 | |
0a02ce72 LT |
65 | show-files: show-files.o $(LIB_FILE) |
66 | $(CC) $(CFLAGS) -o show-files show-files.o $(LIBS) | |
8695c8bf | 67 | |
0a02ce72 LT |
68 | check-files: check-files.o $(LIB_FILE) |
69 | $(CC) $(CFLAGS) -o check-files check-files.o $(LIBS) | |
74b46e32 | 70 | |
0a02ce72 LT |
71 | ls-tree: ls-tree.o $(LIB_FILE) |
72 | $(CC) $(CFLAGS) -o ls-tree ls-tree.o $(LIBS) | |
7912c070 | 73 | |
0a02ce72 LT |
74 | merge-base: merge-base.o $(LIB_FILE) object.o commit.o tree.o blob.o |
75 | $(CC) $(CFLAGS) -o merge-base merge-base.o $(LIBS) | |
6683463e | 76 | |
0a02ce72 LT |
77 | merge-cache: merge-cache.o $(LIB_FILE) |
78 | $(CC) $(CFLAGS) -o merge-cache merge-cache.o $(LIBS) | |
75118b13 | 79 | |
e83c5163 LT |
80 | read-cache.o: cache.h |
81 | show-diff.o: cache.h | |
82 | ||
83 | clean: | |
0a02ce72 | 84 | rm -f *.o $(PROG) $(LIB_FILE) |
e83c5163 LT |
85 | |
86 | backup: clean | |
87 | cd .. ; tar czvf dircache.tar.gz dir-cache |