# ***************************************************************************
#     CONFIG.msvc      (!INCLUDE ed by "makefile-dllmod.msvc")
# --------------------------------------------------------------------------
# (c) Copyright Roger Bowler, 2005-2007
# --------------------------------------------------------------------------
# $Id: CONFIG.msvc 5382 2009-06-05 09:09:01Z fish $
#
#  Set NODEBUG flag appropriately before !INCLUDEing <win32.mak>
#  and attempt to determine the Visual Studio compiler version
#
#
#                           CHANGE HISTORY
# $Log$
# Revision 1.3  2009/02/01 18:11:02  rbowler
# Eliminate extraneous trailing blanks (cosmetic change only)
#
# Revision 1.2  2008/01/31 22:32:36  rbowler
# Move MSVC compiler level determination to CONFIG.msvc
#
#
# DD/MM/YY Description
# 26/12/06 Fish: created by extraction from existing makefile-dllmod.msvc
#
# ***************************************************************************

# Use environment variables to determine the Visual Studio compiler level

!IFDEF VS90COMNTOOLS
!MESSAGE Makefile will assume VS9 or VS2008Express (MSVC version 15)
vsversion=9
!ELSEIFDEF VS80COMNTOOLS
!MESSAGE Makefile will assume VS8 or VS2005Express (MSVC version 14)
vsversion=8
!ELSEIFDEF VS70COMNTOOLS
!MESSAGE Makefile will assume VS7 (MSVC version 13)
vsversion=7
!ELSE
!MESSAGE Makefile will assume VC++ Toolkit 2003 (MSVC version 13)
vsversion=7
!ENDIF

# Use environment variables to determine the target processor type

!IF !DEFINED(CPU) || "$(CPU)" == ""
CPU=$(PROCESSOR_ARCHITECTURE)
!ENDIF

!IF "$(CPU)" == "IA64"
!MESSAGE Target processor type is IA64
_WIN64=1
!ELSEIF "$(CPU)" == "AMD64"
!MESSAGE Target processor type is AMD64
_WIN64=1
!ELSE
!MESSAGE Target processor type is i386
CPU=i386
!UNDEF _WIN64
!ENDIF
!MESSAGE

# -------------------------------------------------
# NOTE! must set the 'NODEBUG' variable properly
#       BEFORE calling win32.mak since it uses it.
# -------------------------------------------------

!IFNDEF CFG
NODEBUG = 1
!ELSEIF  "$(CFG)" == "DEBUG"
!UNDEF NODEBUG
!ELSEIF  "$(CFG)" == "RETAIL"
NODEBUG = 1
!ELSE
!ERROR Invalid build configuration!
!ENDIF
