Fixed Makefile

This commit is contained in:
Bob Polis 2023-02-13 11:19:38 +01:00
parent ad0eaaf47e
commit 63dd8c1e2b

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))