# -*- mode: mak; -*-
###############################################################################
# File:         TOOLSET/vcwin32_net2005.def
# Contents:     Visual Studio .NET 2005 C/C++ defines
###############################################################################

toolset		= vcwin.net2005

o		= obj
s		= asm
a		= lib
exe		= .exe

.SUFFIXES:	.asm

#
#   Setup the basic .NET environment paths
#   This is taken from "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sdkvars.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 2005
#
PROGRAMFILES        ?= C:\\Program Files
WINDIR              ?= C:\\WINDOWS
VSINSTALLDIR        ?= $(PROGRAMFILES)/Microsoft Visual Studio 8/Common7/IDE
VCINSTALLDIR        ?= $(PROGRAMFILES)/Microsoft Visual Studio 8
FrameworkDir        ?= $(WINDIR)/Microsoft.NET/Framework
FrameworkVersion    ?= v2.0.50727
FrameworkSDKDir     ?= $(PROGRAMFILES)/Microsoft Visual Studio 8/SDK/v2.0

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

# Verify environment variable requirements
.PHONY:		visualc
visualc:
  ifndef GBE_NOTOOLSTEST
	    @$(echo) '[Toolset VCWIN32 - Visual Studio .NET 2005]'; \
	    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 "$(FrameworkSDKDir)" ]; then echo "Directory FrameworkSDKDir does not exist: $(FrameworkSDKDir)"; exit 2; fi;
  endif

VISUALC		:= $(subst \,/,$(strip $(MSVCDir)))
visualc		:= $(subst $(space),$(spacealt),$(subst \,/,$(strip $(MSVCDir))))

#
#   Setup PATH, VC_LIB and INCLUDE for the SDK
#
NET_PATH:= $(DevEnvDir)
NET_PATH:= $(NET_PATH);$(MSVCDir)/BIN
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 := $(MSVCDir)/ATLMFC/INCLUDE
INCLUDE := $(INCLUDE);$(MSVCDir)/INCLUDE
INCLUDE := $(INCLUDE);$(MSVCDir)/PlatformSDK/include/prerelease
INCLUDE := $(INCLUDE);$(MSVCDir)/PlatformSDK/include
INCLUDE := $(INCLUDE);$(FrameworkSDKDir)/include;
export INCLUDE

VC_LIB     := $(MSVCDir)/ATLMFC/LIB
VC_LIB     := $(VC_LIB);$(MSVCDir)/LIB
VC_LIB     := $(VC_LIB);$(MSVCDir)/PlatformSDK/lib/prerelease
VC_LIB     := $(VC_LIB);$(MSVCDir)/PlatformSDK/lib
VC_LIB     := $(VC_LIB);$(FrameworkSDKDir)/lib

# rpcgen configuration
#
RPCGEN_CPP	:= cl
RPCGEN_CFLAGS	:= -EP
export RPCGEN_CPP RPCGEN_CFLAGS

#
