add DEBUG option

dev
MITSUNARI Shigeo 9 years ago
parent c50b558896
commit fef84d997f
  1. 30
      common.mk

@ -22,22 +22,24 @@ MKDIR=mkdir -p
RM=rm -rf RM=rm -rf
CFLAGS_OPT+=-fomit-frame-pointer -DNDEBUG ifneq ($(DEBUG),1)
ifeq ($(CXX),clang++) CFLAGS_OPT+=-fomit-frame-pointer -DNDEBUG
CFLAGS_OPT+=-O3 ifeq ($(CXX),clang++)
else
ifeq ($(shell expr $(GCC_VER) \> 4.6.0),1)
CFLAGS_OPT+=-Ofast
else
CFLAGS_OPT+=-O3 CFLAGS_OPT+=-O3
else
ifeq ($(shell expr $(GCC_VER) \> 4.6.0),1)
CFLAGS_OPT+=-Ofast
else
CFLAGS_OPT+=-O3
endif
endif
ifeq ($(MARCH),)
ifeq ($(shell expr $(GCC_VER) \> 4.2.1),1)
CFLAGS_OPT+=-march=native
endif
else
CFLAGS_OPT+=$(MARCH)
endif endif
endif
ifeq ($(MARCH),)
ifeq ($(shell expr $(GCC_VER) \> 4.2.1),1)
CFLAGS_OPT+=-march=native
endif
else
CFLAGS_OPT+=$(MARCH)
endif endif
CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith
CFLAGS+= -g3 CFLAGS+= -g3

Loading…
Cancel
Save