summaryrefslogtreecommitdiffabout
path: root/Makefile
Unidiff
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile1
1 files changed, 0 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 96d68cb..aa7146d 100644
--- a/Makefile
+++ b/Makefile
@@ -31,55 +31,54 @@ CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
31# a zipfile from hjemli.net instead 31# a zipfile from hjemli.net instead
32# 32#
33GITVER = $(shell git version 2>/dev/null || echo nogit) 33GITVER = $(shell git version 2>/dev/null || echo nogit)
34ifeq ($(GITVER),nogit) 34ifeq ($(GITVER),nogit)
35GITURL = http://hjemli.net/git/git/snapshot/?id=v1.5.2-rc2 35GITURL = http://hjemli.net/git/git/snapshot/?id=v1.5.2-rc2
36INITGIT = test -e git/git.c || (curl "$(GITURL)" > tmp.zip && unzip tmp.zip) 36INITGIT = test -e git/git.c || (curl "$(GITURL)" > tmp.zip && unzip tmp.zip)
37else 37else
38INITGIT = ./submodules.sh -i 38INITGIT = ./submodules.sh -i
39endif 39endif
40 40
41 41
42# 42#
43# basic build rules 43# basic build rules
44# 44#
45all: cgit 45all: cgit
46 46
47cgit: cgit.c cgit.h $(OBJECTS) 47cgit: cgit.c cgit.h $(OBJECTS)
48 $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS) 48 $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS)
49 49
50$(OBJECTS): cgit.h git/libgit.a 50$(OBJECTS): cgit.h git/libgit.a
51 51
52git/libgit.a: 52git/libgit.a:
53 $(INITGIT) 53 $(INITGIT)
54 $(MAKE) -C git 54 $(MAKE) -C git
55 55
56# 56#
57# phony targets 57# phony targets
58# 58#
59install: all clean-cache 59install: all clean-cache
60 mkdir -p $(prefix) 60 mkdir -p $(prefix)
61 install cgit $(prefix)/$(CGIT_SCRIPT_NAME) 61 install cgit $(prefix)/$(CGIT_SCRIPT_NAME)
62 install cgit.css $(prefix)/cgit.css 62 install cgit.css $(prefix)/cgit.css
63 install add.png del.png $(prefix)/
64 63
65clean-cgit: 64clean-cgit:
66 rm -f cgit *.o 65 rm -f cgit *.o
67 66
68distclean-cgit: clean-cgit 67distclean-cgit: clean-cgit
69 git clean -d -x 68 git clean -d -x
70 69
71clean-sub: 70clean-sub:
72 $(MAKE) -C git clean 71 $(MAKE) -C git clean
73 72
74distclean-sub: clean-sub 73distclean-sub: clean-sub
75 $(shell cd git && git clean -d -x) 74 $(shell cd git && git clean -d -x)
76 75
77clean-cache: 76clean-cache:
78 rm -rf $(CACHE_ROOT)/* 77 rm -rf $(CACHE_ROOT)/*
79 78
80clean: clean-cgit clean-sub 79clean: clean-cgit clean-sub
81 80
82distclean: distclean-cgit distclean-sub 81distclean: distclean-cgit distclean-sub
83 82
84.PHONY: all install clean clean-cgit clean-sub clean-cache \ 83.PHONY: all install clean clean-cgit clean-sub clean-cache \
85 distclean distclean-cgit distclean-sub 84 distclean distclean-cgit distclean-sub