Change .d to .dep

This commit is contained in:
Bob Polis 2024-01-23 18:56:57 +01:00
parent 6831eaa7c3
commit ace5db88b3

View File

@ -30,7 +30,7 @@ DOCDIR ?= $(DATADIR)/$(LIBNAME)/doc
SRCS := $(notdir $(wildcard src/*.cpp)) SRCS := $(notdir $(wildcard src/*.cpp))
OBJS := $(SRCS:.cpp=.o) OBJS := $(SRCS:.cpp=.o)
DEPS := $(SRCS:.cpp=.d) DEPS := $(SRCS:.cpp=.dep)
HDRS ?= $(wildcard src/*.hpp) HDRS ?= $(wildcard src/*.hpp)
CXX ?= g++ CXX ?= g++
@ -50,7 +50,7 @@ RM := /bin/rm -rf
INSTALL := /usr/bin/install -c INSTALL := /usr/bin/install -c
vpath %.cpp src vpath %.cpp src
vpath %.d $(BUILDDIR) vpath %.dep $(BUILDDIR)
vpath %.o $(BUILDDIR) vpath %.o $(BUILDDIR)
.PHONY: all clean install prebuild test .PHONY: all clean install prebuild test
@ -71,9 +71,9 @@ ifeq ($(UNAME_S),Linux)
$(CXX) -g -shared -Wl,-soname,$(SONAME) -o $(OUTDIR)$(REALNAME) $(LDFLAGS) $(LDLIBS) $(addprefix $(BUILDDIR),$(OBJS)) $(CXX) -g -shared -Wl,-soname,$(SONAME) -o $(OUTDIR)$(REALNAME) $(LDFLAGS) $(LDLIBS) $(addprefix $(BUILDDIR),$(OBJS))
endif endif
%.o %.d: %.cpp %.o %.dep: %.cpp
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $< $(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.dep -c $<
@mv $@ $*.d $(BUILDDIR) @mv $@ $*.dep $(BUILDDIR)
-include $(addprefix $(BUILDDIR), $(DEPS)) -include $(addprefix $(BUILDDIR), $(DEPS))