From aa927cb5042fc81ffe6013ae4b9220926745563f Mon Sep 17 00:00:00 2001 From: Uwe Seimet <48174652+uweseimet@users.noreply.github.com> Date: Mon, 16 Oct 2023 18:27:18 +0200 Subject: [PATCH] Move top-level .cpp files into their respective folders (#1249) * Update Makefile, move top-level .cpp files * Move top-level .cpp files into their respective folders --- cpp/Makefile | 33 ++++++++++----------- cpp/{ => piscsi}/piscsi.cpp | 0 cpp/{ => scsictl}/scsictl.cpp | 0 cpp/{ => scsidump}/scsidump.cpp | 0 cpp/{ => scsiloop}/scsiloop.cpp | 0 cpp/{ => scsimon}/scsimon.cpp | 2 +- cpp/{monitor => scsimon}/sm_core.cpp | 4 +-- cpp/{monitor => scsimon}/sm_core.h | 0 cpp/{monitor => scsimon}/sm_html_report.cpp | 0 cpp/{monitor => scsimon}/sm_json_report.cpp | 0 cpp/{monitor => scsimon}/sm_reports.h | 0 cpp/{monitor => scsimon}/sm_vcd_report.cpp | 0 12 files changed, 18 insertions(+), 21 deletions(-) rename cpp/{ => piscsi}/piscsi.cpp (100%) rename cpp/{ => scsictl}/scsictl.cpp (100%) rename cpp/{ => scsidump}/scsidump.cpp (100%) rename cpp/{ => scsiloop}/scsiloop.cpp (100%) rename cpp/{ => scsimon}/scsimon.cpp (93%) rename cpp/{monitor => scsimon}/sm_core.cpp (99%) rename cpp/{monitor => scsimon}/sm_core.h (100%) rename cpp/{monitor => scsimon}/sm_html_report.cpp (100%) rename cpp/{monitor => scsimon}/sm_json_report.cpp (100%) rename cpp/{monitor => scsimon}/sm_reports.h (100%) rename cpp/{monitor => scsimon}/sm_vcd_report.cpp (100%) diff --git a/cpp/Makefile b/cpp/Makefile index 9f6f2e06..425b6f9e 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -82,39 +82,36 @@ SRC_SHARED = \ shared/piscsi_util.cpp \ shared/network_util.cpp -SRC_PISCSI_CORE = $(shell find ./piscsi -name '*.cpp') +SRC_PISCSI_CORE = $(shell find ./piscsi -name '*.cpp' | grep -v piscsi.cpp) SRC_PISCSI_CORE += $(shell find ./controllers -name '*.cpp') SRC_PISCSI_CORE += $(shell find ./devices -name '*.cpp') SRC_PISCSI_CORE += $(shell find ./hal -name '*.cpp') -SRC_PISCSI = piscsi.cpp +SRC_PISCSI = piscsi/piscsi.cpp -SRC_SCSIMON = scsimon.cpp -SRC_SCSIMON += $(shell find ./monitor -name '*.cpp') +SRC_SCSIMON = scsimon/scsimon.cpp +SRC_SCSIMON += $(shell find ./scsimon -name '*.cpp' | grep -v scsimon.cpp) SRC_SCSIMON += $(shell find ./hal -name '*.cpp') -SRC_SCSICTL_CORE = $(shell find ./scsictl -name '*.cpp') +SRC_SCSICTL_CORE = $(shell find ./scsictl -name '*.cpp' | grep -v scsictl.cpp) -SRC_SCSICTL = scsictl.cpp +SRC_SCSICTL = scsictl/scsictl.cpp -SRC_SCSIDUMP = scsidump.cpp -SRC_SCSIDUMP += $(shell find ./scsidump -name '*.cpp') +SRC_SCSIDUMP = scsidump/scsidump.cpp +SRC_SCSIDUMP += $(shell find ./scsidump -name '*.cpp' | grep -v scsidump.cpp) SRC_SCSIDUMP += $(shell find ./hal -name '*.cpp') SRC_PISCSI_TEST = $(shell find ./test -name '*.cpp') -SRC_PISCSI_TEST += $(shell find ./scsidump -name '*.cpp') -SRC_PISCSI_TEST += $(shell find ./monitor -name '*.cpp') +SRC_PISCSI_TEST += $(shell find ./scsidump -name '*.cpp' | grep -v scsidump.cpp) -SRC_SCSILOOP = scsiloop.cpp -SRC_SCSILOOP += $(shell find ./scsiloop -name '*.cpp') +SRC_SCSILOOP = scsiloop/scsiloop.cpp +SRC_SCSILOOP += $(shell find ./scsiloop -name '*.cpp' | grep -v scsiloop.cpp) SRC_SCSILOOP += $(shell find ./hal -name '*.cpp') -vpath %.h ./ ./shared ./controllers ./devices ./monitor ./hal \ - ./hal/boards ./hal/pi_defs ./piscsi ./scsictl ./scsidump \ - ./scsiloop -vpath %.cpp ./ ./shared ./controllers ./devices ./monitor ./hal \ - ./hal/boards ./hal/pi_defs ./piscsi ./scsictl ./scsidump \ - ./scsiloop ./test +vpath %.h ./shared ./controllers ./devices ./scsimon ./hal \ + ./hal/pi_defs ./piscsi ./scsictl ./scsidump ./scsiloop +vpath %.cpp ./shared ./controllers ./devices ./scsimon ./hal \ + ./hal/pi_defs ./piscsi ./scsictl ./scsidump ./scsiloop ./test vpath %.o ./$(OBJDIR) vpath ./$(BINDIR) diff --git a/cpp/piscsi.cpp b/cpp/piscsi/piscsi.cpp similarity index 100% rename from cpp/piscsi.cpp rename to cpp/piscsi/piscsi.cpp diff --git a/cpp/scsictl.cpp b/cpp/scsictl/scsictl.cpp similarity index 100% rename from cpp/scsictl.cpp rename to cpp/scsictl/scsictl.cpp diff --git a/cpp/scsidump.cpp b/cpp/scsidump/scsidump.cpp similarity index 100% rename from cpp/scsidump.cpp rename to cpp/scsidump/scsidump.cpp diff --git a/cpp/scsiloop.cpp b/cpp/scsiloop/scsiloop.cpp similarity index 100% rename from cpp/scsiloop.cpp rename to cpp/scsiloop/scsiloop.cpp diff --git a/cpp/scsimon.cpp b/cpp/scsimon/scsimon.cpp similarity index 93% rename from cpp/scsimon.cpp rename to cpp/scsimon/scsimon.cpp index b0b00383..9cc84565 100644 --- a/cpp/scsimon.cpp +++ b/cpp/scsimon/scsimon.cpp @@ -7,7 +7,7 @@ // //--------------------------------------------------------------------------- -#include "monitor/sm_core.h" +#include "scsimon/sm_core.h" using namespace std; diff --git a/cpp/monitor/sm_core.cpp b/cpp/scsimon/sm_core.cpp similarity index 99% rename from cpp/monitor/sm_core.cpp rename to cpp/scsimon/sm_core.cpp index 9805bab4..d90a5798 100644 --- a/cpp/monitor/sm_core.cpp +++ b/cpp/scsimon/sm_core.cpp @@ -9,10 +9,10 @@ // //--------------------------------------------------------------------------- -#include "monitor/sm_core.h" +#include "scsimon/sm_core.h" #include "hal/gpiobus.h" #include "hal/gpiobus_factory.h" -#include "monitor/sm_reports.h" +#include "scsimon/sm_reports.h" #include "hal/log.h" #include "shared/piscsi_version.h" #include "shared/piscsi_util.h" diff --git a/cpp/monitor/sm_core.h b/cpp/scsimon/sm_core.h similarity index 100% rename from cpp/monitor/sm_core.h rename to cpp/scsimon/sm_core.h diff --git a/cpp/monitor/sm_html_report.cpp b/cpp/scsimon/sm_html_report.cpp similarity index 100% rename from cpp/monitor/sm_html_report.cpp rename to cpp/scsimon/sm_html_report.cpp diff --git a/cpp/monitor/sm_json_report.cpp b/cpp/scsimon/sm_json_report.cpp similarity index 100% rename from cpp/monitor/sm_json_report.cpp rename to cpp/scsimon/sm_json_report.cpp diff --git a/cpp/monitor/sm_reports.h b/cpp/scsimon/sm_reports.h similarity index 100% rename from cpp/monitor/sm_reports.h rename to cpp/scsimon/sm_reports.h diff --git a/cpp/monitor/sm_vcd_report.cpp b/cpp/scsimon/sm_vcd_report.cpp similarity index 100% rename from cpp/monitor/sm_vcd_report.cpp rename to cpp/scsimon/sm_vcd_report.cpp