all repos — cgit @ 777faf7e509e1de2b795b2a326ff00c9bd799104

a hyperfast web frontend for git written in c

Makefile (view raw)

 1CGIT_VERSION = 0.1
 2
 3INSTALL_BIN = /var/www/htdocs/cgit.cgi
 4INSTALL_CSS = /var/www/htdocs/cgit.css
 5CACHE_ROOT = /var/cache/cgit
 6
 7EXTLIBS = ../git/libgit.a ../git/xdiff/lib.a -lz -lcrypto
 8OBJECTS = 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
11CFLAGS += -Wall
12
13ifdef DEBUG
14	CFLAGS += -g
15endif
16
17all: cgit
18
19install: all clean-cache
20	install cgit $(INSTALL_BIN)
21	install cgit.css $(INSTALL_CSS)
22
23cgit: 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
29ui-diff.o: xdiff.h
30
31.PHONY: clean
32clean:
33	rm -f cgit *.o
34
35clean-cache:
36	rm -rf $(CACHE_ROOT)/*