|
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 | # |
33 | GITVER = $(shell git version 2>/dev/null || echo nogit) |
33 | GITVER = $(shell git version 2>/dev/null || echo nogit) |
34 | ifeq ($(GITVER),nogit) |
34 | ifeq ($(GITVER),nogit) |
35 | GITURL = http://hjemli.net/git/git/snapshot/?id=v1.5.2-rc2 |
35 | GITURL = http://hjemli.net/git/git/snapshot/?id=v1.5.2-rc2 |
36 | INITGIT = test -e git/git.c || (curl "$(GITURL)" > tmp.zip && unzip tmp.zip) |
36 | INITGIT = test -e git/git.c || (curl "$(GITURL)" > tmp.zip && unzip tmp.zip) |
37 | else |
37 | else |
38 | INITGIT = ./submodules.sh -i |
38 | INITGIT = ./submodules.sh -i |
39 | endif |
39 | endif |
40 | |
40 | |
41 | |
41 | |
42 | # |
42 | # |
43 | # basic build rules |
43 | # basic build rules |
44 | # |
44 | # |
45 | all: cgit |
45 | all: cgit |
46 | |
46 | |
47 | cgit: cgit.c cgit.h $(OBJECTS) |
47 | cgit: 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 | |
52 | git/libgit.a: |
52 | git/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 | # |
59 | install: all clean-cache |
59 | install: 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 | |
65 | clean-cgit: |
64 | clean-cgit: |
66 | rm -f cgit *.o |
65 | rm -f cgit *.o |
67 | |
66 | |
68 | distclean-cgit: clean-cgit |
67 | distclean-cgit: clean-cgit |
69 | git clean -d -x |
68 | git clean -d -x |
70 | |
69 | |
71 | clean-sub: |
70 | clean-sub: |
72 | $(MAKE) -C git clean |
71 | $(MAKE) -C git clean |
73 | |
72 | |
74 | distclean-sub: clean-sub |
73 | distclean-sub: clean-sub |
75 | $(shell cd git && git clean -d -x) |
74 | $(shell cd git && git clean -d -x) |
76 | |
75 | |
77 | clean-cache: |
76 | clean-cache: |
78 | rm -rf $(CACHE_ROOT)/* |
77 | rm -rf $(CACHE_ROOT)/* |
79 | |
78 | |
80 | clean: clean-cgit clean-sub |
79 | clean: clean-cgit clean-sub |
81 | |
80 | |
82 | distclean: distclean-cgit distclean-sub |
81 | distclean: 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 |
|