Fixed pattern rule for new make version

This commit is contained in:
Bob Polis 2023-02-28 18:02:02 +01:00
parent eeb5459f9d
commit 90070c486f

View File

@ -30,6 +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)
HDRS ?= $(wildcard src/*.hpp) HDRS ?= $(wildcard src/*.hpp)
CXX ?= g++ CXX ?= g++
@ -73,7 +74,7 @@ endif
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $< $(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $<
@mv $@ $*.d $(BUILDDIR) @mv $@ $*.d $(BUILDDIR)
-include $(BUILDDIR)$(SRCS:.cpp=.d) -include $(addprefix $(BUILDDIR), $(DEPS))
$(OUTDIR)$(STATICLIB): $(OBJS) $(OUTDIR)$(STATICLIB): $(OBJS)
ar r $(OUTDIR)$(STATICLIB) $(addprefix $(BUILDDIR),$(OBJS)) ar r $(OUTDIR)$(STATICLIB) $(addprefix $(BUILDDIR),$(OBJS))