Run make and LD_LIBRARY_PATH='.' ./plugin for the example.
the LD_LIBRARY_PATH part could be removed by either adding
something into your .bashrc. With some internal messing with
get/setenv it's probably possible.
There's a good reason for the fragmentation and recursion of the
Makefiles, as how the files are compiled vary at compile-time
and link-time.
Go thank Tsoding Daily: https://yewtu.be/watch?v=Y57ruDOwH1g
But not for the Makefiles, thank RMS for those.