#******************************************************************************
#  Makefile for the TESTCFG directory
#
#       IBM Confidential
#
#       Copyright (c) IBM Corporation 1987, 1992
#
#       SCCSID = @(#)makefile   6.2 92/01/22
#
#       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.
#

#
# Conditional Setup Area and User Defined Macros
#

!ifndef LANG
LANG=us
!endif


#
# Compiler and Linker Option changes
#
CL = cl
CFLAGS = -W3 -c -Asnw -G2s -Zl -Zp -Ox -nologo
CINC   = -I$(H) -I$(DISKH) -I$(RSM_H)
LINK = link
LFLAGS = /MAP /NOI /nod /exepack /packd /a:16 /far
MASM = masm
MFLAGS =  -Mx -t -N
MAPSYM = mapsym

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

H       = ..\..\..\h
DISKH   = ..\DASD\DISKH
RSM_H   = ..\resource\rsm_h
RMLIB   = ..\resource\rmcalls
LIBPATH = ..\..\..\lib
# OBJ sequence is important. testcfga must be first, testcfg must be second
OBJS    = testcfga.obj testcfg.obj tcfgscsi.obj tcfgdata.obj
DEF     = testcfg.def
LIBS    = $(LIBPATH)\os2286.lib $(LIBPATH)\os2286p.lib $(RMLIB)\rmcalls.lib


#****************************************************************************
#   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:    testcfg.s$(LANG)

clean:
        if exist *.obj del *.obj
        if exist *.s$(LANG) del *.s$(LANG)
        if exist *.sym del *.sym
        if exist *.lst del *.lst
        if exist *.map del *.map

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

.asm.obj:
        $(MASM) $(MFLAGS) $*.asm;

.c.obj:
        $(CL) $(CFLAGS) $(CINC) $*.c

.c.lst:
        $(CL) $(CFLAGS) /Fc $(CINC) $*.c
        copy $*.cod $*.lst
        del $*.cod


testcfg.s$(LANG): $(OBJS) $(LIBS) $(DEF) makefile
  $(LINK) $(LFLAGS) $(OBJS),$*.s$(LANG),,$(LIBS),$*.def
  $(MAPSYM) $*.map

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