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