summaryrefslogtreecommitdiffhomepage
path: root/auto/make
diff options
context:
space:
mode:
Diffstat (limited to 'auto/make')
-rw-r--r--auto/make11
1 files changed, 11 insertions, 0 deletions
diff --git a/auto/make b/auto/make
index 34335385..1d54ab40 100644
--- a/auto/make
+++ b/auto/make
@@ -52,6 +52,17 @@ ifeq (\$V,1)
v :=
endif
+# Optionally enable debugging builds with
+# make D=1 ...
+# -g is always used, this just changes the optimisation level.
+# On GCC this would be -Og, however according to the clang(1)
+# man page, -O0 'generates the most debuggable code'.
+D := 0
+
+ifeq (\$D,1)
+ CFLAGS += -O0
+endif
+
END
fi