#==================
#
# Top-level makefile for HPS on Windows.  This makefile provides tailored
# definitions that adapt the main makefile makefile.vw7 to make the various
# engine executables, libraries and sundry support executables.

# Required Definitions
#
# MSDEV, the location of the Visual C++ environment, should
# be defined in the environment.  If not, define it here.
# MSDEV=
#
# MSVC_VER, the version of the Visual C++ compiler
!IFNDEF MSVC_VER
MSVC_VER=6
!ENDIF
# Must define one of these to get MSVC++ 6 to use wsock32 rather than ws2_32
#TARGETOS=WIN95
TARGETOS=BOTH

# PLATFORM, from include\platNames.h
PLATFORM=platNTPentium

# HPSSRC, the location of the root of the source tree
!IFNDEF HPSSRC
HPSSRC=..\..\..\src
!ENDIF
#
# the compilation flags for C files, C files that must be compiled with frame
# pointers, and the check-map C files respectively.
!IF $(MSVC_VER) >= 8
# NB:
#   * /Oa and /Ow removed, replace with 'noalias' or 'restrict' __declspec
#     modifiers.
#
#	* /Op replaced by /fp:precise.
#
#	* /QI0f removed (Pentium Errata fix).
#
#
#   * Use the switch /Fa to generate asm output files as well as obj files.
#
# As of VC8, warning 4996 comes up claiming that a number of functions are deprecated.
# This warning is deemed to be incorrect, and is thus disabled via /wd4996.
#
COPTS=/GF /Ox /Oy- /fp:precise /Oi -DmemcpyInlined -D_CRT_SECURE_NO_DEPRECATE /wd4996
CDBGOPT=/GF /Ox /Oy /fp:precise
!ELSE
COPTS=/GF /Ox /Oy- /Ow /Op /QI0f /Oi -DmemcpyInlined
CDBGOPT=/GF /Ox /Oy /Oa /Op
!ENDIF

NOOPTCOPTS=$(CFLAGS) -DmemcpyInlined

# Optional Definitions
#
# BASEDEFS, basic definitions for engine compilation
BASEDEFS=
#
# OPTDEFS, optional defines for engine compilation
OPTDEFS=$(OPTDEFS) -DFIRENZE 
#	NBAPI, defines for the threaded C connect
OPTDEFS=$(OPTDEFS) -DNBAPI -DNTTHREADS
#	OE_PROFILE, defines for the engine profiler
OPTDEFS=$(OPTDEFS) -DOE_PROFILE
#	MEASURE, send measurements, INSTR, gc measurements, TIMING, scavenge timing
OPTDEFS=$(OPTDEFS) #-DMEASURE -DINSTR=1 -DTIMING=1
#
# OPTLIBS, optional libraries for engine linking
OPTLIBS=
!IF $(MSVC_VER) >= 7
OPTLIBS=$(OPTLIBS) wsock32.lib
!ELSE
OPTLIBS=$(OPTLIBS) ws2_32.lib
!ENDIF
#
# DEBUGDEFS, to compile a debug engine
DEBUGDEFS=


# default target(s).  Delete those not required
#
all: engineexes enginelibs supportexes # productionexes

!include "$(HPSSRC)\makeplat\nt\makefile.vw7"
