From: Steinar H. Gunderson Date: Sun, 7 Oct 2012 12:01:15 +0000 (+0200) Subject: Add simple dependency generation to the Makefile. X-Git-Tag: 1.0~356 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=b8a366c0a2c3a1bf4f5173df53b6468f32f195bc;hp=3fbc6a0e7ecc008b0bdafcbc576b79c24117859e Add simple dependency generation to the Makefile. --- diff --git a/Makefile b/Makefile index 51aebc5..93a1166 100644 --- a/Makefile +++ b/Makefile @@ -23,8 +23,10 @@ OBJS += sandbox_effect.o test: $(OBJS) $(CXX) -o test $(OBJS) $(LDFLAGS) -.o: .cpp - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< +%.o: %.cpp + $(CXX) -MMD $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< + +-include $(OBJS:.o=.d) clean: $(RM) test $(OBJS)