1998-09-02 18:23:57 -04:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
#LIBRARY_BASE=`echo $1 | sed 's/.a/.so/'`
|
|
|
|
COMPILER=$1
|
|
|
|
LIBRARY_BASE=$2
|
|
|
|
LIBRARY_MAJOR=$3
|
|
|
|
LIBRARY_MINOR=$4
|
|
|
|
shift 3
|
|
|
|
LIBRARY_OBJS=
|
|
|
|
while (test $# -ne 1) do
|
|
|
|
shift;
|
|
|
|
LIBRARY_OBJS="$LIBRARY_OBJS $1sh";
|
|
|
|
done
|
|
|
|
|
|
|
|
LIBRARY_NAME=`basename $LIBRARY_BASE`
|
|
|
|
LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR
|
|
|
|
|
|
|
|
echo "Creating shared library: $LIBRARY_FILE"
|
|
|
|
|
1999-04-15 06:05:22 -04:00
|
|
|
case $COMPILER in gcc*|*gcc|egcs)
|
1998-09-02 18:23:57 -04:00
|
|
|
$COMPILER -shared -Wl,-soname,$LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
$COMPILER -shared -soname $LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS
|
|
|
|
esac
|
|
|
|
chmod a+x $LIBRARY_FILE
|
|
|
|
rm -f $LIBRARY_BASE.$LIBRARY_MAJOR
|
|
|
|
ln -s $LIBRARY_NAME.$LIBRARY_MAJOR.$LIBRARY_MINOR $LIBRARY_BASE.$LIBRARY_MAJOR
|
|
|
|
rm -f $LIBRARY_BASE
|
|
|
|
ln -s $LIBRARY_NAME.$LIBRARY_MAJOR $LIBRARY_BASE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|