Standard user has no need in debugging information. This patch adds DEBUG=1 option to compile git with debugging symbols and compile without it by default. Signed-off-by: Alexander Kuleshov <kuleshovmail@xxxxxxxxx> --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b5b4cee..83ff691 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ all:: # Define V=1 to have a more verbose compile. # +# Define DEBUG=1 to compile git with debugging symbols. +# # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken. # # Define SANE_TOOL_PATH to a colon-separated list of paths to prepend @@ -363,8 +365,13 @@ GIT-VERSION-FILE: FORCE -include GIT-VERSION-FILE # CFLAGS and LDFLAGS are for the users to override from the command line. +DEBUG_CFLAGS= + +ifdef DEBUG + DEBUG_CFLAGS = -g +endif -CFLAGS = -g -O2 -Wall +CFLAGS = $(DEBUG_CFLAGS) -O2 -Wall LDFLAGS = ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) ALL_LDFLAGS = $(LDFLAGS) -- 2.3.0.rc1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html