From 15aa88429e9d2ad9650d221257c48481a0634762 Mon Sep 17 00:00:00 2001 From: 3lswear Date: Sat, 19 Feb 2022 18:47:41 +0300 Subject: [PATCH] feat(build): changes to depends --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 093fc02..056f19a 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ DEBUGFLAGS = -g -fno-limit-debug-info CXXFLAGS = -Wall -Wextra -Werror -std=c++98 $(DEBUGFLAGS) $(SANFLAGS) -DDEBUG -CPPFLAGS += -MD -MP +CPPFLAGS += -MMD -MP SRC = $(wildcard ./src/*.cpp) SRC += $(wildcard ./src/*/*.cpp) @@ -24,7 +24,6 @@ all: $(NAME) $(OBJ): %.o: %.cpp $(SRC) Makefile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -I $(INCLUDES) -o $@ --include $(SRC:%.cpp=%.d) $(NAME): $(OBJ) $(CXX) $(CXXFLAGS) $(OBJ) -o $(NAME) @@ -42,5 +41,7 @@ re: run: $(NAME) ASAN_OPTIONS=detect_leaks=0 ./$(NAME) $(filter-out $@,$(MAKECMDGOALS)) + +-include $(OBJ:%.o=%.d) .PHONY: all clean fclean re