From 52781ebe145544bed97be6ec72d0d64e2e0a2020 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Fri, 12 Jan 2018 16:45:51 +0000 Subject: [PATCH] Move includes into a separate directory. --- src/Makefile | 6 ++---- src/{ => includes}/control-cmds.h | 0 src/{ => includes}/control.h | 0 src/{ => includes}/cpbuffer.h | 0 src/{ => includes}/dinit-ll.h | 0 src/{ => includes}/dinit-log.h | 0 src/{ => includes}/dinit-socket.h | 0 src/{ => includes}/dinit-util.h | 0 src/{ => includes}/dinit.h | 0 src/{ => includes}/proc-service.h | 0 src/{ => includes}/service-constants.h | 0 src/{ => includes}/service-listener.h | 0 src/{ => includes}/service.h | 0 src/tests/Makefile | 6 +++--- 14 files changed, 5 insertions(+), 7 deletions(-) rename src/{ => includes}/control-cmds.h (100%) rename src/{ => includes}/control.h (100%) rename src/{ => includes}/cpbuffer.h (100%) rename src/{ => includes}/dinit-ll.h (100%) rename src/{ => includes}/dinit-log.h (100%) rename src/{ => includes}/dinit-socket.h (100%) rename src/{ => includes}/dinit-util.h (100%) rename src/{ => includes}/dinit.h (100%) rename src/{ => includes}/proc-service.h (100%) rename src/{ => includes}/service-constants.h (100%) rename src/{ => includes}/service-listener.h (100%) rename src/{ => includes}/service.h (100%) diff --git a/src/Makefile b/src/Makefile index be9cc4f..b0cf80d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,8 +4,6 @@ ifeq ($(BUILD_SHUTDOWN),yes) SHUTDOWN=shutdown endif -#objects = dinit.o load_service.o service.o proc-service.o baseproc-service.o control.o dinit-log.o dinit-main.o dinitctl.o shutdown.o - dinit_objects = dinit.o load_service.o service.o proc-service.o baseproc-service.o control.o dinit-log.o dinit-main.o objects = $(dinit_objects) dinitctl.o shtudown.o @@ -22,7 +20,7 @@ shutdown: shutdown.o $(CXX) -o shutdown shutdown.o $(EXTRA_LIBS) $(objects): %.o: %.cc - $(CXX) $(CXXOPTS) -Idasynq -c $< -o $@ + $(CXX) $(CXXOPTS) -Iincludes -Idasynq -c $< -o $@ check: $(dinit_objects) $(MAKE) -C tests check @@ -40,6 +38,6 @@ clean: $(MAKE) -C tests clean $(objects:.o=.d): %.d: %.cc - $(CXX) $(CXXOPTS) -Idasynq -MM -MG -MF $@ $< + $(CXX) $(CXXOPTS) -Iincludes -Idasynq -MM -MG -MF $@ $< -include $(objects:.o=.d) diff --git a/src/control-cmds.h b/src/includes/control-cmds.h similarity index 100% rename from src/control-cmds.h rename to src/includes/control-cmds.h diff --git a/src/control.h b/src/includes/control.h similarity index 100% rename from src/control.h rename to src/includes/control.h diff --git a/src/cpbuffer.h b/src/includes/cpbuffer.h similarity index 100% rename from src/cpbuffer.h rename to src/includes/cpbuffer.h diff --git a/src/dinit-ll.h b/src/includes/dinit-ll.h similarity index 100% rename from src/dinit-ll.h rename to src/includes/dinit-ll.h diff --git a/src/dinit-log.h b/src/includes/dinit-log.h similarity index 100% rename from src/dinit-log.h rename to src/includes/dinit-log.h diff --git a/src/dinit-socket.h b/src/includes/dinit-socket.h similarity index 100% rename from src/dinit-socket.h rename to src/includes/dinit-socket.h diff --git a/src/dinit-util.h b/src/includes/dinit-util.h similarity index 100% rename from src/dinit-util.h rename to src/includes/dinit-util.h diff --git a/src/dinit.h b/src/includes/dinit.h similarity index 100% rename from src/dinit.h rename to src/includes/dinit.h diff --git a/src/proc-service.h b/src/includes/proc-service.h similarity index 100% rename from src/proc-service.h rename to src/includes/proc-service.h diff --git a/src/service-constants.h b/src/includes/service-constants.h similarity index 100% rename from src/service-constants.h rename to src/includes/service-constants.h diff --git a/src/service-listener.h b/src/includes/service-listener.h similarity index 100% rename from src/service-listener.h rename to src/includes/service-listener.h diff --git a/src/service.h b/src/includes/service.h similarity index 100% rename from src/service.h rename to src/includes/service.h diff --git a/src/tests/Makefile b/src/tests/Makefile index 26a9eef..3769557 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -12,15 +12,15 @@ tests: $(objects) $(parent_objs) $(CXX) $(SANITIZEOPTS) -o tests $(objects) $(parent_objs) $(EXTRA_LIBS) $(objects): %.o: %.cc - $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -I.. -I../dasynq -c $< -o $@ + $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -I../includes -I../dasynq -c $< -o $@ $(parent_objs): %.o: ../%.cc - $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -I.. -I../dasynq -c $< -o $@ + $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -I../includes -I../dasynq -c $< -o $@ clean: rm -f *.o *.d $(objects:.o=.d): %.d: %.cc - $(CXX) $(CXXOPTS) -I.. -I../dasynq -MM -MG -MF $@ $< + $(CXX) $(CXXOPTS) -I../includes -I../dasynq -MM -MG -MF $@ $< include $(objects:.o=.d) -- 2.25.1