2006-12-21 00:53:03 +01:00
|
|
|
CGIT_VERSION = 0.1
|
2006-12-09 15:18:17 +01:00
|
|
|
|
2007-02-04 23:57:34 +01:00
|
|
|
prefix = /var/www/htdocs/cgit
|
|
|
|
gitsrc = ../git
|
2006-12-09 15:18:17 +01:00
|
|
|
|
2007-02-04 23:57:34 +01:00
|
|
|
CACHE_ROOT = /var/cache/cgit
|
|
|
|
EXTLIBS = $(gitsrc)/libgit.a $(gitsrc)/xdiff/lib.a -lz -lcrypto
|
2006-12-11 17:25:41 +01:00
|
|
|
OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \
|
2006-12-20 22:48:27 +01:00
|
|
|
ui-summary.o ui-log.o ui-view.c ui-tree.c ui-commit.c ui-diff.o
|
2006-12-10 22:31:36 +01:00
|
|
|
|
|
|
|
CFLAGS += -Wall
|
2006-12-09 15:18:17 +01:00
|
|
|
|
2007-01-17 01:13:05 +01:00
|
|
|
ifdef DEBUG
|
|
|
|
CFLAGS += -g
|
|
|
|
endif
|
|
|
|
|
2006-12-09 15:18:17 +01:00
|
|
|
all: cgit
|
|
|
|
|
2006-12-13 14:39:41 +01:00
|
|
|
install: all clean-cache
|
2007-02-04 23:57:34 +01:00
|
|
|
mkdir -p $(prefix)
|
|
|
|
install cgit $(prefix)/cgit.cgi
|
|
|
|
install cgit.css $(prefix)/cgit.css
|
2006-12-09 15:18:17 +01:00
|
|
|
|
2007-02-04 23:57:34 +01:00
|
|
|
cgit: cgit.c cgit.h git.h $(OBJECTS) $(gitsrc)/libgit.a
|
2006-12-11 16:11:40 +01:00
|
|
|
$(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \
|
|
|
|
$(OBJECTS) $(EXTLIBS)
|
2006-12-09 15:18:17 +01:00
|
|
|
|
2006-12-09 15:29:05 +01:00
|
|
|
$(OBJECTS): cgit.h git.h
|
2006-12-10 23:50:16 +01:00
|
|
|
|
2006-12-21 00:47:05 +01:00
|
|
|
ui-diff.o: xdiff.h
|
|
|
|
|
2007-02-04 23:57:34 +01:00
|
|
|
$(gitsrc)/libgit.a:
|
|
|
|
$(MAKE) -C $(gitsrc)
|
|
|
|
|
|
|
|
|
2006-12-10 23:50:16 +01:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f cgit *.o
|
2006-12-13 14:39:41 +01:00
|
|
|
|
|
|
|
clean-cache:
|
|
|
|
rm -rf $(CACHE_ROOT)/*
|