]> gitweb.ps.run Git - ps-cgit/blob - Makefile
Enable building with debuginfo
[ps-cgit] / Makefile
1 CGIT_VERSION = 0.1
2
3 INSTALL_BIN = /var/www/htdocs/cgit.cgi
4 INSTALL_CSS = /var/www/htdocs/cgit.css
5 CACHE_ROOT = /var/cache/cgit
6
7 EXTLIBS = ../git/libgit.a ../git/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
11 CFLAGS += -Wall
12
13 ifdef DEBUG
14         CFLAGS += -g
15 endif
16
17 all: cgit
18
19 install: all clean-cache
20         install cgit $(INSTALL_BIN)
21         install cgit.css $(INSTALL_CSS)
22
23 cgit: cgit.c cgit.h git.h $(OBJECTS)
24         $(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \
25                 $(OBJECTS) $(EXTLIBS)
26
27 $(OBJECTS): cgit.h git.h
28
29 ui-diff.o: xdiff.h
30
31 .PHONY: clean
32 clean:
33         rm -f cgit *.o
34
35 clean-cache:
36         rm -rf $(CACHE_ROOT)/*