Code cleanup on the shot validation path
[Project_algorithmic_C.git] / Makefile
index 2a3ae221164a3d8a19d2b6d5197fa8b1da2616c5..1019d5edd553ce3fac0930866eb21bd660ec4e93 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,7 @@ UNAME := $(shell uname -s)
 ifeq ($(BUILD_TYPE),debug)
 BUILDDIR := .build/debug
 DEBUG_FLAG = -g
+DEBUG = 1
 STRIP_FLAG =
 OPTI_FLAG = -O0
 LTO_SUPPORT = yes
@@ -47,6 +48,7 @@ GOLD_SUPPORT = yes
 else
 BUILDDIR := .build/release
 DEBUG_FLAG =
+DEBUG = 0
 STRIP_FLAG = -s
 OPTI_FLAG = -O3
 LTO_SUPPORT = yes
@@ -106,7 +108,7 @@ endif
 
 # Putting header files in the source directory is not the purpose of this INCLUDES_PATH variable
 INCLUDES_PATH := $(INCLUDES_PATH) -I$(LIBRARY_PATH)
-CFLAGS := $(CFLAGS) $(CFLAGS_LTO) $(WARN_FLAGS) $(STD_FLAG) $(OPTI_FLAG) $(DEBUG_FLAG) $(INCLUDES_PATH)
+CFLAGS := -DDEBUG=$(DEBUG) $(CFLAGS) $(CFLAGS_LTO) $(WARN_FLAGS) $(STD_FLAG) $(OPTI_FLAG) $(DEBUG_FLAG) $(INCLUDES_PATH)
 LIBCFLAGS := -fPIC $(CFLAGS)
 LDFLAGS := $(LDFLAGS) $(LDFLAGS_LTO) $(LDFLAGS_GOLD) $(STRIP_FLAG)
 LIBLDFLAGS := $(SHLIBLDFLAG) $(LDFLAGS)