blob: 5a26a355c023f45cc3066d5e7834537784aad6f0 [file] [log] [blame]
Brian Paul2d550f61999-08-19 13:52:56 +00001#!/bin/sh
2
3# Make a Solaris shared library
4# contributed by Arno Hahma (arno@nitro.pp.utu.fi)
5
6#--identification------------------------------------------------------
7
Brian Pauld9bb1061999-09-15 15:10:20 +00008# $Id: mklib.solaris,v 1.2 1999/09/15 15:10:20 brianp Exp $
Brian Paul2d550f61999-08-19 13:52:56 +00009
10# $Log: mklib.solaris,v $
Brian Pauld9bb1061999-09-15 15:10:20 +000011# Revision 1.2 1999/09/15 15:10:20 brianp
12# added third, tiny version number to arguments
13#
Brian Paul2d550f61999-08-19 13:52:56 +000014# Revision 1.1 1999/08/19 13:53:06 brianp
15# initial check-in (post-crash)
16#
17
18
19#--common--------------------------------------------------------------
20
Brian Paul2d550f61999-08-19 13:52:56 +000021LIBRARY=$1
22shift 1
23
24MAJOR=$1
25shift 1
26
27MINOR=$1
28shift 1
29
Brian Pauld9bb1061999-09-15 15:10:20 +000030TINY=$1
31shift 1
32
Brian Paul2d550f61999-08-19 13:52:56 +000033OBJECTS=$*
34
35#--platform-------------------------------------------------------------
36
37set -x
38
39LIBRARY=`basename $LIBRARY .a`
40
41VERSION=$MAJOR.$MINOR
42
43echo "Building shared object $LIBRARY.so.$VERSION and the archive library $LIBRARY.a"
44rm -f ${LIBRARY}.a ${LIBRARY}.so.${VERSION}
45ar ruv ${LIBRARY}.a ${OBJECTS}
46
47ld -G -o ${LIBRARY}.so.${VERSION} ${OBJECTS}
48
49cp ${LIBRARY}.a ${LIBRARY}.so.${VERSION} ../lib
50cd ../lib
51ln -s ${LIBRARY}.so.${VERSION} ${LIBRARY}.so
52