#******************************************************************************
#  Makefile for the XGASYS20 directory
#
#       SCCSID = @(#)makefile   6.10 92/06/09
#
#       IBM/Microsoft Confidential
#
#       Copyright (c) IBM Corporation 1987, 1989
#       Copyright (c) Microsoft Corporation 1987, 1989
#
#       All Rights Reserved
#
#******************************************************************************

#******************************************************************************
#  Dot directive definition area (usually just suffixes)
#******************************************************************************

.SUFFIXES:
.SUFFIXES: .c .asm .h .inc .obj .lst


#******************************************************************************
#  Environment Setup for the component(s).
#******************************************************************************


#
# Conditional Setup Area and User Defines Macros
#


#
# Compiler Location w/ includes, libs and tools
#

H=..\..\..\h
INC=..\..\..\inc
INC32=..\..\..\inc32
LIB=..\..\..\lib
TOOLSPATH=..\..\..\..\tools

CINC=-I. -I..\32bit -I$(H)
AINC=-I. -I..\32bit -I$(INC)

Lnk=/nod /m /far
COMPILER=cl
CWARNINGS=-W2
ModelS=-AnSw
Argmnt=-c -Zp -Zl -J -G2 $(CWARNINGS) -Gc -DLINT_ARGS -Owit -Gs $(CINC)
Debug=
Macros=-DXWAY -DPDP -DVFB -DDCR4041
CompileTEXT=/NT _TEXT $(ModelS) $(Argmnt) $(Macros) $(Debug)
OPT = -DDCR4041 -DREAL_CRUISER


#
# Since the compiler/linker and other tools use environment
# variables ( INCLUDE, LIB, etc ) in order to get the location of files,
# the following line will check the environment for the LIFE of the
# makefile and will be specific to this set of instructions. All MAKEFILES
# are requested to use this format to insure that they are using the correct
# level of files and tools.
#

!if [set INCLUDE=$(H);$(INC)] || [set LIB=$(LIB)] || [set PATH=$(TOOLSPATH)]
!endif
#

#
# Compiler/tools Macros
#


#
# Compiler and Linker Options
#


#******************************************************************************
# Set up Macros that will contain all the different dependencies for the
# executables and dlls etc. that are generated.
#******************************************************************************



#******************************************************************************
#   Setup the inference rules for compiling and assembling source code to
#   obejct code.
#******************************************************************************
.asm.obj:
        masm $(AINC) $(OPT) $*.asm;
.c.obj:
        $(COMPILER) $(CompileTEXT) $(OPT) $*.c

#******************************************************************************
#   Target Information
#******************************************************************************
#
# This is a very important step. The following small amount of code MUST
# NOT be removed from the program. The following directive will do
# dependency checking every time this component is built UNLESS the
# following is performed:
#                    A specific tag is used -- ie. all
#
# This allows the developer as well as the B & I group to perform incremental
# build with a degree of accuracy that has not been used before.
# There are some instances where certain types of INCLUDE files must be
# created first. This type of format will allow the developer to require
# that file to be created first. In order to achive that, all that has to
# be done is to make the DEPEND.MAK tag have your required target. Below is
# an example:
#
#    depend.mak:   { your file(s) } dephold
#
# Please DON'T remove the following line
#

!include      "$(H)\version.mak"

#******************************************************************************
# Should be the default tag for all general processing
#******************************************************************************

all: xga.sys

#******************************************************************************
# Should be the default tag for all general processing
#******************************************************************************

xga.sys: xgaring0.obj edd0code.obj edd0data.obj xgainit.obj \
         xgaring0.def xgaring0.l
  link @xgaring0.l
  mapsym xga

edd0data.obj: edd0data.c
  $(COMPILER) /ND AKDATA $(CompileTEXT) $*.c
edd0code.obj: edd0code.c
  $(COMPILER) /ND AKDATA  $(CompileTEXT) $*.c

#******************************************************************************
#   Specific Description Block Information
#******************************************************************************

# This section would only be for specific direction as to how to create
# unique elements that are necessary to the build process. This could
# be compiling or assembling, creation of DEF files and other unique
# files.
# If all compiler and assembly rules are the same, use an inference rule to
# perform the compilation.
#
xga.sys: xgaring0.obj edd0code.obj edd0data.obj xgainit.obj \
         xgaring0.def xgaring0.l
  link @xgaring0.l
  mapsym xga
edd0data.obj: edd0data.c
  $(COMPILER) /ND AKDATA $(CompileTEXT) $*.c
edd0code.obj: edd0code.c
  $(COMPILER) /ND AKDATA  $(CompileTEXT) $*.c

#**********************************************************************
#   Module Definition File for the 2.0 XGA Ring0 code @V2.2TSU00
#**********************************************************************
xgarng00.def: makefile
        @ECHO  >$@ LIBRARY xga     ; Specifies XGA ring0 code is linked as a library module
        @ECHO >>$@ DESCRIPTION '$(FILEVER) 2.0 XGA.SYS'
        @ECHO >>$@ PROTMODE         ; Runs only in protect mode
        @ECHO >>$@ ; $@ end of generated file (see makefile)

#******************************************************************************
