diff options
author | Sven Gothel <[email protected]> | 2000-11-18 06:43:49 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2000-11-18 06:43:49 +0000 |
commit | 880653d31a8f1ff8384fdbc75b84934bceecfdb8 (patch) | |
tree | bdafb71416f176d2a4b73bf716c9dc3f13685a8b /mklibs/mkslib.solaris-gcc |
Initial revision
Diffstat (limited to 'mklibs/mkslib.solaris-gcc')
-rwxr-xr-x | mklibs/mkslib.solaris-gcc | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/mklibs/mkslib.solaris-gcc b/mklibs/mkslib.solaris-gcc new file mode 100755 index 0000000..4dda870 --- /dev/null +++ b/mklibs/mkslib.solaris-gcc @@ -0,0 +1,63 @@ +#!/bin/sh + +# Make a Solaris shared library +# contributed by Arno Hahma ([email protected]) +# Improved by Sven Goethel <[email protected]> +# goal: same tool for any machines ... +# + +# First argument is name of output library +# without dirname and suffix +# second and third are the major and minor number +# Rest of arguments are object files + +set -x + +LIBDIR=$1 +shift 1 + +LIBRARY=$1 +shift 1 + +LIBMAJOR=$1 +shift 1 + +LIBMINOR=$1 +shift 1 + +LIBBUGFIX=$1 +shift 1 + + +OBJECTS=$* + +# the following provided by Thomas Hiller ([email protected]) + +VERSION="${LIBMAJOR}.${LIBMINOR}.${LIBBUGFIX}" + +LIBNAME=${LIBRARY}.so + +echo "Building shared object $LIBRARY.so.$VERSION and the archive library $LIBRARY.a" +rm -f ${LIBDIR}/${LIBNAME}* + +gcc -G -o ${LIBDIR}/${LIBNAME}.${VERSION} ${OBJECTS} + +( cd ${LIBDIR} ; + ln -s ${LIBNAME}.${VERSION} ${LIBNAME}.${LIBMAJOR}.${LIBMINOR} +) + +( cd ${LIBDIR} ; + ln -s ${LIBNAME}.${LIBMAJOR}.${LIBMINOR} ${LIBNAME}.${LIBMAJOR} +) + +( cd ${LIBDIR} ; + ln -s ${LIBNAME}.${LIBMAJOR} ${LIBNAME} +) + +# Print a reminder about shared libs: +echo +echo "******Be sure to add" ${LIBDIR}" to your LD_LIBRARY_PATH variable" +echo +sleep 2 + + |