#******************************************************************************
#  Makefile for the screendd directory
#
#       SCCSID = @(#)makefile   6.2 91/06/02
#
#       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: .asm .def .exe .lnk .lst .obj .ob2

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

#
# Conditional Setup Area and User Defines Macros
#

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

H_DBCS=..\..\..\h_dbcs
INC_DBCS=..\..\..\inc_dbcs
LIB_DBCS=..\..\..\lib_dbcs
H=..\..\..\h
INC=..\..\..\inc
LIB=..\..\..\lib
TOOLSPATH=..\..\..\..\tools

AINC= -I. -I$(INC_DBCS) -I$(INC) -I..\..\dos\dosinc -I..\..\..\src\dos\dosinc

#
# 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_DBCS);$(H);$(INC_DBCS);$(INC)] || [set LIB=$(LIB_DBCS)] || [set PATH=$(TOOLSPATH)]
!endif
#

#
# Compiler/tools Macros
#

CC=   cl
ASM=  masm
LINK= link

#
# Compiler and Linker Options
#

AFLAGS= -Mx -t -Z
LFLAGS= /noe /map /noi /nod

#******************************************************************************
# 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:
        $(ASM) $(AFLAGS) $(AINC) $*.asm,$@;
.asm.ob2:
        $(ASM) $(AFLAGS) $(AINC) -DFAMILY2 $*.asm,$@;
.asm.lst:
        $(ASM) -l -n $(AFLAGS) $(AINC) $*.asm;

#******************************************************************************
#   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:  screen01.sys screen02.sys

list: screen01.lst screen02.lst

#******************************************************************************
#   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.
#

screen01.sys: screen01.obj svgarout.obj svgabank.obj memhelp.obj screen01.lnk screen01.def
        $(LINK) $(LFLAGS) @screen01.lnk;
        mapsym screen01

screen02.sys: screen02.obj svgarout.ob2 svgabank.obj memhelp.obj screen02.lnk screen02.def
        $(LINK) $(LFLAGS) @screen02.lnk;
        mapsym screen02

screen01.lnk: makefile
      @ECHO screen01.obj svgabank.obj svgarout.obj memhelp.obj > $@
      @ECHO screen01.sys               >> $@
      @ECHO screen01.map $(LFLAGS) ,,  >> $@
      @ECHO screen01.def               >> $@

screen01.def: makefile
      @ECHO LIBRARY DRIVER              > $@
      @ECHO PROTMODE                   >> $@
      @ECHO DESCRIPTION '$(FILEVER)  Video Physical Driver'>>$@
      @ECHO IMPORTS                    >> $@
      @ECHO   DOSIODELAYCNT=DOSCALLS.427 >> $@

screen02.lnk: makefile
      @ECHO screen02.obj svgabank.obj svgarout.ob2 memhelp.obj > $@
      @ECHO screen02.sys               >> $@
      @ECHO screen02.map $(LFLAGS) ,,  >> $@
      @ECHO screen02.def               >> $@

screen02.def: makefile
      @ECHO LIBRARY DRIVER              > $@
      @ECHO PROTMODE                   >> $@
      @ECHO DESCRIPTION '$(FILEVER)  Video Physical Driver'>>$@
      @ECHO IMPORTS                    >> $@
      @ECHO   DOSIODELAYCNT=DOSCALLS.427 >> $@

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