libpldm: Reorganize source and test files
Primarily this is about moving specification-specific files into
'dsp/' (in the "DMTF Standard Publication" sense[1]) subdirectories of
both src/ and tests/.
[1]: https://www.dmtf.org/sites/default/files/standards/documents/DSP4014_2.14.0.pdf
libpldm is a concrete C implementation of the PLDM family of
specifications. This invokes some accidental complexity[2] such as the
msgbuf APIs and other concerns.
[2]: https://en.wikipedia.org/wiki/No_Silver_Bullet
Separate the essential complexity (everything under the dsp/
subdirectories) from the accidental complexity (almost everything else).
While doing so, I took the opportunity to drop the 'libpldm_' prefix
and '_test' suffix from a variety of tests. The 'libpldm_' prefix is a
hangover from the days when libpldm was a subproject of OpenBMC's pldm
repo. The '_test' suffix feels redundant given the parent directory
path.
Note that we maintain separation of the src/ and tests/. The test suite
is implemented in C++ while libpldm's APIs are declared and defined in
C. The ability to chop all the tests and C++ out of the implementation
by ignoring a subtree seems like a desirable property when vendoring the
library into other projects.
Finally, update the x86_64 GCC ABI dump, as rearranging the source
causes a lot of churn in its definitions.
Change-Id: Icffcc6cf48b3101ecd38168827c0a81cffb8f083
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/base.c b/src/dsp/base.c
similarity index 100%
rename from src/base.c
rename to src/dsp/base.c
diff --git a/src/bios.c b/src/dsp/bios.c
similarity index 100%
rename from src/bios.c
rename to src/dsp/bios.c
diff --git a/src/bios_table.c b/src/dsp/bios_table.c
similarity index 100%
rename from src/bios_table.c
rename to src/dsp/bios_table.c
diff --git a/src/firmware_update.c b/src/dsp/firmware_update.c
similarity index 100%
rename from src/firmware_update.c
rename to src/dsp/firmware_update.c
diff --git a/src/fru.c b/src/dsp/fru.c
similarity index 100%
rename from src/fru.c
rename to src/dsp/fru.c
diff --git a/src/dsp/meson.build b/src/dsp/meson.build
new file mode 100644
index 0000000..39f4db8
--- /dev/null
+++ b/src/dsp/meson.build
@@ -0,0 +1,9 @@
+libpldm_sources += files(
+ 'base.c',
+ 'bios.c',
+ 'bios_table.c',
+ 'firmware_update.c',
+ 'fru.c',
+ 'pdr.c',
+ 'platform.c',
+)
diff --git a/src/pdr.c b/src/dsp/pdr.c
similarity index 100%
rename from src/pdr.c
rename to src/dsp/pdr.c
diff --git a/src/platform.c b/src/dsp/platform.c
similarity index 100%
rename from src/platform.c
rename to src/dsp/platform.c
diff --git a/src/meson.build b/src/meson.build
index 9f4487c..525463f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,15 +1,9 @@
libpldm_sources = files(
- 'base.c',
- 'bios.c',
- 'platform.c',
- 'bios_table.c',
- 'firmware_update.c',
- 'fru.c',
- 'pdr.c',
'responder.c',
'utils.c'
- )
+)
+subdir('dsp')
subdir('requester')
subdir('transport')