# -*- mode: mak; -*-
###############################################################################
# File:         TOOLSET/csharp.def
# Contents:     Visual Studio .NET 2003 CSHARP defines
###############################################################################

toolset		= csharp

o		= 
s		= asm
a		= netmodule
exe		= .exe

.SUFFIXES:	.asm

#
#   Setup the basic .NET environment paths
#   This is taken from "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat"
#
#   Cannot use vsvars.bat data imported from the environment as it
#   will conflict with other versions of MS
#
#   The following are the default installed locations
#   Currently assume default installation of .NET 2003
#
PROGRAMFILES        ?= C:/Program Files
WINDIR              ?= C:/WINDOWS
VSINSTALLDIR        ?= $(PROGRAMFILES)/Microsoft Visual Studio .NET 2003/Common7/IDE
VCINSTALLDIR        ?= $(PROGRAMFILES)/Microsoft Visual Studio .NET 2003
FrameworkDir        ?= $(WINDIR)/Microsoft.NET/Framework
FrameworkVersion    ?= v1.1.4322
FrameworkSDKDir     ?= $(PROGRAMFILES)/Microsoft Visual Studio .NET 2003/SDK/v1.1

DevEnvDir   := $(VSINSTALLDIR)
MSVCDir     := $(VCINSTALLDIR)\VC7

# Verify environment variable requirements
.PHONY:		csharp
csharp:
  ifndef GBE_NOTOOLSTEST
	    @$(echo) [Toolset VCWIN32 - Visual Studio .NET 2003]; \
	    if [ ! -d "$(VSINSTALLDIR)" ]; then echo "Directory VSINSTALLDIR does not exist: $(VSINSTALLDIR)"; exit 2; fi; \
	    if [ ! -d "$(VCINSTALLDIR)" ]; then echo "Directory VCINSTALLDIR does not exist: $(VCINSTALLDIR)"; exit 2; fi; \
	    if [ ! -d "$(FrameworkDir)" ]; then echo "Directory FrameworkDir does not exist: "$(FrameworkDir); exit 2; fi; \
	    if [ ! -d "$(FrameworkDir)/$(FrameworkVersion)" ]; then echo "Directory FrameworkVersion does not exist: $(FrameworkDir)/$(FrameworkVersion)"; exit 2; fi; \
	    if [ ! -d "$(FrameworkSDKDir)" ]; then echo "Directory FrameworkSDKDir does not exist: $(FrameworkSDKDir)"; exit 2; fi;
  endif

#
#   Setup PATH, VC_LIB and INCLUDE for the SDK
#
NET_PATH:= $(DevEnvDir)
NET_PATH:= $(NET_PATH);$(VCINSTALLDIR)/Common7/Tools
NET_PATH:= $(NET_PATH);$(VCINSTALLDIR)/Common7/Tools/bin/prerelease
NET_PATH:= $(NET_PATH);$(VCINSTALLDIR)/Common7/Tools/bin
NET_PATH:= $(NET_PATH);$(FrameworkSDKDir)/bin
NET_PATH:= $(NET_PATH);$(FrameworkDir)/$(FrameworkVersion)

ifeq "$(findstring $(NET_PATH),$(PATH))" ""
PATH    := $(NET_PATH);$(PATH)
endif
Path    := $(PATH)
export PATH

INCLUDE :=
export INCLUDE

LIB :=
export LIB

VC_LIB     := $(FrameworkDir)/$(FrameworkVersion)

#
