feat: Build optimizations

This commit is contained in:
2026-04-23 21:37:44 +01:00
parent 6cab255d92
commit 153fb762af
11 changed files with 157 additions and 139 deletions

View File

@@ -1,5 +1,5 @@
CC=g++
C_FLAGS=-g -Wall -Wextra -O0 -Wno-unused-function
C_FLAGS=-g -Wall -Wextra -O0 -Wno-unused-function -MMD -MP
VAL_FLAGS=--leak-check=full --show-leak-kinds=all --track-origins=yes -s
DIR_SRC=src
@@ -11,6 +11,7 @@ OUTBIN=$(DIR_BUILD)/bin/main
SRCS=$(shell find $(DIR_SRC)/ -type f -name '*.cpp')
OBJS=$(patsubst $(DIR_SRC)/%.cpp,$(DIR_BUILD)/obj/%.o,$(SRCS))
DEPMF=$(patsubst $(DIR_SRC)/%.cpp,$(DIR_BUILD)/obj/%.d,$(SRCS))
DEPS_EXT=$(patsubst %,-l%,$(DEPS))
INCS_EXT=$(patsubst %,-I%,$(DIR_INC))
@@ -38,6 +39,8 @@ $(DIR_BUILD)/obj/%.o: $(DIR_SRC)/%.cpp
@mkdir -p $(@D)
$(CC) $(C_FLAGS) $(INCS_EXT) -c $< -o $@
-include $(DEPMF)
dbg: $(DBG_BIN)
gdb $(GDB_FLAGS) ./$(OUTBIN)