Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an alternative approach to #266 / #268. The goal was to try and introduce support for building dynamic libraries on macOS with minimal adjustment to the existing makefile.
uname
. This doesn't support cross-compiling, but is probably sufficient to start.libfoo.so.1
orlibfoo.so.1.2.3
, with the version being appended after the extension.so
. With Mach-O (Darwin), the naming convention islibfoo.1.dylib
orlibfoo.1.2.3.dylib
, with the version being between the library name and the extension.dylib
.4
fromlibmonocypher.so.4
) has been extracted out into its own variable,SOVER
.so
ordylib
) is chosen conditionally per platform;SONAME
is constructed conditionally per platform.SOFLAGS
.install-lib
target has been expanded intoinstall-header
,install-static-lib
,install-so
, andinstall-dylib
targets. Theinstall-lib
target itself will triggerinstall-header
andinstall-static-lib
targets (common targets) and choose one ofinstall-so
orinstall-dylib
as appropriate.I hope that this strikes a reasonable balance between not adding too much cruft while not breaking any existing use cases. Open to any suggestions or concerns.