head	1.3;
access;
symbols
	charm6_1:1.3
	charm_6_0_1:1.3
	charm6_0_1:1.3
	charm6_0:1.1
	ChaNGa_1-0:1.1;
locks; strict;
comment	@# @;


1.3
date	2008.07.06.02.32.32;	author gzheng;	state Exp;
branches;
next	1.2;
commitid	4Qrnpw7qzFU7IG9t;

1.2
date	2008.02.08.07.12.59;	author chaomei;	state Exp;
branches;
next	1.1;
commitid	LBRVJiHaFXLP2zQs;

1.1
date	2006.04.17.17.04.33;	author skymusic;	state Exp;
branches;
next	;


desc
@@


1.3
log
@updated for 64 bit windows
@
text
@#!/bin/sh
##############################################################################
# unix2nt_ar: Maps UNIX ar command options to 
# Microsoft Visual C++ 6.0 LIB command line options.
#
# Known bugs: pathnames with spaces may cause quoting problems.
#
# Orion Sky Lawlor, olawlor@@acm.org, 1/24/2001
##############################################################################

# Configurable option: Location of MSDEV
#VCC_DIR="C:/Program Files/Microsoft Visual Studio/Vc98"
if test -z "$VCINSTALLDIR"
then
  VCC_DIR="C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC"
else
  VCC_DIR=$VCINSTALLDIR
fi

#only valid for the platform that has exported corresponding variables
#LIB_CMD="$VCC_DIR/BIN/LIB.EXE"
LIB_CMD="lib.exe"
LIB_OPTS='/nologo'

if [ "x$LIB" = "x" ]
then
	echo "Variables already set!"
#	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_ar <output file> <input files>"
    echo
	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_ar Fatal Error in directory "`pwd` 1>&2
	echo "   $*" 1>&2
	echo "unix2nt_ar exiting..." 1>&2
	End 1
}

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

[ $# -lt 2 ] && printUsage "Error: Not enough arguments given."

out=$1
shift
args="/out:$out $@@"

"$LIB_CMD" $LIB_OPTS $args

if [ $? != 0 ]
then
	Abort "Error executing" "$LIB_CMD" $LIB_OPTS $args
fi

exit 0
@


1.2
log
@1. updated the settings with the latest microsoft visual studio express edition (2008).

2. Add the full path to the likner, otherwise the linker in cygwin takes precedence over the one of Microsoft
@
text
@d13 6
a18 1
VCC_DIR="C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC"
@


1.1
log
@Files for building charm on 64-bit windows platform
@
text
@d3 4
a6 4
# unix2nt_ar: Maps UNIX ar command options to 
# Microsoft Visual C++ 6.0 LIB command line options.
#
# Known bugs: pathnames with spaces may cause quoting problems.
d10 5
a14 5

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

d16 6
a21 6
#LIB_CMD="$VCC_DIR/BIN/LIB.EXE"
LIB_CMD="lib.exe"
LIB_OPTS='/nologo'

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

d37 1
a37 1
    echo
d63 1
a63 1
##############################################################################
d67 12
a78 12
out=$1
shift
args="/out:$out $@@"

"$LIB_CMD" $LIB_OPTS $args

if [ $? != 0 ]
then
	Abort "Error executing" "$LIB_CMD" $LIB_OPTS $args
fi

exit 0
@

