]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/setup/shared/sharedIrix
Initial revision
[wxWidgets.git] / src / gtk1 / setup / shared / sharedIrix
diff --git a/src/gtk1/setup/shared/sharedIrix b/src/gtk1/setup/shared/sharedIrix
new file mode 100755 (executable)
index 0000000..d2b5393
--- /dev/null
@@ -0,0 +1,45 @@
+#! /bin/sh
+# on Irix, position independent code is the default
+
+#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 $1";
+done
+
+LIBRARY_NAME=`basename $LIBRARY_BASE`
+LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR
+
+echo "Creating shared library: $LIBRARY_FILE"
+
+if test ! -f /tmp/so_locations; then
+  if test -f /usr/lib/so_locations; then
+    cp /usr/lib/so_locations /tmp
+  else
+    touch /tmp/so_locations
+  fi
+fi
+chmod u+w /tmp/so_locations
+
+if test "x$COMPILER" = xgcc ; then
+  gcc -shared -Wl,-update_registry,/tmp/so_locations \
+    -Wl,-soname,$LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS
+else
+  CC -shared -update_registry /tmp/so_locations \
+    -soname $LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS
+fi
+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
+
+
+
+