|
diff --git a/Makefile b/Makefile index c2a5736..e69ad7e 100644 --- a/ Makefile+++ b/ Makefile |
|
@@ -1,8 +1,5 @@ |
1 | CGIT_VERSION = 0.5 |
| |
2 | |
| |
3 | prefix = /var/www/htdocs/cgit |
1 | prefix = /var/www/htdocs/cgit |
4 | |
| |
5 | SHA1_HEADER = <openssl/sha.h> |
2 | SHA1_HEADER = <openssl/sha.h> |
6 | CACHE_ROOT = /var/cache/cgit |
3 | CACHE_ROOT = /var/cache/cgit |
7 | CGIT_CONFIG = /etc/cgitrc |
4 | CGIT_CONFIG = /etc/cgitrc |
8 | CGIT_SCRIPT_NAME = cgit.cgi |
5 | CGIT_SCRIPT_NAME = cgit.cgi |
@@ -11,8 +8,19 @@ CGIT_SCRIPT_NAME = cgit.cgi |
11 | # Let the user override the above settings. |
8 | # Let the user override the above settings. |
12 | # |
9 | # |
13 | -include cgit.conf |
10 | -include cgit.conf |
14 | |
11 | |
| |
12 | |
| |
13 | CGIT_VERSION = 0.5 |
| |
14 | |
| |
15 | all: cgit |
| |
16 | |
| |
17 | VERSION: |
| |
18 | gen-version.sh |
| |
19 | |
| |
20 | -include VERSION |
| |
21 | |
| |
22 | |
15 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto |
23 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto |
16 | OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ |
24 | OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ |
17 | ui-summary.o ui-log.o ui-tree.o ui-commit.o ui-diff.o \ |
25 | ui-summary.o ui-log.o ui-tree.o ui-commit.o ui-diff.o \ |
18 | ui-snapshot.o ui-blob.o |
26 | ui-snapshot.o ui-blob.o |
@@ -41,14 +49,9 @@ else |
41 | INITGIT = ./submodules.sh -i |
49 | INITGIT = ./submodules.sh -i |
42 | endif |
50 | endif |
43 | |
51 | |
44 | |
52 | |
45 | # |
53 | cgit: cgit.c cgit.h VERSION $(OBJECTS) |
46 | # basic build rules |
| |
47 | # |
| |
48 | all: cgit |
| |
49 | |
| |
50 | cgit: cgit.c cgit.h $(OBJECTS) |
| |
51 | $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS) |
54 | $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS) |
52 | |
55 | |
53 | $(OBJECTS): cgit.h git/libgit.a |
56 | $(OBJECTS): cgit.h git/libgit.a |
54 | |
57 | |
@@ -64,9 +67,9 @@ install: all clean-cache |
64 | install cgit $(prefix)/$(CGIT_SCRIPT_NAME) |
67 | install cgit $(prefix)/$(CGIT_SCRIPT_NAME) |
65 | install cgit.css $(prefix)/cgit.css |
68 | install cgit.css $(prefix)/cgit.css |
66 | |
69 | |
67 | clean-cgit: |
70 | clean-cgit: |
68 | rm -f cgit *.o |
71 | rm -f cgit VERSION *.o |
69 | |
72 | |
70 | distclean-cgit: clean-cgit |
73 | distclean-cgit: clean-cgit |
71 | git clean -d -x |
74 | git clean -d -x |
72 | |
75 | |
@@ -82,6 +85,10 @@ clean-cache: |
82 | clean: clean-cgit clean-sub |
85 | clean: clean-cgit clean-sub |
83 | |
86 | |
84 | distclean: distclean-cgit distclean-sub |
87 | distclean: distclean-cgit distclean-sub |
85 | |
88 | |
| |
89 | version: clean-cgit |
| |
90 | ./gen-version.sh |
| |
91 | make |
| |
92 | |
86 | .PHONY: all install clean clean-cgit clean-sub clean-cache \ |
93 | .PHONY: all install clean clean-cgit clean-sub clean-cache \ |
87 | distclean distclean-cgit distclean-sub |
94 | distclean distclean-cgit distclean-sub release version |
|