Initial revision of "git", the information manager from hell
[git.git] / Makefile
1 CFLAGS=-g
2 CC=gcc
3
4 PROG=update-cache show-diff init-db write-tree read-tree commit-tree cat-file
5
6 all: $(PROG)
7
8 install: $(PROG)
9         install $(PROG) $(HOME)/bin/
10
11 LIBS= -lssl
12
13 init-db: init-db.o
14
15 update-cache: update-cache.o read-cache.o
16         $(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)
17
18 show-diff: show-diff.o read-cache.o
19         $(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)
20
21 write-tree: write-tree.o read-cache.o
22         $(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)
23
24 read-tree: read-tree.o read-cache.o
25         $(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)
26
27 commit-tree: commit-tree.o read-cache.o
28         $(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)
29
30 cat-file: cat-file.o read-cache.o
31         $(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)
32
33 read-cache.o: cache.h
34 show-diff.o: cache.h
35
36 clean:
37         rm -f *.o $(PROG) temp_git_file_*
38
39 backup: clean
40         cd .. ; tar czvf dircache.tar.gz dir-cache