Rev 10633 | Blame | Last modification | View Log | Download | RSS feed
#!/bin/sh## ${R_HOME}/bin/SHLIB# @configure_input@revision='$Revision: 1.16 $'version=`set - ${revision}; echo ${2}`version="R shared library builder ${version}"usage="Usage: R SHLIB [options] filesBuild a shared library for dynamic loading from the specified source orobject files (which are automagically made from their sources). If notgiven via \`--output', the name for the library is determined from thefirst file.Options:-h, --help print short help message and exit-o, --output=LIB use LIB as (full) name for the built library-v, --version print version info and exitReport bugs to <r-bugs@r-project.org>."lib=objs=MAKE=${MAKE-@MAKE@}makeargs=makefiles="-f ${R_HOME}/etc/Makeconf"SHLIB_CXXLD=@SHLIB_CXXLD@SHLIB_CXXLDFLAGS=@SHLIB_CXXLDFLAGS@with_cxx=falsewith_f77=falsewhile test -n "${1}"; docase ${1} in-h|--help)echo "${usage}"; exit 0 ;;-v|--version)echo "${version}"; exit 0 ;;-o)lib=${2}; shift ;;--output=*)lib=`echo "${1}" | sed -e 's/[^=]*=//'` ;;*.cc|*.cpp|.*C)with_cxx=trueif test -z "${lib}"; thenlib="`echo ${1} | sed 's/\.[^\.][^\.]*$/.@SHLIB_EXT@/'`"fiobjs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`";;*.f)with_f77=trueif test -z "${lib}"; thenlib="`echo ${1} | sed 's/\.[^\.][^\.]*$/.@SHLIB_EXT@/'`"fiobjs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`";;*.[co])if test -z "${lib}"; thenlib="`echo ${1} | sed 's/\.[^\.][^\.]*$/.@SHLIB_EXT@/'`"fiobjs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`";;esacshiftdoneif test -r Makevars; thenmakefiles="-f Makevars ${makefiles}"fimakeargs="SHLIB=\"${lib}\" OBJS=\"${objs}\""if ${with_cxx}; thenmakeargs="SHLIB_LDFLAGS=\"${SHLIB_CXXLDFLAGS}\" ${makeargs}"makeargs="SHLIB_LD=\"${SHLIB_CXXLD}\" ${makeargs}"fiif ${with_f77}; then:elsemakeargs="${makeargs} FLIBS="fieval ${MAKE} ${makefiles} ${makeargs}### Local Variables: ***### mode: sh ***### sh-indentation: 2 ***### End: ***