X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=7ddb643c11710713b2b782d4a4dfc8203577c928;hp=b23d671f07600388a87a3956fc211980f1659352;hb=ddcb572c41d660f7ed2baa8c21fb56dec0bc7a7c;hpb=12c0dfc11364f915d90032a3dfbac3ed8f39db0a diff --git a/src/Makefile b/src/Makefile index b23d671f..7ddb643c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -231,7 +231,7 @@ ifeq ($(COMP),clang) endif ### 3.2 General compiler settings -CXXFLAGS = -g -Wall -Wcast-qual -fno-exceptions -fno-rtti $(EXTRACXXFLAGS) +CXXFLAGS = -Wall -Wcast-qual -fno-exceptions -fno-rtti $(EXTRACXXFLAGS) ifeq ($(comp),gcc) CXXFLAGS += -ansi -pedantic -Wno-long-long -Wextra -Wshadow @@ -275,6 +275,8 @@ endif ### 3.4 Debugging ifeq ($(debug),no) CXXFLAGS += -DNDEBUG +else + CXXFLAGS += -g endif ### 3.5 Optimization @@ -354,6 +356,7 @@ endif ### needs access to the optimization flags. ifeq ($(comp),gcc) ifeq ($(optimize),yes) + ifeq ($(debug),no) GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.` GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.` ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \))) @@ -361,6 +364,7 @@ ifeq ($(comp),gcc) LDFLAGS += $(CXXFLAGS) endif endif + endif endif ### ==========================================================================