aboutsummaryrefslogtreecommitdiffstats
path: root/bin/mklib.solaris
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>1999-08-19 13:52:56 +0000
committerBrian Paul <[email protected]>1999-08-19 13:52:56 +0000
commit2d550f6ff1afa3189874c99cfe4125362ee76797 (patch)
tree57a8ad3b79c027a88e7ed2f0ca27844bd82eb5c1 /bin/mklib.solaris
parent5a41d02502185b0716c1006bfe79ce0504fcee85 (diff)
initial check-in (post-crash)
Diffstat (limited to 'bin/mklib.solaris')
-rw-r--r--bin/mklib.solaris53
1 files changed, 53 insertions, 0 deletions
diff --git a/bin/mklib.solaris b/bin/mklib.solaris
new file mode 100644
index 00000000000..218665708af
--- /dev/null
+++ b/bin/mklib.solaris
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Make a Solaris shared library
+# contributed by Arno Hahma ([email protected])
+
+#--identification------------------------------------------------------
+
+# $Id: mklib.solaris,v 1.1 1999/08/19 13:53:06 brianp Exp $
+
+# $Log: mklib.solaris,v $
+# Revision 1.1 1999/08/19 13:53:06 brianp
+# initial check-in (post-crash)
+#
+
+
+#--common--------------------------------------------------------------
+
+# Usage: mklib libname major minor file.o ...
+#
+# First argument is name of output library (LIBRARY)
+# Second arg is major version number (MAJOR)
+# Third arg is minor version number (MINOR)
+# Rest of arguments are object files (OBJECTS)
+
+LIBRARY=$1
+shift 1
+
+MAJOR=$1
+shift 1
+
+MINOR=$1
+shift 1
+
+OBJECTS=$*
+
+#--platform-------------------------------------------------------------
+
+set -x
+
+LIBRARY=`basename $LIBRARY .a`
+
+VERSION=$MAJOR.$MINOR
+
+echo "Building shared object $LIBRARY.so.$VERSION and the archive library $LIBRARY.a"
+rm -f ${LIBRARY}.a ${LIBRARY}.so.${VERSION}
+ar ruv ${LIBRARY}.a ${OBJECTS}
+
+ld -G -o ${LIBRARY}.so.${VERSION} ${OBJECTS}
+
+cp ${LIBRARY}.a ${LIBRARY}.so.${VERSION} ../lib
+cd ../lib
+ln -s ${LIBRARY}.so.${VERSION} ${LIBRARY}.so
+