From 13a43d85542d3e750e47d91e9c923f4a246804bf Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Mon, 15 Jan 2018 18:15:33 +0000 Subject: [PATCH] tests makefile: auto-generate dependencies (*.d) while building objects. --- src/tests/Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/tests/Makefile b/src/tests/Makefile index dd82c0e..9f94055 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -23,15 +23,12 @@ proctests: prepare-incdir $(parent_objs) proctests.o test-dinit.o test-bpsys.o $(CXX) $(SANITIZEOPTS) -o proctests $(parent_objs) proctests.o test-dinit.o test-bpsys.o $(EXTRA_LIBS) $(objects): %.o: %.cc - $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -Iincludes -I../dasynq -c $< -o $@ + $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -MMD -MP -Iincludes -I../dasynq -c $< -o $@ $(parent_objs): %.o: ../%.cc - $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -Iincludes -I../dasynq -c $< -o $@ + $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -MMD -MP -Iincludes -I../dasynq -c $< -o $@ clean: rm -f *.o *.d -$(objects:.o=.d): %.d: %.cc - $(CXX) $(CXXOPTS) -Iincludes -I../dasynq -MM -MG -MF $@ $< - -include $(objects:.o=.d) +-include $(objects:.o=.d) -- 2.25.1