$ swift build -Xlinker -L/home/ljh/hello/
'example' /home/ljh/example: warning: system packages are deprecated; use system library targets instead
error: the package does not contain a buildable target
$
To wrap a local C shared library you don't express it as a dependency. Swift Package Manager dependencies can only be other Swift packages, not a naked .so file. Instead, you do what the warning tells you, and use a system library target instead.
You can build both C and C++ using the Swift Package Manager. You can find more on this topic in How to call C code from Swift - The.Swift.Dev.. How to use C code from Swift is described here: Apple Developer Documentation. Notice, that using Clang, you can annotate your C API to work with Swift in better fashion.
Notice, that Swift does not have the same level of interoperability with Cpp as with C. Nor is to my knowledge ObjC available on non-Apple platform. AFAIK you can use only APIs exposed using extern "C".
You can also execute Swift code from C using @convention(c) closured and @_cdecl annotated global functions.