|
diff --git a/Makefile b/Makefile index 138f261..86b2a70 100644 --- a/ Makefile+++ b/ Makefile |
|
@@ -1,67 +1,67 @@ |
1 | CGIT_VERSION = 0.2 |
1 | CGIT_VERSION = 0.3 |
2 | |
2 | |
3 | prefix = /var/www/htdocs/cgit |
3 | prefix = /var/www/htdocs/cgit |
4 | |
4 | |
5 | SHA1_HEADER = <openssl/sha.h> |
5 | SHA1_HEADER = <openssl/sha.h> |
6 | |
6 | |
7 | CACHE_ROOT = /var/cache/cgit |
7 | CACHE_ROOT = /var/cache/cgit |
8 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto |
8 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto |
9 | OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ |
9 | OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ |
10 | ui-summary.o ui-log.o ui-view.o ui-tree.o ui-commit.o ui-diff.o \ |
10 | ui-summary.o ui-log.o ui-view.o ui-tree.o ui-commit.o ui-diff.o \ |
11 | ui-snapshot.o ui-blob.o |
11 | ui-snapshot.o ui-blob.o |
12 | |
12 | |
13 | CFLAGS += -Wall |
13 | CFLAGS += -Wall |
14 | |
14 | |
15 | ifdef DEBUG |
15 | ifdef DEBUG |
16 | CFLAGS += -g |
16 | CFLAGS += -g |
17 | endif |
17 | endif |
18 | |
18 | |
19 | CFLAGS += -Igit -DSHA1_HEADER='$(SHA1_HEADER)' |
19 | CFLAGS += -Igit -DSHA1_HEADER='$(SHA1_HEADER)' |
20 | |
20 | |
21 | |
21 | |
22 | |
22 | |
23 | |
23 | |
24 | # |
24 | # |
25 | # basic build rules |
25 | # basic build rules |
26 | # |
26 | # |
27 | all: cgit |
27 | all: cgit |
28 | |
28 | |
29 | cgit: cgit.c cgit.h $(OBJECTS) |
29 | cgit: cgit.c cgit.h $(OBJECTS) |
30 | $(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \ |
30 | $(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \ |
31 | $(OBJECTS) $(EXTLIBS) |
31 | $(OBJECTS) $(EXTLIBS) |
32 | |
32 | |
33 | $(OBJECTS): cgit.h git/libgit.a |
33 | $(OBJECTS): cgit.h git/libgit.a |
34 | |
34 | |
35 | git/libgit.a: |
35 | git/libgit.a: |
36 | ./submodules.sh -i |
36 | ./submodules.sh -i |
37 | $(MAKE) -C git |
37 | $(MAKE) -C git |
38 | |
38 | |
39 | # |
39 | # |
40 | # phony targets |
40 | # phony targets |
41 | # |
41 | # |
42 | install: all clean-cache |
42 | install: all clean-cache |
43 | mkdir -p $(prefix) |
43 | mkdir -p $(prefix) |
44 | install cgit $(prefix)/cgit.cgi |
44 | install cgit $(prefix)/cgit.cgi |
45 | install cgit.css $(prefix)/cgit.css |
45 | install cgit.css $(prefix)/cgit.css |
46 | |
46 | |
47 | clean-cgit: |
47 | clean-cgit: |
48 | rm -f cgit *.o |
48 | rm -f cgit *.o |
49 | |
49 | |
50 | distclean-cgit: clean-cgit |
50 | distclean-cgit: clean-cgit |
51 | git clean -d -x |
51 | git clean -d -x |
52 | |
52 | |
53 | clean-sub: |
53 | clean-sub: |
54 | $(MAKE) -C git clean |
54 | $(MAKE) -C git clean |
55 | |
55 | |
56 | distclean-sub: clean-sub |
56 | distclean-sub: clean-sub |
57 | $(shell cd git && git clean -d -x) |
57 | $(shell cd git && git clean -d -x) |
58 | |
58 | |
59 | clean-cache: |
59 | clean-cache: |
60 | rm -rf $(CACHE_ROOT)/* |
60 | rm -rf $(CACHE_ROOT)/* |
61 | |
61 | |
62 | clean: clean-cgit clean-sub |
62 | clean: clean-cgit clean-sub |
63 | |
63 | |
64 | distclean: distclean-cgit distclean-sub |
64 | distclean: distclean-cgit distclean-sub |
65 | |
65 | |
66 | .PHONY: all install clean clean-cgit clean-sub clean-cache \ |
66 | .PHONY: all install clean clean-cgit clean-sub clean-cache \ |
67 | distclean distclean-cgit distclean-sub |
67 | distclean distclean-cgit distclean-sub |
|