head	1.23;
access;
symbols
	charm6_1:1.23
	charm_6_0_1:1.23
	charm6_0_1:1.23
	charm6_0:1.20
	ChaNGa_1-0:1.20
	charm5_9:1.17
	charm_5-4-2:1.9
	charm_5-4-1:1.8;
locks; strict;
comment	@# @;


1.23
date	2009.01.21.20.21.19;	author gzheng;	state Exp;
branches;
next	1.22;
commitid	nFVXLFrBLGzbemzt;

1.22
date	2008.06.27.04.45.38;	author gzheng;	state Exp;
branches;
next	1.21;
commitid	Tq1DycsNp3MHJx8t;

1.21
date	2008.06.25.07.45.43;	author gzheng;	state Exp;
branches;
next	1.20;
commitid	POw5SB0FUbJgNi8t;

1.20
date	2005.11.14.06.07.29;	author gzheng;	state Exp;
branches;
next	1.19;

1.19
date	2005.11.14.06.04.20;	author gzheng;	state Exp;
branches;
next	1.18;

1.18
date	2005.11.14.04.27.53;	author gzheng;	state Exp;
branches;
next	1.17;

1.17
date	2003.12.24.06.52.46;	author gzheng;	state Exp;
branches;
next	1.16;

1.16
date	2003.12.22.21.27.18;	author gzheng;	state Exp;
branches;
next	1.15;

1.15
date	2003.07.22.04.11.10;	author gzheng;	state Exp;
branches;
next	1.14;

1.14
date	2003.07.06.02.38.51;	author gzheng;	state Exp;
branches;
next	1.13;

1.13
date	2003.05.29.05.43.55;	author gzheng;	state Exp;
branches;
next	1.12;

1.12
date	2003.03.01.08.37.18;	author gzheng;	state Exp;
branches;
next	1.11;

1.11
date	2001.12.14.16.27.26;	author gzheng;	state Exp;
branches;
next	1.10;

1.10
date	2001.12.13.18.41.33;	author gzheng;	state Exp;
branches;
next	1.9;

1.9
date	2001.03.31.18.01.17;	author gzheng;	state Exp;
branches;
next	1.8;

1.8
date	2001.03.07.03.22.17;	author gzheng;	state Exp;
branches;
next	1.7;

1.7
date	2001.02.23.06.59.45;	author gzheng;	state Exp;
branches;
next	1.6;

1.6
date	2001.02.21.08.34.34;	author gzheng;	state Exp;
branches;
next	1.5;

1.5
date	2001.02.17.08.02.23;	author gzheng;	state Exp;
branches;
next	1.4;

1.4
date	2001.02.16.23.44.55;	author gzheng;	state Exp;
branches;
next	1.3;

1.3
date	2001.02.15.19.21.59;	author gzheng;	state Exp;
branches;
next	1.2;

1.2
date	2001.02.15.19.11.51;	author gzheng;	state Exp;
branches;
next	1.1;

1.1
date	2001.01.29.21.23.13;	author olawlor;	state Exp;
branches;
next	;


desc
@@


1.23
log
@updated environment vars to the latest VC++ 9
@
text
@#!/bin/sh
##############################################################################
# unix2nt_cc:  for VC++ ver 8
# Maps UNIX C/C++ compiler command-line options to 
# Microsoft Visual C++ 6.0 command line options. 
# That is, this script is a UNIX-ifying wrapper for 
# the NT CL and LINK commands. 
#
# Known bugs: pathnames with spaces cause quoting problems.
#
# Orion Sky Lawlor, olawlor@@acm.org, 1/22/2001
##############################################################################

#TMP environment variable seems get lost in sub shell
export TMP=`cygpath -w /tmp`
export TEMP=`cygpath -w /tmp`
if [ ! -d "$TMP" ]
then
	echo "Error no $TMP"
	echo "unix2nt_cc exiting..." 1>&2
	exit 1
fi

# Configurable option: Location of MSDEV
if test -z "$VCINSTALLDIR"
then
  VCC_DIR="C:/Program Files/Microsoft Visual Studio 9.0/VC"
else
  VCC_DIR=$VCINSTALLDIR
fi
if test ! -d "`cygpath -u "$VCC_DIR"`"
then
  echo $0> VCC_DIR: $VCC_DIR is not set properly!
  exit 1
fi
if test -z "$WINDOWSSDKDIR"
then
  SDK_DIR="C:/Program Files/Microsoft SDKs/Windows/v6.0A"
else
  SDK_DIR=$WINDOWSSDKDIR
fi
if test ! -d "`cygpath -u "$SDK_DIR"`"
then
  echo $0> SDK_DIR: $SDK_DIR is not set properly!
  exit 1
fi

#CL command-line options for -O and -g mode
CL_CMD="$VCC_DIR/BIN/CL.EXE"
CL_COMMON=' /nologo /W3 /EHsc /DWIN32 /D_WINDOWS /FD /Zp4'
CL_COMMON="$CL_COMMON /I`cygpath -d \"$SDK_DIR/Include\"`"
CL_O=$CL_COMMON" /DNDEBUG /MT /Ox"
CL_DEF=$CL_COMMON" /MT"
CL_G=$CL_COMMON" /Z7 /MTd /Od"
CL_DLL="/LD"

#LINK command-line options for -O and -g mode
LINK_CMD="$VCC_DIR/BIN/LINK.EXE"
LINK_COMMON='/nologo /subsystem:console '
LINK_COMMON="$LINK_COMMON /LIBPATH:`cygpath -d \"$SDK_DIR/Lib\"`"
LINK_O=$LINK_COMMON
LINK_DEF=$LINK_COMMON
LINK_G="$LINK_COMMON /DEBUG"
#LINK_POST='ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib 
#  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
#  odbc32.lib odbccp32.lib /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /MACHINE:IX86 '
LINK_POST='ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib
  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
  /MACHINE:X86 /ERRORREPORT:PROMPT '

if [ "x$LIB" = "x" ]
then
	export INCLUDE="$VCC_DIR/include"
	export LIB="$VCC_DIR/lib"
fi

###################################################################
#
#  Utility routines used below
#
###################################################################

# PrintUsage: prints a helpful command-line usage message and quits
# Args: any additional messages
printUsage() {
    echo "Usage: unix2nt_cc [ flags ] <files>"
    echo
    echo "  flags:"
    echo "        -c <file> -o <target> -g -O"
    echo "        -D<define> -I<include path> -L<lib path> -l<library>"
	echo "  files: <fName>.c <fName>.C <fName>.cpp <fName>.cxx"
    echo
    echo "  Compiles C, C++ programs using NT CL and LINK commands."
	echo "Version 1.0, Parallel Programming Lab, UIUC, 2001"
    echo $*
    exit 1
}

# End blows away the temporary files (unless SAVE is true) and exits
# Args: <exit code>
End() {
    exit $1
}

# This procedure prints an error message and exits.
# ("1>&2" redirects the echo output to stderr).
# Args: written to stderr
Abort() {
	echo "unix2nt_cc Fatal Error in directory "`pwd` 1>&2
	echo "   $*" 1>&2
	echo "unix2nt_cc exiting..." 1>&2
	End 1
}

# This procedure removes the extention (the ".c" in "./main.c") from
# its first argument, and prints the result. Unlike the builtin command
# basename, it keeps the directory path.
# Args: <name to strip>
stripExtention() {
	se_base=`echo $1 | awk -F/ '{print $NF}'`
	se_strip=`echo $se_base | awk -F. '{ORS="";print $1;for (i=2;i<NF;i++) print "."$i}'`
	se_ret=`echo $1 | awk -F/ '{ORS="";for (i=1;i<NF;i++) print $i"/"}'`"$se_strip"
	echo $se_ret
}

# GetExtention returns the extention on the given file name
# or "" if none.  (e.g. "./bob/snack.c" returns ".c")
# Args: <name to find extention of>
getExtention() {
	se_base=`echo $1 | awk -F/ '{print $NF}'`
        se_ret=`echo $se_base | awk -F. '{if (NF<=1) print ""; else print "."$NF}'`
	echo $se_ret
}

##############################################################################
#
# Parse & convert the arguments
#
##############################################################################

#Program state:
VERBOSE="no"
DEBUG_SCRIPT=""
SAVE=""

DOCOMPILE="no"
DOLINK="no"
OUTPUT=""
CL_OPTS=$CL_DEF
LINK_OPTS=$LINK_DEF
LIBDIR=""
LIBDIRS=""

#NT CL and LINK command-line arguments:
LINK=""
CL=""

[ $# -eq 0 ] && printUsage "Error: No arguments given."

while [ ! $# -eq 0 ]
do
	arg="$1"
	shift

	case "$arg" in
	-verbose)
		VERBOSE="yes"
		;;
	-E)
		CL="$CL /E"
		;;
	-O)
		CL_OPTS=$CL_O
		LINK_OPTS=$LINK_O
		;;
	-g)
		CL_OPTS=$CL_G
		LINK_OPTS=$LINK_G
		;;
	-c) 
		CL="$CL /c";;
	-D)
		CL="$CL /D$1"
		shift
		;;
	-D*)
		def=`echo $arg | awk -F@@ '{print substr($1,3)}'`
		CL="$CL /D$def"
		;;
	-I)
		CL="$CL /I`cygpath -w $1`"
		shift
		;;
	-I*)
		path=`echo $arg | awk -F@@ '{print substr($1,3)}'`
		CL="$CL /I`cygpath -w $path`"
		;;
	-L)
		LIBDIR="`cygpath -w $1`"
		LIBDIRS="$LIBDIRS `cygpath -u $LIBDIR`"
		LINK=$LINK"	/LIBPATH:$LIBDIR"
		shift
		;;
	-L*)
		LIBDIR=`echo $arg | awk -F@@ '{print substr($1,3)}'`
		LIBDIR="`cygpath -w $LIBDIR`"
		LIBDIRS="$LIBDIRS `cygpath -u $LIBDIR`"
		LINK=$LINK"	/LIBPATH:$LIBDIR"
		;;
	-l*)
		if [ "$arg" != "-lm" ]
		then
#Convert -lfoo to path-to-foo.a
			L=`echo $arg | awk -F@@ '{print substr($1,3)}'`
			D="no"
			[ -r "$L" ] && D="$L"
			[ -r "$L.a" ] && D="$L.a"
			[ -r "$L.lib" ] && D="$L.lib"
			[ -r "lib$L.a" ] && D="lib$L.a"
			test -n "$LIBDIRS" &&	\
			for dir in $LIBDIRS
			do
			  [ -r "$dir/lib$L" ] && D="$dir/lib$L"
			  [ -r "$dir/lib$L.a" ] && D="$dir/lib$L.a"
			  [ -r "$dir/$L.lib" ] && D="$dir/$L.lib"
			done
			[ $D = no ] && Abort "Couldn't find library $L in . or $LIBDIRS"
			LINK="$LINK `cygpath -w $D`"
		fi
		;;
	-o)
		out=$1
		shift
		if [ "x`getExtention $out`" = "x.o" ]
		then
#It's a .o output filename-- tell CL
			OUTPUT="/Fo`cygpath -w $out`"
		elif [ "x`getExtention $out`" = "x.so" ]
		then
			OUTPUT="/Fo`cygpath -w $out`"
		else
#It's an exe filename-- tell LINK
			LINK="$LINK /out:$out.exe"
			DOLINK="yes"
		fi
		;;
	
#Object file or library-- add to link
	*.o|*.a|*.lib)
		if [ "$DOCOMPILE" = "yes" ]
		then
		  CL="$CL `cygpath -w $arg`"
		else
		  LINK="$LINK `cygpath -w $arg`"
		  DOLINK="yes"
		fi
		;;
#C source file
	*.c)
		base=`stripExtention $arg`
		CL="$CL /Tc`cygpath -w $arg`"
#		OUTPUT="/Fo$base.o"
		LINK="$LINK $base.o"
		DOCOMPILE="yes"
		;;
#C++ source file
	*.C|*.cxx|*.cpp)
		base=`stripExtention $arg`
		CL="$CL /Tp`cygpath -w $arg`"
#		OUTPUT="/Fo$base.o"
		LINK="$LINK $base.o"
		DOCOMPILE="yes"
		;;
# Default
	*)
#		printUsage  "Error: Unrecognized argument $arg"
		echo  "Ignored Unrecognized argument $arg"
		;;
	esac
done

#if [ "x$CL" != "x" ]
if [ $DOCOMPILE = yes ]
then
	OPTS="$CL_OPTS $OUTPUT $CL"
	[ $VERBOSE = yes ] && echo "unix2nt_cc> $CL_CMD" $OPTS
	"$CL_CMD" $OPTS
	if [ $? != 0 ]
	then
		Abort "Error executing" "$CL_CMD" $OPTS
	fi
fi

if [ $DOLINK = yes ]
then
	OPTS="$LINK_OPTS $LINK $LINK_POST"
	[ $VERBOSE = yes ] && echo "unix2nt_cc> $LINK_CMD" $OPTS
	"$LINK_CMD" $OPTS
	if [ $? != 0 ]
	then
		Abort "Error executing" "$LINK_CMD" $OPTS 
	fi	
fi

exit 0
@


1.22
log
@check if VC and SDK dir exist.
@
text
@d33 1
a33 1
  echo VCC_DIR: $VCC_DIR is not set properly!
d38 1
a38 1
  SDK_DIR="C:/Program Files/Microsoft Platform SDK"
d44 1
a44 1
  echo SDK_DIR: $SDK_DIR is not set properly!
@


1.21
log
@get VC studio and SDK from environment variables instead of hardcoding default paths.
@
text
@d27 1
a27 1
  VCC_DIR="C:/Program Files/Microsoft Visual Studio 8/VC"
d31 5
d42 5
@


1.20
log
@updated.
@
text
@d25 12
a36 2
VCC_DIR="C:/Program Files/Microsoft Visual Studio 8/VC"
SDK_DIR="C:/Program Files/Microsoft Platform SDK"
@


1.19
log
@renamed unix2nt_cc to .old for VC++ ver 6.
New unix2nt_cc support Visual Studio Express (VC++ ver 8) plus Microsoft Platform SDK.
@
text
@d3 2
a4 1
# unix2nt_cc: Maps UNIX C/C++ compiler command-line options to 
a24 1
#VCC_DIR="C:/Program Files/Microsoft Visual Studio/Vc98"
a29 1
#CL_COMMON=' /nologo /W3 /GB /GX /DWIN32 /D_WINDOWS /FD /Zp4 '
d40 1
d47 3
a49 1
LINK_POST='/MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib'
@


1.18
log
@updated for VC++ 8
@
text
@d26 1
d31 2
a32 1
CL_COMMON=' /nologo /W3 /EHsc /DWIN32 /D_WINDOWS /FD /Zp4 '
@


1.17
log
@assume 4 bytes alignment by default in CL.
@
text
@d24 2
a25 1
VCC_DIR="C:/Program Files/Microsoft Visual Studio/Vc98"
d29 2
a30 1
CL_COMMON=' /nologo /W3 /GB /GX /DWIN32 /D_WINDOWS /FD /Zp4 '
d42 4
a45 3
LINK_POST='ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib 
  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
  odbc32.lib odbccp32.lib /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /MACHINE:IX86 '
@


1.16
log
@added /subsystem:console to linker to prevent popup windows.
@
text
@d28 1
a28 1
CL_COMMON=' /nologo /W3 /GB /GX /DWIN32 /D_WINDOWS /FD'
@


1.15
log
@minor tweaks in TMP and TEMP environment variables.
@
text
@d36 1
a36 1
LINK_COMMON='/nologo '
@


1.14
log
@make it not to recognize -shared option.
@
text
@d14 8
a21 1
export TMP=/tmp
@


1.13
log
@ignore -shared for now, not doing anything.
@
text
@a239 6
	-shared)
#skip building a DLL
		End 0;
		CL="$CL $CL_DLL"
		DOCOMPILE="yes"
		;;
@


1.12
log
@fixed a bug when TMP environment variable did not pass into subshell.
@
text
@d25 1
d204 3
d216 7
a222 2
		LINK="$LINK `cygpath -w $arg`"
		DOLINK="yes"
d238 6
@


1.11
log
@remove the /nodefaultlib because it incur other problem.
@
text
@d13 3
@


1.10
log
@fixed some linking error with nodefault library option.
@
text
@d31 1
a31 2
  odbc32.lib odbccp32.lib /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /MACHINE:IX86 
  /NODEFAULTLIB:libcmt.lib'
@


1.9
log
@unknown flags are ignored with warning.
@
text
@d29 4
a32 3
LINK_POST='ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 
 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib 
 odbccp32.lib /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /MACHINE:IX86 '
@


1.8
log
@add -E option
@
text
@d230 2
a231 1
		printUsage  "Error: Unrecognized argument $arg"
@


1.7
log
@yet another bug when using -L without blank between libpath.
@
text
@d131 3
@


1.6
log
@unix2nt_cc didn't search all LIBPATH to find the library, it also didn't find the .lib. fixed.
@
text
@a167 1
		shift
@


1.5
log
@fix a bug when it invoke cl incorrectly. it only need to invoke CL when *.c *.C source files presents.
@
text
@d114 1
d159 1
d166 1
d178 1
d180 9
a188 4
			[ -r "$LIBDIR/lib$L" ] && D="$LIBDIR/lib$L"
			[ -r "$LIBDIR/lib$L.a" ] && D="$LIBDIR/lib$L.a"
			[ $D = no ] && Abort "Couldn't find library $L in . or $LIBDIR"
			LINK="$LINK $D"
@


1.4
log
@unix2nt_cc -L use cygpath to get correct DOS path
@
text
@d108 1
d163 2
a164 1
		LINK=$LINK"	/LIBPATH:`cygpath -w $LIBDIR`"
d198 1
a198 1
		LINK="$LINK $arg"
d207 1
d215 1
d224 2
a225 1
if [ "x$CL" != "x" ]
@


1.3
log
@fixed a bug when -c override -o path, and again use cygpath to translate unix path to dos.
@
text
@d156 1
a156 1
		LIBDIR="$1"
d162 1
a162 1
		LINK=$LINK"	/LIBPATH:$LIBDIR"
@


1.2
log
@using cygpath to translate cygwin path to dos.
@
text
@d186 1
a186 1
			OUTPUT="/Fo$out"
d202 2
a203 2
		CL="$CL /Tc$arg"
		OUTPUT="/Fo$base.o"
d209 2
a210 2
		CL="$CL /Tp$arg"
		OUTPUT="/Fo$base.o"
@


1.1
log
@These translate UNIX calls to NT calls--
system_ln maps "ln" to "cp"
unix2nt_ar is a wrapper around Visual C++ "LIB.EXE"
unix2nt_cc is a wrapper around Visual C++ "CL.EXE" and "LINK.EXE"
@
text
@d3 6
a8 6
# unix2nt_cc: Maps UNIX C/C++ compiler command-line options to 
# Microsoft Visual C++ 6.0 command line options. 
# That is, this script is a UNIX-ifying wrapper for 
# the NT CL and LINK commands. 
#
# Known bugs: pathnames with spaces cause quoting problems.
d12 27
a38 27

# Configurable option: Location of MSDEV
VCC_DIR="C:/Program Files/Microsoft Visual Studio/Vc98"

#CL command-line options for -O and -g mode
CL_CMD="$VCC_DIR/BIN/CL.EXE"
CL_COMMON=' /nologo /W3 /GB /GX /DWIN32 /D_WINDOWS /FD'
CL_O=$CL_COMMON" /DNDEBUG /MT /Ox"
CL_DEF=$CL_COMMON" /MT"
CL_G=$CL_COMMON" /Z7 /MTd /Od"

#LINK command-line options for -O and -g mode
LINK_CMD="$VCC_DIR/BIN/LINK.EXE"
LINK_COMMON='/nologo '
LINK_O=$LINK_COMMON
LINK_DEF=$LINK_COMMON
LINK_G="$LINK_COMMON /DEBUG"
LINK_POST='ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 
 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib 
 odbccp32.lib /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /MACHINE:IX86 '

if [ "x$LIB" = "x" ]
then
	export INCLUDE="$VCC_DIR/include"
	export LIB="$VCC_DIR/lib"
fi

d53 1
a53 1
	echo "  files: <fName>.c <fName>.C <fName>.cpp <fName>.cxx"
d55 1
a55 1
    echo "  Compiles C, C++ programs using NT CL and LINK commands."
d102 15
a116 15

#Program state:
VERBOSE="no"
DEBUG_SCRIPT=""
SAVE=""

DOLINK="no"
OUTPUT=""
CL_OPTS=$CL_DEF
LINK_OPTS=$LINK_DEF
LIBDIR=""

#NT CL and LINK command-line arguments:
LINK=""
CL=""
d125 87
a211 87
	case "$arg" in
	-verbose)
		VERBOSE="yes"
		;;
	-O)
		CL_OPTS=$CL_O
		LINK_OPTS=$LINK_O
		;;
	-g)
		CL_OPTS=$CL_G
		LINK_OPTS=$LINK_G
		;;
	-c) 
		CL="$CL /c";;
	-D)
		CL="$CL /D$1"
		shift
		;;
	-D*)
		def=`echo $arg | awk -F@@ '{print substr($1,3)}'`
		CL="$CL /D$def"
		;;
	-I)
		CL="$CL /I$1"
		shift
		;;
	-I*)
		path=`echo $arg | awk -F@@ '{print substr($1,3)}'`
		CL="$CL /I$path"
		;;
	-L)
		LIBDIR="$1"
		LINK=$LINK"	/LIBPATH:$LIBDIR"
		shift
		;;
	-L*)
		LIBDIR=`echo $arg | awk -F@@ '{print substr($1,3)}'`
		LINK=$LINK"	/LIBPATH:$LIBDIR"
		shift
		;;
	-l*)
		if [ "$arg" != "-lm" ]
		then
#Convert -lfoo to path-to-foo.a
			L=`echo $arg | awk -F@@ '{print substr($1,3)}'`
			D="no"
			[ -r "$L" ] && D="$L"
			[ -r "$L.a" ] && D="$L.a"
			[ -r "lib$L.a" ] && D="lib$L.a"
			[ -r "$LIBDIR/lib$L" ] && D="$LIBDIR/lib$L"
			[ -r "$LIBDIR/lib$L.a" ] && D="$LIBDIR/lib$L.a"
			[ $D = no ] && Abort "Couldn't find library $L in . or $LIBDIR"
			LINK="$LINK $D"
		fi
		;;
	-o)
		out=$1
		shift
		if [ "x`getExtention $out`" = "x.o" ]
		then
#It's a .o output filename-- tell CL
			OUTPUT="/Fo$out"
		else
#It's an exe filename-- tell LINK
			LINK="$LINK /out:$out.exe"
			DOLINK="yes"
		fi
		;;
	
#Object file or library-- add to link
	*.o|*.a|*.lib)
		LINK="$LINK $arg"
		DOLINK="yes"
		;;
#C source file
	*.c)
		base=`stripExtention $arg`
		CL="$CL /Tc$arg"
		OUTPUT="/Fo$base.o"
		LINK="$LINK $base.o"
		;;
#C++ source file
	*.C|*.cxx|*.cpp)
		base=`stripExtention $arg`
		CL="$CL /Tp$arg"
		OUTPUT="/Fo$base.o"
		LINK="$LINK $base.o"
d220 23
a242 23
if [ "x$CL" != "x" ]
then
	OPTS="$CL_OPTS $OUTPUT $CL"
	[ $VERBOSE = yes ] && echo "unix2nt_cc> $CL_CMD" $OPTS
	"$CL_CMD" $OPTS
	if [ $? != 0 ]
	then
		Abort "Error executing" "$CL_CMD" $OPTS
	fi
fi

if [ $DOLINK = yes ]
then
	OPTS="$LINK_OPTS $LINK $LINK_POST"
	[ $VERBOSE = yes ] && echo "unix2nt_cc> $LINK_CMD" $OPTS
	"$LINK_CMD" $OPTS
	if [ $? != 0 ]
	then
		Abort "Error executing" "$LINK_CMD" $OPTS 
	fi	
fi

exit 0
@

