author | Lars Hjemli <hjemli@gmail.com> | 2007-01-17 00:13:05 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-01-17 00:13:05 (UTC) |
commit | 447025f62ccbbb6e038d42009368e28f3e162460 (patch) (unidiff) | |
tree | 3416bbab45fd5addc10f31905d0a99c32f00bc08 | |
parent | 23734c5a2b607dca2d634cafdc63202a687f26d3 (diff) | |
download | cgit-447025f62ccbbb6e038d42009368e28f3e162460.zip cgit-447025f62ccbbb6e038d42009368e28f3e162460.tar.gz cgit-447025f62ccbbb6e038d42009368e28f3e162460.tar.bz2 |
Enable building with debuginfo
Add -g to CFLAGS when running make with DEBUG=1
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,32 +1,36 @@ | |||
1 | CGIT_VERSION = 0.1 | 1 | CGIT_VERSION = 0.1 |
2 | 2 | ||
3 | INSTALL_BIN = /var/www/htdocs/cgit.cgi | 3 | INSTALL_BIN = /var/www/htdocs/cgit.cgi |
4 | INSTALL_CSS = /var/www/htdocs/cgit.css | 4 | INSTALL_CSS = /var/www/htdocs/cgit.css |
5 | CACHE_ROOT = /var/cache/cgit | 5 | CACHE_ROOT = /var/cache/cgit |
6 | 6 | ||
7 | EXTLIBS = ../git/libgit.a ../git/xdiff/lib.a -lz -lcrypto | 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 \ | 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 | 9 | ui-summary.o ui-log.o ui-view.c ui-tree.c ui-commit.c ui-diff.o |
10 | 10 | ||
11 | CFLAGS += -Wall | 11 | CFLAGS += -Wall |
12 | 12 | ||
13 | ifdef DEBUG | ||
14 | CFLAGS += -g | ||
15 | endif | ||
16 | |||
13 | all: cgit | 17 | all: cgit |
14 | 18 | ||
15 | install: all clean-cache | 19 | install: all clean-cache |
16 | install cgit $(INSTALL_BIN) | 20 | install cgit $(INSTALL_BIN) |
17 | install cgit.css $(INSTALL_CSS) | 21 | install cgit.css $(INSTALL_CSS) |
18 | 22 | ||
19 | cgit: cgit.c cgit.h git.h $(OBJECTS) | 23 | cgit: cgit.c cgit.h git.h $(OBJECTS) |
20 | $(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \ | 24 | $(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \ |
21 | $(OBJECTS) $(EXTLIBS) | 25 | $(OBJECTS) $(EXTLIBS) |
22 | 26 | ||
23 | $(OBJECTS): cgit.h git.h | 27 | $(OBJECTS): cgit.h git.h |
24 | 28 | ||
25 | ui-diff.o: xdiff.h | 29 | ui-diff.o: xdiff.h |
26 | 30 | ||
27 | .PHONY: clean | 31 | .PHONY: clean |
28 | clean: | 32 | clean: |
29 | rm -f cgit *.o | 33 | rm -f cgit *.o |
30 | 34 | ||
31 | clean-cache: | 35 | clean-cache: |
32 | rm -rf $(CACHE_ROOT)/* | 36 | rm -rf $(CACHE_ROOT)/* |