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

toolset		= csharp2010

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 10.0\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 2010
#
PROGRAMFILES        ?= C:/Program Files
WINDIR              ?= C:/WINDOWS

VSINSTALLDIR        ?= $(PROGRAMFILES)/Microsoft Visual Studio 10.0
VCINSTALLDIR        ?= $(VSINSTALLDIR)/VC
FrameworkDir        ?= $(WINDIR)/Microsoft.NET/Framework
FrameworkVersion    ?= v4.0.30319
Framework35Version  ?= v3.5
WindowsSdkDir       ?= $(PROGRAMFILES)/Microsoft SDKs/Windows/v7.0A


DevEnvDir   := $(VSINSTALLDIR)/Common7/IDE
MSVCDir     := $(VCINSTALLDIR)/VC

# Verify environment variable requirements
.PHONY:		csharp
csharp:
  ifndef GBE_NOTOOLSTEST
	    @$(echo) [Toolset VCWIN32 - Visual Studio .NET 2010]; \
	    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: $(FrameworkVersion)"; exit 2; fi; \
	    if [ ! -d "$(WindowsSdkDir)" ]; then echo "Directory WindowsSdkDir does not exist: $(WindowsSdkDir)"; exit 2; fi;
  endif

#
#   Setup PATH, VC_LIB and INCLUDE for the SDK
#
NET_PATH:= $(VSINSTALLDIR)/Common7/IDE
NET_PATH:= $(NET_PATH);$(VCINSTALLDIR)/BIN
NET_PATH:= $(NET_PATH);$(VSINSTALLDIR)/Common7/Tools
NET_PATH:= $(NET_PATH);$(FrameworkDir)/$(FrameworkVersion)
NET_PATH:= $(NET_PATH);$(FrameworkDir)/$(Framework35Version)
NET_PATH:= $(NET_PATH);$(VCINSTALLDIR)/VCPackages
NET_PATH:= $(NET_PATH);$(WindowsSdkDir)/bin/NETFX 4.0 Tools
NET_PATH:= $(NET_PATH);$(WindowsSdkDir)/bin

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

INCLUDE :=
export INCLUDE

LIB :=
export LIB

VC_LIB     := $(VCINSTALLDIR)/PlatformSDK/LIB
VC_LIB     := $(VC_LIB);$(VCINSTALLDIR)/LIB
VC_LIB     := $(VC_LIB);$(VCINSTALLDIR)/ATLMFC/LIB
VC_LIB     := $(VC_LIB);$(WindowsSdkDir)/lib
VC_LIB     := $(VC_LIB);$(FrameworkDir)/$(FrameworkVersion)
VC_LIB     := $(VC_LIB);$(FrameworkDir)/$(Framework35Version)

#

