Makefileon commit [PATCH] ls-tree for listing trees (7912c07)
   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 rev-tree show-files \
   6        check-files ls-tree
   7
   8all: $(PROG)
   9
  10install: $(PROG)
  11        install $(PROG) $(HOME)/bin/
  12
  13LIBS= -lssl -lz
  14
  15init-db: init-db.o
  16
  17update-cache: update-cache.o read-cache.o
  18        $(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)
  19
  20show-diff: show-diff.o read-cache.o
  21        $(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)
  22
  23write-tree: write-tree.o read-cache.o
  24        $(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)
  25
  26read-tree: read-tree.o read-cache.o
  27        $(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)
  28
  29commit-tree: commit-tree.o read-cache.o
  30        $(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)
  31
  32cat-file: cat-file.o read-cache.o
  33        $(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)
  34
  35fsck-cache: fsck-cache.o read-cache.o
  36        $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)
  37
  38checkout-cache: checkout-cache.o read-cache.o
  39        $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)
  40
  41diff-tree: diff-tree.o read-cache.o
  42        $(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)
  43
  44rev-tree: rev-tree.o read-cache.o
  45        $(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o $(LIBS)
  46
  47show-files: show-files.o read-cache.o
  48        $(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)
  49
  50check-files: check-files.o read-cache.o
  51        $(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)
  52
  53ls-tree: ls-tree.o read-cache.o
  54        $(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)
  55
  56read-cache.o: cache.h
  57show-diff.o: cache.h
  58
  59clean:
  60        rm -f *.o $(PROG) temp_git_file_*
  61
  62backup: clean
  63        cd .. ; tar czvf dircache.tar.gz dir-cache