]>
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). | |
2dee0609 | 10 | CFLAGS=-g -O2 -Wall |
5c2a7fbc | 11 | |
e83c5163 | 12 | CC=gcc |
0a02ce72 | 13 | AR=ar |
e83c5163 | 14 | |
cd2fb81d | 15 | SCRIPTS=git-merge-one-file-script git-prune-script git-pull-script git-tag-script |
bdd4da59 | 16 | |
7912c070 | 17 | PROG= update-cache show-diff init-db write-tree read-tree commit-tree \ |
74b46e32 | 18 | cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \ |
e74f8f6a | 19 | check-files ls-tree merge-base merge-cache unpack-file git-export \ |
ec4465ad | 20 | diff-cache convert-cache http-pull rpush rpull rev-list git-mktag |
e83c5163 LT |
21 | |
22 | all: $(PROG) | |
23 | ||
cd2fb81d LT |
24 | install: $(PROG) $(SCRIPTS) |
25 | install $(PROG) $(SCRIPTS) $(HOME)/bin/ | |
e83c5163 | 26 | |
0fcfd160 | 27 | LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o |
0a02ce72 | 28 | LIB_FILE=libgit.a |
e590d694 | 29 | LIB_H=cache.h object.h |
0a02ce72 | 30 | |
86436c28 JH |
31 | LIB_H += diff.h |
32 | LIB_OBJS += diff.o | |
33 | ||
cc1ad5c8 LT |
34 | LIBS = $(LIB_FILE) |
35 | LIBS += -lz | |
cef661fc LT |
36 | |
37 | ifdef MOZILLA_SHA1 | |
38 | SHA1_HEADER="mozilla-sha1/sha1.h" | |
39 | LIB_OBJS += mozilla-sha1/sha1.o | |
a6ef3518 PM |
40 | else |
41 | ifdef PPC_SHA1 | |
42 | SHA1_HEADER="ppc/sha1.h" | |
43 | LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o | |
cef661fc LT |
44 | else |
45 | SHA1_HEADER=<openssl/sha.h> | |
46 | LIBS += -lssl | |
47 | endif | |
a6ef3518 | 48 | endif |
cef661fc LT |
49 | |
50 | CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)' | |
cc1ad5c8 | 51 | |
0a02ce72 LT |
52 | $(LIB_FILE): $(LIB_OBJS) |
53 | $(AR) rcs $@ $(LIB_OBJS) | |
54 | ||
e83c5163 LT |
55 | init-db: init-db.o |
56 | ||
90ffd095 | 57 | %: %.c $(LIB_FILE) |
6eb7ed54 DB |
58 | $(CC) $(CFLAGS) -o $@ $(filter %.c,$^) $(LIBS) |
59 | ||
60 | rpush: rsh.c | |
61 | ||
62 | rpull: rsh.c | |
63 | ||
64 | http-pull: LIBS += -lcurl | |
d98b46f8 | 65 | |
e590d694 LT |
66 | blob.o: $(LIB_H) |
67 | cat-file.o: $(LIB_H) | |
68 | check-files.o: $(LIB_H) | |
69 | checkout-cache.o: $(LIB_H) | |
70 | commit.o: $(LIB_H) | |
71 | commit-tree.o: $(LIB_H) | |
d98b46f8 | 72 | convert-cache.o: $(LIB_H) |
86436c28 | 73 | diff.o: $(LIB_H) |
e74f8f6a | 74 | diff-cache.o: $(LIB_H) |
e590d694 LT |
75 | diff-tree.o: $(LIB_H) |
76 | fsck-cache.o: $(LIB_H) | |
e74f8f6a | 77 | git-export.o: $(LIB_H) |
e590d694 LT |
78 | init-db.o: $(LIB_H) |
79 | ls-tree.o: $(LIB_H) | |
80 | merge-base.o: $(LIB_H) | |
81 | merge-cache.o: $(LIB_H) | |
82 | object.o: $(LIB_H) | |
83 | read-cache.o: $(LIB_H) | |
84 | read-tree.o: $(LIB_H) | |
85 | rev-tree.o: $(LIB_H) | |
86 | sha1_file.o: $(LIB_H) | |
87 | show-diff.o: $(LIB_H) | |
88 | show-files.o: $(LIB_H) | |
89 | tree.o: $(LIB_H) | |
90 | update-cache.o: $(LIB_H) | |
91 | usage.o: $(LIB_H) | |
3407bb49 | 92 | unpack-file.o: $(LIB_H) |
e590d694 | 93 | write-tree.o: $(LIB_H) |
6eb7ed54 DB |
94 | http-pull.o: $(LIB_H) |
95 | rpull.o: $(LIB_H) | |
96 | rpush.o: $(LIB_H) | |
e83c5163 LT |
97 | |
98 | clean: | |
a6ef3518 | 99 | rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE) |
e83c5163 LT |
100 | |
101 | backup: clean | |
102 | cd .. ; tar czvf dircache.tar.gz dir-cache |