]> git.saurik.com Git - wxWidgets.git/blob - src/gtk1/setup/shared/sharedIrix
mdi private menus
[wxWidgets.git] / src / gtk1 / setup / shared / sharedIrix
1 #! /bin/sh
2 # on Irix, position independent code is the default
3
4 #LIBRARY_BASE=`echo $1 | sed 's/.a/.so/'`
5 COMPILER=$1
6 LIBRARY_BASE=$2
7 LIBRARY_MAJOR=$3
8 LIBRARY_MINOR=$4
9 shift 3
10 LIBRARY_OBJS=
11 while (test $# -ne 1) do
12 shift;
13 LIBRARY_OBJS="$LIBRARY_OBJS $1";
14 done
15
16 LIBRARY_NAME=`basename $LIBRARY_BASE`
17 LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR
18
19 echo "Creating shared library: $LIBRARY_FILE"
20
21 if test ! -f /tmp/so_locations; then
22 if test -f /usr/lib/so_locations; then
23 cp /usr/lib/so_locations /tmp
24 else
25 touch /tmp/so_locations
26 fi
27 fi
28 chmod u+w /tmp/so_locations
29
30 if test "x$COMPILER" = xgcc ; then
31 gcc -shared -Wl,-update_registry,/tmp/so_locations \
32 -Wl,-soname,$LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS
33 else
34 CC -shared -update_registry /tmp/so_locations \
35 -soname $LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS
36 fi
37 chmod a+x $LIBRARY_FILE
38 rm -f $LIBRARY_BASE.$LIBRARY_MAJOR
39 ln -s $LIBRARY_NAME.$LIBRARY_MAJOR.$LIBRARY_MINOR $LIBRARY_BASE.$LIBRARY_MAJOR
40 rm -f $LIBRARY_BASE
41 ln -s $LIBRARY_NAME.$LIBRARY_MAJOR $LIBRARY_BASE
42
43
44
45