]> git.cameronkatri.com Git - cgit.git/blob - Makefile
Layout update
[cgit.git] / Makefile
1 CGIT_VERSION = 0.2
2
3 prefix = /var/www/htdocs/cgit
4 gitsrc = ../git
5
6 CACHE_ROOT = /var/cache/cgit
7 EXTLIBS = $(gitsrc)/libgit.a $(gitsrc)/xdiff/lib.a -lz -lcrypto
8 OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \
9 ui-summary.o ui-log.o ui-view.c ui-tree.c ui-commit.c ui-diff.o \
10 ui-snapshot.o
11
12 CFLAGS += -Wall
13
14 ifdef DEBUG
15 CFLAGS += -g
16 endif
17
18 all: cgit
19
20 install: all clean-cache
21 mkdir -p $(prefix)
22 install cgit $(prefix)/cgit.cgi
23 install cgit.css $(prefix)/cgit.css
24
25 cgit: cgit.c cgit.h git.h $(OBJECTS) $(gitsrc)/libgit.a
26 $(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \
27 $(OBJECTS) $(EXTLIBS)
28
29 $(OBJECTS): cgit.h git.h
30
31 ui-diff.o: xdiff.h
32
33 $(gitsrc)/libgit.a:
34 $(MAKE) -C $(gitsrc)
35
36
37 .PHONY: clean
38 clean:
39 rm -f cgit *.o
40
41 clean-cache:
42 rm -rf $(CACHE_ROOT)/*