3
# $Id: mkstaticlib.sh,v 1.3 2010-07-23 15:57:51-07 bll Exp $
5
# Copyright 2010 Brad Lanam Walnut Creek, CA USA
8
# this is a workaround for ksh93 on solaris
9
if [ "$1" = "-d" ]; then
14
mypath=`echo $0 | sed -e 's,/[^/]*$,,'`
15
_MKCONFIG_DIR=`(cd $mypath;pwd)`
17
. ${_MKCONFIG_DIR}/shellfuncs.sh
33
if [ ! -f "$f" ]; then
34
echo "## unable to locate $f"
37
doappend objects " $f"
41
if [ "$libnm" = "" ]; then
49
locatecmd ranlibcmd ranlib
51
locatecmd lordercmd lorder
52
locatecmd tsortcmd tsort
54
if [ "$arcmd" = "" ]; then
55
echo "## Unable to locate 'ar' command"
59
if [ $grc -eq 0 ]; then
60
dosubst libnm '${SHLIB_EXT}$' '' '^lib' ''
62
# for really old systems...
63
if [ "$ranlibcmd" = "" -a "$lordercmd" != "" -a "$tsortcmd" != "" ]; then
64
objects=`$lordercmd ${objects} | $tsortcmd`
66
test -f $libfnm && rm -f $libfnm
67
cmd="$arcmd cq $libfnm ${objects}"
68
if [ $doecho = "T" ]; then
73
if [ $rc -ne 0 ]; then grc=$rc; fi
74
if [ "$ranlibcmd" != "" ]; then
75
cmd="$ranlibcmd $libfnm"
79
if [ $rc -ne 0 ]; then grc=$rc; fi