summaryrefslogtreecommitdiffabout
path: root/Makefile
Unidiff
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile29
1 files changed, 18 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index c2a5736..e69ad7e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,5 @@
1CGIT_VERSION = 0.5
2
3prefix = /var/www/htdocs/cgit 1prefix = /var/www/htdocs/cgit
4
5SHA1_HEADER = <openssl/sha.h> 2SHA1_HEADER = <openssl/sha.h>
6CACHE_ROOT = /var/cache/cgit 3CACHE_ROOT = /var/cache/cgit
7CGIT_CONFIG = /etc/cgitrc 4CGIT_CONFIG = /etc/cgitrc
8CGIT_SCRIPT_NAME = cgit.cgi 5CGIT_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
13CGIT_VERSION = 0.5
14
15all: cgit
16
17VERSION:
18 gen-version.sh
19
20-include VERSION
21
22
15EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto 23EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto
16OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ 24OBJECTS = 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
41INITGIT = ./submodules.sh -i 49INITGIT = ./submodules.sh -i
42endif 50endif
43 51
44 52
45# 53cgit: cgit.c cgit.h VERSION $(OBJECTS)
46# basic build rules
47#
48all: cgit
49
50cgit: 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
67clean-cgit: 70clean-cgit:
68 rm -f cgit *.o 71 rm -f cgit VERSION *.o
69 72
70distclean-cgit: clean-cgit 73distclean-cgit: clean-cgit
71 git clean -d -x 74 git clean -d -x
72 75
@@ -82,6 +85,10 @@ clean-cache:
82clean: clean-cgit clean-sub 85clean: clean-cgit clean-sub
83 86
84distclean: distclean-cgit distclean-sub 87distclean: distclean-cgit distclean-sub
85 88
89version: 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