cgit

commit 447025f62ccbbb6e038d42009368e28f3e162460

Author: Lars Hjemli <hjemli@gmail.com>

Enable building with debuginfo

Add -g to CFLAGS when running make with DEBUG=1

Signed-off-by: Lars Hjemli <hjemli@gmail.com>

 Makefile | 4 ++++


diff --git a/Makefile b/Makefile
index c290c6f5672ab33b22ffc282188ec0b34dc707d9..a3e9b053e6d38bf1cde875cb11e2184a7e6cf21f 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,10 @@ 	ui-summary.o ui-log.o ui-view.c ui-tree.c ui-commit.c ui-diff.o
 
 CFLAGS += -Wall
 
+ifdef DEBUG
+	CFLAGS += -g
+endif
+
 all: cgit
 
 install: all clean-cache