summaryrefslogtreecommitdiffabout
path: root/Makefile
Unidiff
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile29
1 files changed, 22 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index d9ff7d8..d1950cb 100644
--- a/Makefile
+++ b/Makefile
@@ -5,55 +5,70 @@ CGIT_CONFIG = /etc/cgitrc
5CACHE_ROOT = /var/cache/cgit 5CACHE_ROOT = /var/cache/cgit
6SHA1_HEADER = <openssl/sha.h> 6SHA1_HEADER = <openssl/sha.h>
7GIT_VER = 1.5.4.1 7GIT_VER = 1.5.4.1
8GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 8GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2
9 9
10# 10#
11# Let the user override the above settings. 11# Let the user override the above settings.
12# 12#
13-include cgit.conf 13-include cgit.conf
14 14
15 15
16EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto 16EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto
17OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ 17OBJECTS =
18 ui-summary.o ui-log.o ui-tree.o ui-commit.o ui-diff.o \ 18OBJECTS += cache.o
19 ui-snapshot.o ui-blob.o ui-tag.o ui-refs.o ui-patch.o cmd.o 19OBJECTS += cgit.o
20 20OBJECTS += cmd.o
21OBJECTS += html.o
22OBJECTS += parsing.o
23OBJECTS += shared.o
24OBJECTS += ui-blob.o
25OBJECTS += ui-commit.o
26OBJECTS += ui-diff.o
27OBJECTS += ui-log.o
28OBJECTS += ui-patch.o
29OBJECTS += ui-refs.o
30OBJECTS += ui-repolist.o
31OBJECTS += ui-shared.o
32OBJECTS += ui-snapshot.o
33OBJECTS += ui-summary.o
34OBJECTS += ui-tag.o
35OBJECTS += ui-tree.o
21 36
22ifdef NEEDS_LIBICONV 37ifdef NEEDS_LIBICONV
23 EXTLIBS += -liconv 38 EXTLIBS += -liconv
24endif 39endif
25 40
26 41
27.PHONY: all git test install clean distclean emptycache force-version get-git 42.PHONY: all git test install clean distclean emptycache force-version get-git
28 43
29all: cgit git 44all: cgit git
30 45
31VERSION: force-version 46VERSION: force-version
32 @./gen-version.sh "$(CGIT_VERSION)" 47 @./gen-version.sh "$(CGIT_VERSION)"
33-include VERSION 48-include VERSION
34 49
35 50
36CFLAGS += -g -Wall -Igit 51CFLAGS += -g -Wall -Igit
37CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' 52CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)'
38CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' 53CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
39CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' 54CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
40CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' 55CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
41CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"' 56CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'
42 57
43 58
44cgit: cgit.c $(OBJECTS) 59cgit: $(OBJECTS)
45 $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS) 60 $(CC) $(CFLAGS) -o cgit $(OBJECTS) $(EXTLIBS)
46 61
47$(OBJECTS): cgit.h git/xdiff/lib.a git/libgit.a VERSION 62$(OBJECTS): git/xdiff/lib.a git/libgit.a VERSION
48 63
49git/xdiff/lib.a: | git 64git/xdiff/lib.a: | git
50 65
51git/libgit.a: | git 66git/libgit.a: | git
52 67
53git: 68git:
54 cd git && $(MAKE) xdiff/lib.a 69 cd git && $(MAKE) xdiff/lib.a
55 cd git && $(MAKE) libgit.a 70 cd git && $(MAKE) libgit.a
56 71
57test: all 72test: all
58 $(MAKE) -C tests 73 $(MAKE) -C tests
59 74