#!/bin/sh # # ${RHOME}/bin/SHLIB # @configure_input@ VERSION="0.1-1" USAGE_MSG="Usage: R SHLIB [-o lib] obj_1 ... obj_n" OBJS= DEBUG=false MAKE=${MAKE-@MAKE@} while test -n "${1}"; do # if ${DEBUG}; then echo "$0 -- DEBUG: arg = '${1}'"; fi case ${1} in -h|--help|-\?) echo "${USAGE_MSG}"; exit 0 ;; -V|--version) echo "${VERSION}"; exit 0 ;; --debug) DEBUG=true ;; -o) lib=${2}; shift ;; *) if [ x$lib = x ]; then lib=`echo ${1}|sed 's/\.[^\.][^\.]*$/.@SHLIBEXT@/'` else OBJS="${OBJS} `echo ${1}|sed 's/\.[^\.][^\.]*$/.o/'`" fi ;; esac shift done ${MAKE} -f ${RHOME}/etc/Makeconf ${OBJS} if ${DEBUG}; then echo "$0 -- DEBUG: Before Linking '${lib}'.." set -x fi @SHLIBLD@ @SHLIBLDFLAGS@ -o ${lib} ${OBJS} @FLIBS@ ### Local Variables: *** ### mode: sh *** ### sh-indent: 2 *** ### End: ***