#!/bin/sh # coalesced various mklib's for IRIX targets into one script # added argument for architecture flags to facilitate this # added local installation target prefix (RM_INSTALL) # # 09/29/00 jdb # Make a Solaris shared library # contributed by Arno Hahma (arno@nitro.pp.utu.fi) #--identification------------------------------------------------------ # # $Id: mklib.irix6,v 1.1.1.1 2003/01/28 02:15:23 wes Exp $ # Version: $Name: OpenRM-1-6-0-RC5 $ # $Revision: 1.1.1.1 $ # $Log: mklib.irix6,v $ # Revision 1.1.1.1 2003/01/28 02:15:23 wes # Manual rebuild of rm150 repository. # # Revision 1.8 2001/08/01 02:54:38 wes # Doh! # # Revision 1.7 2001/08/01 02:53:31 wes # Phoenix version. # # Revision 1.5 2001/08/01 02:52:14 wes # Doh! # # Revision 1.4 2001/08/01 02:51:45 wes # Chmod 755, added some blanks to comments to force CVS to # eat the file. # # Revision 1.3 2001/03/31 17:13:17 wes # v1.4.0-alpha-2 checkin. # # Revision 1.2 2000/12/05 14:54:15 wes # Optional $RM_INSTALL env variable will dictate location for RM libs. # Expanded IRIX architecture flags. jdb # # # mklib.solaris,v 1.7 1997/10/21 23:32:31 brianp # mklib.solaris,v # Revision 1.7 1997/10/21 23:32:31 brianp # now takes major and minor version arguments # #--common-------------------------------------------------------------- # Usage: mklib # # are arcitecture specific build flags # is name of output library (LIBRARY) # is major version number (MAJOR) # is minor version number (MINOR) # remaining arguments are object files (OBJECTS) ARCHFLAGS=$1 shift 1 LIBRARY=$1 shift 1 MAJOR=$1 shift 1 MINOR=$1 shift 1 VERSION=$MAJOR.$MINOR OBJECTS=$* #--platform------------------------------------------------------------- # build library objects echo "Building shared object $LIBRARY.so.$VERSION and the archive library $LIBRARY.a" \rm -f ${LIBRARY}.a ${LIBRARY}.so.${VERSION} ar -rucv ${LIBRARY}.a ${OBJECTS} # SGI architecture specifics case $ARCHFLAGS in 32*) LDFLAGS="-32";; n32-mips4*) LDFLAGS="-n32 -mips4";; n32*) LDFLAGS="-n32 -mips3";; 64*) LDFLAGS="-64";; esac ld ${LDFLAGS} -update_registry ../lib/so_objects -shared -o ${LIBRARY}.so.${VERSION} ${OBJECTS} if [ ${ARCHFLAGS##*-} != "debug" ]; then echo "library has been stripped (non-debug build)." strip -f ${LIBRARY}.so.${VERSION} fi # code tree \cp -f ${LIBRARY}.a ${LIBRARY}.so.${VERSION} ../lib cd ../lib \rm -f ${LIBRARY}.so ln -s ${LIBRARY}.so.${VERSION} ${LIBRARY}.so # local install if (test -n "`echo $RM_INSTALL`"); then echo "Installing ${LIBRARY} librairies locally in ${RM_INSTALL}/lib..." \cp -f ${LIBRARY}.a ${LIBRARY}.so.${VERSION} ${RM_INSTALL}/lib cd ${RM_INSTALL}/lib \rm -f ${LIBRARY}.so ln -s ${LIBRARY}.so.${VERSION} ${LIBRARY}.so echo "Local ${LIBRARY} librairies installed." fi