I'm using the scons utility to generate shared libraries. When I write the following rule:
SharedLibrary('hello', 'hello.c')
I would get the ``libhello.so'' file.
Is there a way to get files like ``libhello.so.version'' automatically?
I'm using the scons utility to generate shared libraries. When I write the following rule:
SharedLibrary('hello', 'hello.c')
I would get the ``libhello.so'' file.
Is there a way to get files like ``libhello.so.version'' automatically?
You may want to use libtool to deal with shared library creation and versioning. You will unfortunately have to integrate libtool with SCons yourself as this is not built in the software. The reason, of course, being that libtool is platform specific.
As a cheap alternative, you can override env['SHLIBSUFFIX'] to something like:
Replace(SHLIBSUFFIX = '.so.$SHLIB_VERSION')
Then you can override the $SHLIB_VERSION construction variable independently per target:
SharedLibrary('hello', 'hello.c', SHLIB_VERSION = 1)