swh:1:snp:af87cd67498ef4fe47c76ed3e7caffe5b61facaf
Raw File
Tip revision: 5de30ed1dd422e1f4d77caf302b954a76d28996c authored by Axel Naumann on 17 June 2014, 23:16:20 UTC
Make version 6.00.01.
Tip revision: 5de30ed
ld.sh
#! /bin/sh

# Simple interface to LINK, tansforming -o <exe> to -out:<exe> and unix
# pathnames to windows pathnames.

dir=`dirname $0`
args=
dll=
debug=
while [ "$1" != "" ]; do
   case "$1" in
   -o) args="$args -out:$2"
       dll="$2"
       shift ;;
   -debug) args="$args $1"
           debug=-DDEBUG;;
   *) args="$args $1" ;;
   esac
   shift
done

if [ "$dll" != "bin/rmkdepend.exe" -a \
     "$dll" != "bin/bindexplib.exe" -a \
     "$dll" != "bin/cint.exe" -a \
     "$dll" != "bin/makecint.exe" -a \
     "$dll" != "bin/rootcint.exe" -a \
     "$dll" != "bin/rlibmap.exe" -a \
     "$dll" != "bin/genmap.exe" -a \
     "$dll" != "cint/main/cint_tmp.exe" -a \
     "$dll" != "utils/src/rootcint_tmp.exe" -a \
     "$dll" != "bin/libCint.dll" -a \
     "$dll" != "bin/libReflex.dll" -a \
     "$dll" == "`echo $dll | sed 's,^cint/,,'`" -a \
     -r base/src/precompile.o ]; then
  args="$args base/src/precompile.o"
fi

if [ "$dll" != "" ]; then
   $dir/makeresource.sh "$dll" \
      && rc $debug -Iinclude -Fo"${dll}.res" "${dll}.rc" > /dev/null 2>&1
   if [ -r "${dll}.res" ]; then
      args="$args ${dll}.res"
   fi
   rm -f "${dll}.rc"
fi

WHICHLINK="`which cl.exe|sed 's,cl\.exe$,link.exe,'`"
"${WHICHLINK}" $args || exit $?

if [ "$dll" != "" -a -f $dll.manifest ]; then
   if [ "${dll%.dll}" == "$dll" ]
       then resourceID=1; # .exe
       else resourceID=2  #.dll
   fi
   mt -nologo -manifest $dll.manifest -outputresource:${dll}\;$resourceID
   rm $dll.manifest
fi

if [ "$dll" != "" ]; then
	rm -f "${dll}.res"
fi

exit 0
back to top