d09390c00bcb951a49e28d79347d3505a87b4e8e
1CFLAGS=-g -O3 -Wall
2CC=gcc
3
4PROG= update-cache show-diff init-db write-tree read-tree commit-tree \
5 cat-file fsck-cache checkout-cache diff-tree
6
7all: $(PROG)
8
9install: $(PROG)
10 install $(PROG) $(HOME)/bin/
11
12LIBS= -lssl -lz
13
14init-db: init-db.o
15
16update-cache: update-cache.o read-cache.o
17 $(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)
18
19show-diff: show-diff.o read-cache.o
20 $(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)
21
22write-tree: write-tree.o read-cache.o
23 $(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)
24
25read-tree: read-tree.o read-cache.o
26 $(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)
27
28commit-tree: commit-tree.o read-cache.o
29 $(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)
30
31cat-file: cat-file.o read-cache.o
32 $(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)
33
34fsck-cache: fsck-cache.o read-cache.o
35 $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)
36
37checkout-cache: checkout-cache.o read-cache.o
38 $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)
39
40diff-tree: diff-tree.o read-cache.o
41 $(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)
42
43read-cache.o: cache.h
44show-diff.o: cache.h
45
46clean:
47 rm -f *.o $(PROG) temp_git_file_*
48
49backup: clean
50 cd .. ; tar czvf dircache.tar.gz dir-cache