From: Davin McCall Date: Sat, 3 Jun 2017 08:43:05 +0000 (+0100) Subject: Build: autogenerate dependency files (*.d) X-Git-Tag: v0.06~104 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c95926459be8207bf56abd077fdd7cf57083cada;p=oweals%2Fdinit.git Build: autogenerate dependency files (*.d) --- 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)