#******************************************************************************
#  Makefile for the VCOM directory
#
#       SCCSID = @(#)makefile   6.5 91/07/17
#
#       IBM/Microsoft Confidential
#
#       Copyright (c) IBM Corporation 1987, 1989
#       Copyright (c) Microsoft Corporation 1987, 1989
#
#       All Rights Reserved
#
#******************************************************************************

#
# ******  NOTE  ******
#
#
#        If you are using a SED command with TAB characters, many editors
#        will expand tabs causing unpredictable results in other programs.
#
#        Documentation:
#
#        Using SED command with TABS. Besure to invoke set tab save option
#        on your editor. If you don't, the program 'xyz' will not work
#        correctly.
#

!include ..\vdevsub.mak

#
# Conditional Setup Area and User Defined Macros
#


#
# Compiler and Linker Option changes from ..\VDEVSUB.MAK
#

FLAGS   = -DINCL_MI

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

OBJ1= vcomdata.obj vcom.obj vcomi14.obj vcommain.obj vcominit.obj

OBJ2= vcomreq.obj vcomvxd.obj

OBJS= $(OBJ1) $(OBJ2)

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

doc:    ppr

clean:
        if exist *.obj del *.obj
        if exist *.obd del *.obd
        if exist *.stb del *.stb
        if exist *.lnk del *.lnk
        if exist *.sys del *.sys
        if exist *.sym del *.sym
        if exist *.exe del *.exe
        if exist *.com del *.com
        if exist *.lst del *.lst
        if exist *.lsd del *.lsd
        if exist *.ltb del *.ltb
        if exist *.sin del *.sin
        if exist *.map del *.map
        if exist *.old del *.old
        if exist *.cvk del *.cvk



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

vcom.sys:  $(OBJS) $(LIBS) $(DEF) makefile
        $(LINK) $(LFLAGS) @<<$(@B).lnk
$(OBJ1) +
$(OBJ2)
$@
$*.map
$(LIBS)
$(DEF)
<<keep
        $(MAPSYM) $*.map


#*****************************************************************************
#       List of documentation source files
#*****************************************************************************

SRC=    com.doc
SCI=    ..\..\equate.sci ..\..\macros.sci
HPL=    com.hpl
HP2=    com.hp2
PPR=    com.ppr
PPX=    com.ppx
TXT=    com.txt

#       Rules for building message include files go here

msginc:

txt:    $(TXT)
hpl:    $(HPL)
hp2:    $(HP2)
ppr:    $(PPR)
ppx:    $(PPX)
LIST:   $(LST)
DLIST:  $(DLST)

#       Document documentation dependencies

com.hpl com.hp2 com.ppr com.ppx com.txt: $(SCI) \
        com.doc comimp.sci

com2.doc: com.doc
        sed -e "s;:h3;:h1;" -e "s;:h4;:h3;" -e "s;:h5;:h4;" com.doc >com2.doc

com2.hpl com2.hp2 com2.ppr com2.ppx com2.txt: $(SCI) \
        com2.doc comimp.sci

#       Document .sin dependencies

comexp.sin:     comexp.sci com.asm
comloc.sin:     comloc.sci comloc.asm


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