all repos — cgit @ bb3e7950c39b67e863a618b3a0e766544b65d3cb

a hyperfast web frontend for git written in c

Makefile (view raw)

 1CGIT_VERSION = 0.1
 2
 3INSTALL_DIR = /var/www/htdocs/cgit
 4CACHE_ROOT = /var/cache/cgit
 5
 6EXTLIBS = ../git/libgit.a ../git/xdiff/lib.a -lz -lcrypto
 7OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \
 8	ui-summary.o ui-log.o ui-view.c ui-tree.c ui-commit.c ui-diff.o
 9
10CFLAGS += -Wall
11
12ifdef DEBUG
13	CFLAGS += -g
14endif
15
16all: cgit
17
18install: all clean-cache
19	install cgit $(INSTALL_DIR)/cgit.cgi
20	install cgit.css $(INSTALL_DIR)/cgit.css
21
22cgit: cgit.c cgit.h git.h $(OBJECTS)
23	$(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \
24		$(OBJECTS) $(EXTLIBS)
25
26$(OBJECTS): cgit.h git.h
27
28ui-diff.o: xdiff.h
29
30.PHONY: clean
31clean:
32	rm -f cgit *.o
33
34clean-cache:
35	rm -rf $(CACHE_ROOT)/*