diff --git a/Makefile b/Makefile index 1feb37f..1725a00 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ MANPAGE := $(BIN).$(MANSECTION) SRCS := $(notdir $(wildcard src/*.cpp)) OBJS := $(SRCS:.cpp=.o) +DEPS := $(SRCS:.cpp=.d) BUILDDIR := build/intermediates/ PREFIX ?= /usr/local @@ -49,7 +50,7 @@ $(OUTDIR)$(BIN): $(OBJS) $(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $< @mv $@ $*.d $(BUILDDIR) --include $(BUILDDIR)$(SRCS:.cpp=.d) +-include $(addprefix $(BUILDDIR), $(DEPS)) test: $(MAKE) -C tests && tests/tests