diff options
-rw-r--r-- | Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -81,7 +81,7 @@ OBJEXT := o #? Flags, Libraries and Includes override REQFLAGS := -std=c++20 WARNFLAGS := -Wall -Wextra -pedantic -OPTFLAGS ?= -O0 -g +OPTFLAGS := -O2 LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions $(ADDFLAGS) override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) @@ -89,6 +89,10 @@ INC := -I$(INCDIR) -I$(SRCDIR) SU_USER := root SU_GROUP := root +ifdef DEBUG + override OPTFLAGS := -O0 -g +endif + #? This fails to compile on M1 macos (arm64 specific? as it compiles on x86_64 macos) ifeq ($(ARCH),x86_64) override OPTFLAGS += -ftree-loop-vectorize -flto=$(THREADS) |