summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index fbb25db..d804c66 100644
--- a/Makefile
+++ b/Makefile
@@ -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)