# SCCSID = @(#)makefile 6.5 92/02/29

#******************************************************************************
#  Makefile for the FAMILY1 directory
#
#       SCCSID = @(#)makefile   6.5 92/02/29
#
#       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 .c .obj .lst .def .lnk .exe .pcl .vis

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

#
# Conditional Setup Area and User Defines Macros
#

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

H=\drv\h
RMH=..\;..\..\resource\rsm_h
INC=\drv\inc
LIB=\drv\lib
RLIB=\drv\lib
TOOLSPATH=\drv\tools

AINC= -I. -I$(INC)
#LIBS= $(LIB)\os2286.lib $(LIB)\doscalls.lib $(RLIB)\rmcalls.lib
LIBS= $(LIB)\os2286.lib $(RLIB)\rmcalls.lib

#
# 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);$(RMH);$(INC)] || [set LIB=$(LIB);$(RMLIB)] || [set PATH=$(TOOLSPATH)]
!endif
#

#
# Compiler/tools Macros
#

ASM=masm
LINK=link

CC=cl
COPTS=-Fc /W4 -c -Asnw -G2s -Zl -Zp -Osegli -nologo

WARNFILT = | sed -e /C4001/d

#
# Compiler and Linker Options
#

AFLAGS= -Mx -t
VFLAGS= -Mx -t -DVIS
PFLAGS= -Mx -t -DPCL
LFLAGS= /nodefaultlibrarysearch /noignorecase /exepack /align:16 /map

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

FILES=  graphire.asm data.asm strategy.asm init.asm mserm.c

GOBJS=   data.obj strategy.obj graphire.obj init.obj mserm.obj

#******************************************************************************
#   Setup the inference rules for compiling and assembling source code to
#   object code.
#******************************************************************************

.asm.obj:
        $(ASM) $(AFLAGS) $(AINC) $*.asm $*.obj;

.c.obj:
        $(CC) $(COPTS) $*.c $(WARNFILT);


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


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

all: graphire.sys

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

graphire.sys: $(GOBJS) $(LIBS) $(RMLIB) graphire.def graphire.lst
        $(LINK) $(LFLAGS) @graphire.lst
        mapsym graphire

graphire.def:   makefile
        @echo LIBRARY graphire                  >  graphire.def
        @echo PROTMODE                         >> graphire.def
        @echo CODE    PRELOAD                  >> graphire.def
        @echo DATA    PRELOAD                  >> graphire.def
        @echo SEGMENTS                            >> graphire.def
        @echo    DSEG    CLASS 'DATA'             >> graphire.def
        @echo    _DATA   CLASS 'DATA'             >> graphire.def
        @echo    CONST   CLASS 'CONST'            >> graphire.def
        @echo    _BSS    CLASS 'BSS'              >> graphire.def
        @echo    CSEG    CLASS 'CODE'             >> graphire.def
        @echo    RMCode  CLASS 'CODE'             >> graphire.def
        @echo    _TEXT   CLASS 'CODE'             >> graphire.def
        @echo    DUMMY   CLASS 'CODE'             >> graphire.def
        @echo IMPORTS                          >> graphire.def
        @echo    DOSIODELAYCNT = DOSCALLS.427  >> graphire.def
        @echo    DOSPUTMESSAGE = DOSCALLS.383  >> graphire.def

graphire.lst:   makefile
        @echo $(GOBJS)                       >  graphire.lst
        @echo graphire.sys                 >> graphire.lst
        @echo graphire.map $(LFLAGS)            >> graphire.lst
        @echo $(LIBS) $(RMLIB)                 >> graphire.lst
        @echo graphire.def                      >> graphire.lst

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