From c95926459be8207bf56abd077fdd7cf57083cada Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sat, 3 Jun 2017 09:43:05 +0100 Subject: [PATCH] Build: autogenerate dependency files (*.d) --- src/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index a163de0..f067f31 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,7 +4,7 @@ ifeq ($(BUILD_SHUTDOWN),yes) SHUTDOWN=shutdown endif -objects = dinit.o load_service.o service.o control.o dinit-log.o dinitctl.o shutdown.o dinit-reboot.o +objects = dinit.o load_service.o service.o control.o dinit-log.o dinitctl.o shutdown.o dinit_objects = dinit.o load_service.o service.o control.o dinit-log.o @@ -19,9 +19,6 @@ dinitctl: dinitctl.o shutdown: shutdown.o $(CXX) -o shutdown shutdown.o -dinit-reboot: dinit-reboot.o - $(CXX) -o dinit-reboot dinit-reboot.o - $(objects): %.o: %.cc service.h dinit-log.h control.h control-cmds.h cpbuffer.h $(CXX) $(CXXOPTS) -Idasynq -c $< -o $@ @@ -35,3 +32,8 @@ endif clean: rm -f *.o rm -f dinit dinitctl shutdown + +$(objects:.o=.d): %.d: %.cc + $(CXX) -Idasynq -MM -MG -MF $@ $< + +include $(objects:.o=.d) -- 2.25.1