commit 3ec3ea75d12a06c41b0115e26d3303edf803a032 parent 565e0d3cb62ab5496c5aa6023fc7f0141a4977e3 Author: Mohammad-Reza Nabipoor <m.nabipoor@yahoo.com> Date: Wed, 12 Aug 2020 22:43:18 +0430 Makefile: Add DEBUG variable to control CXXFLAGS Diffstat:
| M | Makefile | | | 8 | +++++++- |
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile @@ -1,5 +1,11 @@ -CXXFLAGS += -Wall -Wextra -O3 -std=c++14 +CXXFLAGS += -Wall -Wextra -std=c++14 + +ifndef DEBUG +CXXFLAGS += -O3 +else +CXXFLAGS += -g -ggdb -Og -fsanitize=address -fno-omit-frame-pointer +endif tflags += -I. -Itests # flags for tests eflags += -I. # flags for examples