From 08ef6ac39776f2b0ccd269f0bb8cbd46ec495db0 Mon Sep 17 00:00:00 2001 From: Meiye-lj Date: Fri, 22 Aug 2025 11:36:56 +0800 Subject: [PATCH] fixing missing dependencies --- Makefile.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 73d51ae71..cceb29d8f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -94,6 +94,9 @@ ifeq ($(findstring -std, $(CXXFLAGS)), ) override CXXFLAGS += -std=c++11 endif +override CFLAGS += -MMD +override CXXFLAGS += -MMD + ARFLAGS ?= cr # DIRS @@ -125,6 +128,7 @@ override SRCS += $(filter-out %_test.c %_test.cc %_test.cpp, $(ALL_SRCS)) # OBJS += $(patsubst %.cc, %.o, $(SRCS)) # OBJS += $(patsubst %.cpp, %.o, $(SRCS)) OBJS := $(addsuffix .o, $(basename $(SRCS))) +DEPS := $(OBJS:.o=.d) INSTALLED_INCS=$(addprefix $(PREFIX)/$(INCDIR)/, $(shell ls $(INCDIR))) INSTALLED_LIBS=$(addprefix $(PREFIX)/$(LIBDIR)/, $(shell ls $(LIBDIR))) @@ -282,7 +286,7 @@ endif endif clean: - $(RM) $(OBJS) + $(RM) $(OBJS) $(DEPS) #$(RM) $(LIBDIR) #$(RM) $(BINDIR) @@ -304,4 +308,6 @@ dist: undist: $(RM) $(DISTDIR) +-include $(DEPS) + .PHONY: default all prepare clean install uninstall dist undist