Makefile: Allow building libquickjs as a shared library
Adapted from https://git.alpinelinux.org/aports/tree/community/quickjs/01-sharedlib.patch?id=27a8f649949c36bfc3e45854e08c48a8eb06e07c
Co-Authored-By: Celeste [email protected]
FYI: https://github.com/bellard/quickjs/issues/195
If the issue is ABI versioning/stability, it shouldn't be a problem here because it doesn't introduces it.
The SONAME includes the version, so on linking with current version the NEEDED entry ends up being libquickjs.so.2024.01.13.
@lanodan np, I personally wouldn't mind having an .so version as well, was just highlighting that it was brought up before in the context of this project.
Also, the friendly fork quickjs-ng seems to support it https://github.com/quickjs-ng/quickjs/blob/0de570988a0decf7676ebcc831817fc844746bac/CMakeLists.txt#L86