]>
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 \ |
e74f8f6a | 18 | check-files ls-tree merge-base merge-cache unpack-file git-export \ |
d98b46f8 | 19 | diff-cache convert-cache |
e83c5163 LT |
20 | |
21 | all: $(PROG) | |
22 | ||
23 | install: $(PROG) | |
24 | install $(PROG) $(HOME)/bin/ | |
25 | ||
0fcfd160 | 26 | LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o |
0a02ce72 | 27 | LIB_FILE=libgit.a |
e590d694 | 28 | LIB_H=cache.h object.h |
0a02ce72 LT |
29 | |
30 | $(LIB_FILE): $(LIB_OBJS) | |
31 | $(AR) rcs $@ $(LIB_OBJS) | |
32 | ||
33 | LIBS= $(LIB_FILE) -lssl -lz | |
e83c5163 LT |
34 | |
35 | init-db: init-db.o | |
36 | ||
0a02ce72 LT |
37 | update-cache: update-cache.o $(LIB_FILE) |
38 | $(CC) $(CFLAGS) -o update-cache update-cache.o $(LIBS) | |
e83c5163 | 39 | |
0a02ce72 LT |
40 | show-diff: show-diff.o $(LIB_FILE) |
41 | $(CC) $(CFLAGS) -o show-diff show-diff.o $(LIBS) | |
e83c5163 | 42 | |
0a02ce72 LT |
43 | write-tree: write-tree.o $(LIB_FILE) |
44 | $(CC) $(CFLAGS) -o write-tree write-tree.o $(LIBS) | |
e83c5163 | 45 | |
0a02ce72 LT |
46 | read-tree: read-tree.o $(LIB_FILE) |
47 | $(CC) $(CFLAGS) -o read-tree read-tree.o $(LIBS) | |
e83c5163 | 48 | |
0a02ce72 LT |
49 | commit-tree: commit-tree.o $(LIB_FILE) |
50 | $(CC) $(CFLAGS) -o commit-tree commit-tree.o $(LIBS) | |
e83c5163 | 51 | |
0a02ce72 LT |
52 | cat-file: cat-file.o $(LIB_FILE) |
53 | $(CC) $(CFLAGS) -o cat-file cat-file.o $(LIBS) | |
e83c5163 | 54 | |
0a02ce72 LT |
55 | fsck-cache: fsck-cache.o $(LIB_FILE) object.o commit.o tree.o blob.o |
56 | $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o $(LIBS) | |
7660a188 | 57 | |
0a02ce72 LT |
58 | checkout-cache: checkout-cache.o $(LIB_FILE) |
59 | $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o $(LIBS) | |
33db5f4d | 60 | |
0a02ce72 LT |
61 | diff-tree: diff-tree.o $(LIB_FILE) |
62 | $(CC) $(CFLAGS) -o diff-tree diff-tree.o $(LIBS) | |
9174026c | 63 | |
0a02ce72 LT |
64 | rev-tree: rev-tree.o $(LIB_FILE) object.o commit.o tree.o blob.o |
65 | $(CC) $(CFLAGS) -o rev-tree rev-tree.o $(LIBS) | |
84fe9720 | 66 | |
0a02ce72 LT |
67 | show-files: show-files.o $(LIB_FILE) |
68 | $(CC) $(CFLAGS) -o show-files show-files.o $(LIBS) | |
8695c8bf | 69 | |
0a02ce72 LT |
70 | check-files: check-files.o $(LIB_FILE) |
71 | $(CC) $(CFLAGS) -o check-files check-files.o $(LIBS) | |
74b46e32 | 72 | |
0a02ce72 LT |
73 | ls-tree: ls-tree.o $(LIB_FILE) |
74 | $(CC) $(CFLAGS) -o ls-tree ls-tree.o $(LIBS) | |
7912c070 | 75 | |
0a02ce72 LT |
76 | merge-base: merge-base.o $(LIB_FILE) object.o commit.o tree.o blob.o |
77 | $(CC) $(CFLAGS) -o merge-base merge-base.o $(LIBS) | |
6683463e | 78 | |
0a02ce72 LT |
79 | merge-cache: merge-cache.o $(LIB_FILE) |
80 | $(CC) $(CFLAGS) -o merge-cache merge-cache.o $(LIBS) | |
75118b13 | 81 | |
3407bb49 LT |
82 | unpack-file: unpack-file.o $(LIB_FILE) |
83 | $(CC) $(CFLAGS) -o unpack-file unpack-file.o $(LIBS) | |
84 | ||
c9823a42 LT |
85 | git-export: git-export.o $(LIB_FILE) |
86 | $(CC) $(CFLAGS) -o git-export git-export.o $(LIBS) | |
87 | ||
e74f8f6a LT |
88 | diff-cache: diff-cache.o $(LIB_FILE) |
89 | $(CC) $(CFLAGS) -o diff-cache diff-cache.o $(LIBS) | |
90 | ||
d98b46f8 LT |
91 | convert-cache: convert-cache.o $(LIB_FILE) |
92 | $(CC) $(CFLAGS) -o convert-cache convert-cache.o $(LIBS) | |
93 | ||
e590d694 LT |
94 | blob.o: $(LIB_H) |
95 | cat-file.o: $(LIB_H) | |
96 | check-files.o: $(LIB_H) | |
97 | checkout-cache.o: $(LIB_H) | |
98 | commit.o: $(LIB_H) | |
99 | commit-tree.o: $(LIB_H) | |
d98b46f8 | 100 | convert-cache.o: $(LIB_H) |
e74f8f6a | 101 | diff-cache.o: $(LIB_H) |
e590d694 LT |
102 | diff-tree.o: $(LIB_H) |
103 | fsck-cache.o: $(LIB_H) | |
e74f8f6a | 104 | git-export.o: $(LIB_H) |
e590d694 LT |
105 | init-db.o: $(LIB_H) |
106 | ls-tree.o: $(LIB_H) | |
107 | merge-base.o: $(LIB_H) | |
108 | merge-cache.o: $(LIB_H) | |
109 | object.o: $(LIB_H) | |
110 | read-cache.o: $(LIB_H) | |
111 | read-tree.o: $(LIB_H) | |
112 | rev-tree.o: $(LIB_H) | |
113 | sha1_file.o: $(LIB_H) | |
114 | show-diff.o: $(LIB_H) | |
115 | show-files.o: $(LIB_H) | |
116 | tree.o: $(LIB_H) | |
117 | update-cache.o: $(LIB_H) | |
118 | usage.o: $(LIB_H) | |
3407bb49 | 119 | unpack-file.o: $(LIB_H) |
e590d694 | 120 | write-tree.o: $(LIB_H) |
e83c5163 LT |
121 | |
122 | clean: | |
0a02ce72 | 123 | rm -f *.o $(PROG) $(LIB_FILE) |
e83c5163 LT |
124 | |
125 | backup: clean | |
126 | cd .. ; tar czvf dircache.tar.gz dir-cache |