Skip to content

Commit

Permalink
Release 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Jan 31, 2024
1 parent 2214001 commit 69ff3ac
Show file tree
Hide file tree
Showing 150 changed files with 6,274 additions and 4,047 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- The Pi type:


- The Pi OS version (output of 'lsb_release -a'):
- The Pi OS version (output of 'lsb_release -a' and 'uname -a'):


- The SCSI2Pi release or git revision:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fetch-depth: 0

- name: Install dependencies
run: sudo apt install -y ${{ env.APT_PACKAGES }}
run: sudo apt install -y $APT_PACKAGES

- name: Set up build-wrapper and sonar-scanner
run: |
Expand Down Expand Up @@ -68,4 +68,5 @@ jobs:
--define sonar.cpp.file.suffixes=.cpp,.h \
--define sonar.sonarLanguages=c++ \
--define sonar.branch.name=${{ inputs.branch }} \
--define sonar.exclusions="obj/**,lib/**,bin/**,generated/**" \
--define sonar.test.inclusions=test/**
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test on code change
name: Build and test after code change

on:
workflow_call:
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# What is SCSI2Pi?

SCSI2Pi (or simply just S2P) is an alternative to the <a href="https://github.com/PiSCSI/piscsi" target="blank">PiSCSI software</a> for the PiSCSI/RaSCSI board. SCSI2Pi focuses on improving the SCSI emulation, i.e. the C++ backend, and is compatible with the PiSCSI web UI and the <a href="https://www.scsi2pi.net/en/app.html" target="blank">SCSI Control app</a>.<br />
You can switch from PiSCSI to SCSI2Pi (or back, if needed) in seconds, simply by installing/de-installing a Debian package with the binaries. No time-consuming compilation is required.<br />
SCSI2Pi emulates several SCSI or SASI devices like hard drives, CD-ROM drives, printers or network adapters at the same time. This means that you can easily add a range of devices to computers like 68k Macs, Atari ST/TT/Falcon, Amigas, old PCs, Unix workstations or samplers. SCSI2Pi offers <a href="https://www.scsi2pi.net/en/scsi2pi.html" target="blank">numerous extensions</a>, new device features, performance improvements and bug fixes. These add to the extensive changes and new features I contributed to the PiSCSI project in the past.<br />
SCSI2Pi (or simply just S2P) is an alternative to the <a href="https://github.com/PiSCSI/piscsi" target="blank">PiSCSI software</a> for the PiSCSI/RaSCSI board. SCSI2Pi provides an improved SCSI emulation and new tools for the board's initiator mode. It is compatible with the PiSCSI web UI and the <a href="https://www.scsi2pi.net/en/app.html" target="blank">SCSI Control app</a>.<br />
You can switch from PiSCSI to SCSI2Pi (or back, if needed) in seconds, simply by installing/de-installing a <a href="https://www.scsi2pi.net/en/downloads.html" target="blank">package with the SCSI2Pi binaries</a>. No time-consuming compilation is required.<br />
SCSI2Pi emulates several SCSI or SASI devices like hard drives, CD-ROM drives, printers or network adapters at the same time. You can easily add a range of devices to computers like 68k Macs, Atari ST/TT/Falcon, old PCs, Unix workstations, samplers or other computers with SCSI port. SCSI2Pi offers <a href="https://www.scsi2pi.net/en/scsi2pi.html" target="blank">numerous extensions</a>, new device features, performance improvements and bug fixes. These add to the extensive changes and new features I contributed to the PiSCSI project in the past.<br />
SCSI2Pi was chosen as the name for this project because there are not that many choices anymore when looking for a name that contains both "SCSI" and "Pi" ;-).

# How is SCSI2Pi related to PiSCSI?

Over time, within the PiSCSI project the interest in replacing old, often buggy or unnecessary/unused code became rather low. In addition, code reviewers were missing, which resulted in a rather long PR backlog, slowing down the emulation development. Developing software without being able to publish the results is not much fun. Further, long promised features on the roadmap and in tickets have not been addressed. This is why I decided to work on the emulation backend in a separate project. The major part of the PiSCSI C++ codebase has been contributed by me anyway.<br />
There was also no interest in further exploiting the initiator mode feature of the FULLSPEC board. This mode, together with new SCSI2Pi command line tools, offers solutions for use cases that have never been addressed before and helps with advanced testing.
In the PiSCSI project there was not much interest in replacing old, often buggy or unnecessary code. In addition, code reviewers were missing, which resulted in a rather long PR backlog, slowing down the development process. Developing software without being able to publish the results is not much fun. Further, long promised features on the PiSCSI roadmap and in tickets have not been addressed. This is why I decided to work on the emulation backend in a separate project. The major part of the PiSCSI C++ codebase has been contributed by me anyway.<br />
There was also no interest in further exploiting the initiator mode feature of the FULLSPEC board. This mode, together with new SCSI2Pi command line tools, offers solutions for use cases that have never been addressed before. These tools also help with advanced testing.

# Who am I?

In the past I was the main contributor for the PiSCSI emulation backend. I revised the backend architecture, added a remote interface and re-engineered most of the legacy C++ code. The code was updated to C++-20, which is the latest C++ standard you can currently use on the Pi. All in all this resulted in more modular code and drastically improved <a href="https://sonarcloud.io/project/overview?id=uweseimet_scsi2pi" target="blank">SonarQube code metrics</a>. Besides adding numerous <a href="https://www.scsi2pi.net/en/scsi2pi.html" target="blank">new features</a> and improving the compatibility with many platforms, I also fixed a range of bugs in the legacy codebase and added an extensive set of unit tests.<br />
I am also the author of the <a href="https://www.scsi2pi.net/en/app.html" target="blank">SCSI Control app</a> for Android, which is the remote control for your RaSCSI/PiSCSI boards. SCSI Control supports both SCSI2Pi and PiSCSI.
I am also the author of the <a href="https://www.scsi2pi.net/en/app.html" target="blank">SCSI Control app</a> for Android, which is the remote control for your PiSCSI/RaSCSI boards. SCSI Control supports both SCSI2Pi and PiSCSI. Note, though, that the latest app features require SCSI2Pi.

# SCSI2Pi goals

The intention of SCSI2Pi is not to completely replace the PiSCSI software, where great work is being done on the web interface, and on supporting users in social media. SCSI2Pi aims at improving the SCSI emulation and tries to address compatibility issues.<br />
SCSI2Pi focuses on vintage computers like Macs, Ataris, Amigas, workstations and on samplers. There is no support for the X68000, in particular not for the host bridge (SCBR) device. In PiSCSI the related code has always been in a bad shape, and nobody has been willing to test it. It might not even be working. The other PiSCSI features (and more) are supported by SCSI2Pi - many of these I implemented anyway ;-).
The intention of SCSI2Pi is not to completely replace the PiSCSI software, where great work is being done on the web interface, and on supporting users in social media. SCSI2Pi aims at improving the SCSI emulation and the tools, and it addresses compatibility issues. Some Macs, that have not been working with PiSCSI, oare working with SCSI2PI, for instance.<br />
SCSI2Pi focuses on vintage computers like Macs, Ataris, Amigas, workstations and on samplers. There is no support for the X68000, in particular not for the host bridge (SCBR) device. In PiSCSI the related code has always been in a bad shape, and nobody has been willing to test it. The other PiSCSI features (and more) are supported by SCSI2Pi - many of these I implemented anyway ;-).

# SCSI2Pi website

The <a href="https://www.scsi2pi.net" target="blank">SCSI2Pi website</a> addresses both users and developers, whereas the information on GitHub is rather developer-centric. The website also provides <a href="https://www.scsi2pi.net/en/downloads.html" target="blank">regular development builds and release builds</a> as Debian packages. These packages contain the SCSI2Pi binaries, i.e. no time-consuming compilation is required. Installing SCSI2Pi on your Pi is just a matter of seconds.<br />
The <a href="https://www.scsi2pi.net" target="blank">SCSI2Pi website</a> addresses both users and developers, whereas the information on GitHub is rather developer-centric. The website also provides <a href="https://www.scsi2pi.net/en/downloads.html" target="blank">regular development and release</a> packages. These packages contain the SCSI2Pi binaries, i.e. no time-consuming compilation is required. Installing SCSI2Pi on your Pi is just a matter of seconds.<br />
The website also provides information on the <a href="https://www.scsi2pi.net/en/app.html">SCSI Control app</a> for Android.

# Contributing to SCSI2Pi

If you are interested in the Pi and/or SCSI, in modern C++ and platform-independent programming, you are welcome as a contributor, be it as a developer or a code reviewer.<br />
Did I just say "platform independent programming", even though SCSI2Pi is about the Pi? I did indeed, because I have ensured that the PiSCSI code also compiles and partially runs on regular Linux PCs, on BSD and partially even on macos. This is important for developers and for testing, because the faster your development machine, the better. A PC provides a much better development environment than a Pi. My primary development platform is Eclipse CDT on a Linux PC, by the way.
If you are interested in SCSI on the Pi and in modern C++ and platform-independent programming, you are welcome as a contributor, be it as a developer or a code reviewer.<br />
Did I just say "platform-independent", even though SCSI2Pi is about the Pi? I did indeed, because I have ensured that the PiSCSI code also compiles and partially runs on regular Linux PCs, on BSD and even compiles on macos. This is important for developers and for testing, because the faster your development machine, the better. A PC provides a much better development environment than a Pi. My primary development platform is Eclipse CDT on a Linux PC, by the way.
64 changes: 42 additions & 22 deletions cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ S2P = s2p
S2PCTL = s2pctl
S2PDUMP = s2pdump
S2PEXEC = s2pexec
S2PPROTO = s2pproto
S2P_TEST = s2p_test
IN_PROCESS_TEST = in_process_test

Expand All @@ -107,15 +108,17 @@ BIN_ALL = \
$(BINDIR)/$(S2P) \
$(BINDIR)/$(S2PCTL)

# s2pdump and s2pexec require initiator support
# s2pdump s2pexec and s2pproto require initiator support
ifeq ($(BOARD), FULLSPEC)
BIN_ALL += $(BINDIR)/$(S2PDUMP)
BIN_ALL += $(BINDIR)/$(S2PEXEC)
BIN_ALL += $(BINDIR)/$(S2PPROTO)
endif

DIR_SHARED := shared
DIR_SHARED_PROTOBUF := shared_protobuf
DIR_SHARED_COMMAND := shared_command
DIR_SHARED_PROTOBUF := protobuf
DIR_SHARED_COMMAND := command
DIR_SHARED_INITIATOR := initiator
DIR_BASE := base
DIR_BUSES := buses
DIR_CONTROLLERS := controllers
Expand All @@ -128,6 +131,7 @@ SRC_GENERATED = $(GENERATED_DIR)/s2p_interface.pb.cpp
SRC_SHARED := $(shell ls -1 $(DIR_SHARED)/*.cpp)
SRC_SHARED_PROTOBUF := $(shell ls -1 $(DIR_SHARED_PROTOBUF)/*.cpp)
SRC_SHARED_COMMAND := $(shell ls -1 $(DIR_SHARED_COMMAND)/*.cpp)
SRC_SHARED_INITIATOR := $(shell ls -1 $(DIR_SHARED_INITIATOR)/*.cpp)
SRC_BASE = $(shell ls -1 $(DIR_BASE)/*.cpp)
SRC_BUSES = $(shell ls -1 $(DIR_BUSES)/*.cpp)
SRC_CONTROLLERS = $(shell ls -1 $(DIR_CONTROLLERS)/*.cpp)
Expand All @@ -137,8 +141,7 @@ SRC_DISK = \
$(DIR_DEVICES)/disk_cache.cpp \
$(DIR_DEVICES)/disk_track.cpp \
$(DIR_DEVICES)/storage_device.cpp \
$(DIR_DEVICES)/mode_page_device.cpp \
$(DIR_DEVICES)/mode_page_util.cpp
$(DIR_DEVICES)/mode_page_device.cpp

ifdef BUILD_SCHD
SRC_SCHD = \
Expand Down Expand Up @@ -193,22 +196,27 @@ SRC_S2PDUMP += $(shell ls -1 s2pdump/*.cpp | grep -v s2pdump.cpp)

SRC_S2PEXEC := $(shell ls -1 s2pexec/*.cpp)

SRC_S2PPROTO := $(shell ls -1 s2pproto/*.cpp)

SRC_S2P_TEST = $(shell ls -1 test/*.cpp | grep -v in_process_test.cpp)
SRC_S2P_TEST += $(shell ls -1 s2pdump/*.cpp | grep -v s2pdump.cpp)

SRC_IN_PROCESS_TEST = test/in_process_test.cpp
SRC_IN_PROCESS_TEST += $(shell ls -1 s2pdump/*.cpp | grep -v s2pdump.cpp)
SRC_IN_PROCESS_TEST += $(shell ls -1 s2pexec/*.cpp | grep -v s2pexec.cpp)
SRC_IN_PROCESS_TEST += $(shell ls -1 s2pproto/*.cpp | grep -v s2pproto.cpp)

VPATH := $(DIR_SHARED) $(DIR_SHARED_PROTOBUF) $(DIR_SHARED_COMMAND) $(DIR_BASE) $(DIR_BUSES) $(DIR_CONTROLLERS) \
$(DIR_DEVICES) ./s2p ./s2pctl ./s2pdump ./s2pexec
VPATH := $(DIR_SHARED) $(DIR_SHARED_PROTOBUF) $(DIR_SHARED_INITIATOR) $(DIR_SHARED_COMMAND) $(DIR_BASE) $(DIR_BUSES) \
$(DIR_CONTROLLERS) $(DIR_DEVICES) ./s2p ./s2pctl ./s2pdump ./s2pexec ./s2pproto

vpath %.h $(VPATH)
vpath %.cpp $(VPATH) test
vpath %.o $(OBJDIR)

LIB_SHARED := $(LIBDIR)/libshared.a
LIB_SHARED_PROTOBUF := $(LIBDIR)/libsharedprotobuf.a
LIB_SHARED_COMMAND := $(LIBDIR)/libsharedcommand.a
LIB_SHARED_PROTOBUF := $(LIBDIR)/libprotobuf.a
LIB_SHARED_COMMAND := $(LIBDIR)/libcommand.a
LIB_SHARED_INITIATOR := $(LIBDIR)/libinitiator.a
LIB_BUS := $(LIBDIR)/libbus.a
LIB_CONTROLLER := $(LIBDIR)/libcontroller.a
LIB_DEVICE := $(LIBDIR)/libdevice.a
Expand All @@ -223,6 +231,7 @@ OBJ_SAHD := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SAHD:%.cpp=%.o)))
OBJ_SHARED := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SHARED:%.cpp=%.o)))
OBJ_SHARED_PROTOBUF := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SHARED_PROTOBUF:%.cpp=%.o)))
OBJ_SHARED_COMMAND := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SHARED_COMMAND:%.cpp=%.o)))
OBJ_SHARED_INITIATOR := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SHARED_INITIATOR:%.cpp=%.o)))
OBJ_BASE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_BASE:%.cpp=%.o)))
OBJ_BUSES := $(addprefix $(OBJDIR)/,$(notdir $(SRC_BUSES:%.cpp=%.o)))
OBJ_CONTROLLERS := $(addprefix $(OBJDIR)/,$(notdir $(SRC_CONTROLLERS:%.cpp=%.o)))
Expand All @@ -233,6 +242,7 @@ OBJ_S2PCTL_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_S2PCTL_CORE:%.cpp=%.o))
OBJ_S2PCTL := $(addprefix $(OBJDIR)/,$(notdir $(SRC_S2PCTL:%.cpp=%.o)))
OBJ_S2PDUMP := $(addprefix $(OBJDIR)/,$(notdir $(SRC_S2PDUMP:%.cpp=%.o)))
OBJ_S2PEXEC := $(addprefix $(OBJDIR)/,$(notdir $(SRC_S2PEXEC:%.cpp=%.o)))
OBJ_S2PPROTO := $(addprefix $(OBJDIR)/,$(notdir $(SRC_S2PPROTO:%.cpp=%.o)))
OBJ_GENERATED := $(addprefix $(OBJDIR)/,$(notdir $(SRC_GENERATED:%.cpp=%.o)))
OBJ_S2P_TEST := $(addprefix $(OBJDIR)/,$(notdir $(SRC_S2P_TEST:%.cpp=%.o)))
OBJ_IN_PROCESS_TEST := $(addprefix $(OBJDIR)/,$(notdir $(SRC_IN_PROCESS_TEST:%.cpp=%.o)))
Expand All @@ -243,29 +253,31 @@ BINARIES = $(INSTALL_BIN)/$(S2PCTL) \
ifeq ($(BOARD), FULLSPEC)
BINARIES += $(INSTALL_BIN)/$(S2PDUMP)
BINARIES += $(INSTALL_BIN)/$(S2PEXEC)
BINARIES += $(INSTALL_BIN)/$(S2PPROTO)
endif

GENERATED_DIR := generated

# The following will include all of the auto-generated dependency files (*.d)
# if they exist. This will trigger a rebuild of a source file if a header changes
ALL_DEPS := $(patsubst %.o,%.d,$(OBJ_S2P_CORE) $(OBJ_S2PCTL_CORE) $(OBJ_S2P) $(OBJ_S2PCTL) $(OBJ_S2PDUMP) \
$(OBJ_S2PEXEC) $(OBJ_SHARED) $(OBJ_SHARED_PROTOBUF) $(OBJ_SHARED_COMMAND) $(OBJ_BASE) $(OBJ_BUSES) \
$(OBJ_CONTROLLERS) $(OBJ_DEVICES) $(OBJ_S2P_TEST) $(OBJ_IN_PROCESS_TEST))
$(OBJ_S2PEXEC) $(OBJ_S2PPROTO) $(OBJ_SHARED) $(OBJ_SHARED_PROTOBUF) $(OBJ_SHARED_INITIATOR) $(OBJ_SHARED_COMMAND) \
$(OBJ_BASE) $(OBJ_BUSES) $(OBJ_CONTROLLERS) $(OBJ_DEVICES) $(OBJ_S2P_TEST) $(OBJ_IN_PROCESS_TEST))
-include $(ALL_DEPS)

$(OBJ_GENERATED): $(SRC_GENERATED)
$(LIB_SHARED): $(OBJ_SHARED)
$(LIB_SHARED_PROTOBUF): $(OBJ_GENERATED) $(OBJ_SHARED_PROTOBUF) $(OBJ_SHARED)
$(LIB_SHARED_COMMAND): $(OBJ_SHARED_COMMAND) $(OBJ_GENERATED) $(OBJ_SHARED_PROTOBUF) $(OBJ_SHARED)
$(LIB_SHARED_INITIATOR): $(OBJ_SHARED_INITIATOR)
$(LIB_BUS): $(OBJ_BUSES)
$(LIB_CONTROLLER): $(OBJ_CONTROLLERS)
$(LIB_DEVICE): $(OBJ_DEVICES) $(OBJ_BASE)

$(OBJDIR) $(LIBDIR) $(BINDIR) $(GENERATED_DIR):
mkdir -p $@

$(LIB_SHARED) $(LIB_SHARED_PROTOBUF) $(LIB_SHARED_COMMAND) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE): | $(LIBDIR)
$(LIB_SHARED) $(LIB_SHARED_PROTOBUF) $(LIB_SHARED_INITIATOR) $(LIB_SHARED_COMMAND) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE): | $(LIBDIR)
$(AR) rcs $@ $^

ifeq ($(DATABASE), 1)
Expand Down Expand Up @@ -304,34 +316,42 @@ in_process_test: $(BINDIR)/$(IN_PROCESS_TEST)
coverage: CXXFLAGS += --coverage
coverage: test

$(SRC_S2P_CORE) $(SRC_S2PCTL_CORE) $(SRC_S2PEXEC): $(OBJ_GENERATED)
$(SRC_S2P_CORE) $(SRC_S2PCTL_CORE) $(SRC_S2PPROTO): $(OBJ_GENERATED)

$(BINDIR)/$(S2P): $(LIB_SHARED_COMMAND) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) $(OBJ_S2P_CORE) $(OBJ_S2P) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2P_CORE) $(OBJ_S2P) $(LIB_SHARED_COMMAND) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) -lpthread -lpcap -lprotobuf

$(BINDIR)/$(S2PCTL): $(LIB_SHARED_PROTOBUF) $(OBJ_S2PCTL_CORE) $(OBJ_S2PCTL) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2PCTL_CORE) $(OBJ_S2PCTL) $(LIB_SHARED_PROTOBUF) -lprotobuf

$(BINDIR)/$(S2PDUMP): $(OBJ_S2PDUMP) $(LIB_SHARED) $(LIB_BUS) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2PDUMP) $(LIB_SHARED) $(LIB_BUS)
$(BINDIR)/$(S2PDUMP): $(OBJ_S2PDUMP) $(LIB_SHARED) $(LIB_SHARED_INITIATOR) $(LIB_BUS) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2PDUMP) $(LIB_SHARED) $(LIB_SHARED_INITIATOR) $(LIB_BUS)

$(BINDIR)/$(S2PEXEC): $(OBJ_S2PEXEC) $(LIB_SHARED) $(LIB_SHARED_INITIATOR) $(LIB_BUS) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2PEXEC) $(LIB_SHARED) $(LIB_SHARED_INITIATOR) $(LIB_BUS)

$(BINDIR)/$(S2PEXEC): $(OBJ_S2PEXEC) $(LIB_SHARED) $(LIB_BUS) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2PEXEC) $(LIB_SHARED) $(LIB_BUS) $(OBJ_GENERATED) -lprotobuf
$(BINDIR)/$(S2PPROTO): $(OBJ_S2PPROTO) $(LIB_SHARED) $(LIB_SHARED_INITIATOR) $(LIB_BUS) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2PPROTO) $(LIB_SHARED) $(LIB_SHARED_INITIATOR) $(LIB_BUS) $(OBJ_GENERATED) -lprotobuf

$(BINDIR)/$(S2P_TEST): $(LIB_SHARED_COMMAND) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) $(OBJ_S2P_CORE) $(OBJ_S2PCTL_CORE) $(OBJ_S2P_TEST) $(OBJ_S2PCTL_TEST) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2P_CORE) $(OBJ_S2PCTL_CORE) $(OBJ_S2P_TEST) $(LIB_SHARED_COMMAND) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) -lpthread -lpcap -lprotobuf -lgmock -lgtest
$(BINDIR)/$(S2P_TEST): $(LIB_SHARED_COMMAND) $(LIB_SHARED_INITIATOR) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) \
$(OBJ_S2P_CORE) $(OBJ_S2PCTL_CORE) $(OBJ_S2P_TEST) $(OBJ_S2PCTL_TEST) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2P_CORE) $(OBJ_S2PCTL_CORE) $(OBJ_S2P_TEST) $(LIB_SHARED_COMMAND) \
$(LIB_SHARED_INITIATOR) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) -lpthread -lpcap -lprotobuf -lgmock -lgtest

$(BINDIR)/$(IN_PROCESS_TEST): $(LIB_SHARED_COMMAND) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) $(OBJ_S2P_CORE) $(OBJ_IN_PROCESS_TEST) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2P_CORE) $(OBJ_IN_PROCESS_TEST) $(LIB_SHARED_COMMAND) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) -lpthread -lpcap -lprotobuf
$(BINDIR)/$(IN_PROCESS_TEST): $(LIB_SHARED_COMMAND) $(LIB_SHARED_INITIATOR) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) \
$(OBJ_S2P_CORE) $(OBJ_S2PCTL_CORE) $(OBJ_IN_PROCESS_TEST) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ_S2P_CORE) $(OBJ_S2PCTL_CORE) $(OBJ_IN_PROCESS_TEST) $(LIB_SHARED_COMMAND) \
$(LIB_SHARED_INITIATOR) $(LIB_BUS) $(LIB_CONTROLLER) $(LIB_DEVICE) -lpthread -lpcap -lprotobuf

# Phony rules for building individual utilities
.PHONY: s2p $(S2P) $(S2PCTL) $(S2PDUMP) $(S2PEXEC) $(S2P_TEST) $(IN_PROCESS_TEST)
.PHONY: s2p $(S2P) $(S2PCTL) $(S2PDUMP) $(S2PEXEC) $(S2PPROTO) $(S2P_TEST) $(IN_PROCESS_TEST)

s2p: $(BINDIR)/$(S2P)
$(S2P): $(BINDIR)/$(S2P)
$(S2PCTL): $(BINDIR)/$(S2PCTL)
$(S2PDUMP): $(BINDIR)/$(S2PDUMP)
$(S2PEXEC): $(BINDIR)/$(S2PEXEC)
$(S2PPROTO): $(BINDIR)/$(S2PPROTO)
$(S2P_TEST): $(BINDIR)/$(S2P_TEST)
$(IN_PROCESS_TEST): $(BINDIR)/$(IN_PROCESS_TEST)

Expand Down
Loading

0 comments on commit 69ff3ac

Please sign in to comment.