# SCCSID = @(#)makefile	6.4 92/05/08

#/***********************************************************************/
#/*                                                                     */
#/* Driver Name: ADD/DM - Include Files                                 */
#/*              ----------------------                                 */
#/*                                                                     */
#/* Source File Name: MAKEFILE                                          */
#/*                                                                     */
#/* Descriptive Name: MAKEFILE for DISKINC directory.                   */
#/*                                                                     */
#/* Function: Creates assembler version of .H files in ..\DISKH.        */
#/*                                                                     */
#/*                                                                     */
#/*---------------------------------------------------------------------*/
#/*                                                                     */
#/* Copyright (C) 1992 IBM Corporation                                  */
#/*                                                                     */
#/* DISCLAIMER OF WARRANTIES.  The following [enclosed] code is         */
#/* provided to you solely for the purpose of assisting you in          */
#/* the development of your applications. The code is provided          */
#/* "AS IS", without warranty of any kind. IBM shall not be liable      */
#/* for any damages arising out of your use of this code, even if       */
#/* they have been advised of the possibility of such damages.          */
#/*                                                                     */
#/*---------------------------------------------------------------------*/
#/*                                                                     */
#/* Change Log                                                          */
#/*                                                                     */
#/* Mark    Date      Programmer  Comment                               */
#/* ----    ----      ----------  -------                               */
#/* @nnnn   mm/dd/yy  NNN                                               */
#/*                                                                     */
#/*                                                                     */
#/***********************************************************************/


# This is a makefile template to be used for an OS/2 Component makefile.
# The purpose of this template is to outline all the areas and items
# that need to be covered. The following are some of those items
#
#     Handle Non Specific Machine Layouts - This will make the makefile
#     -----------------------------------   more generic and portable
#                                           regardless of the development
#                                           tree. Macros should have
#                                           relative paths to information
#                                           in order for the makefiles to be
#                                           more portable.
#
#
#     National Language Support          -  The makefile will have to
#     -------------------------             support all national language
#                                           versions.  This applies to all
#                                           modules that will contain trans-
#                                           lations even if that translation
#                                           is not the result of specific MRI
#                                           which is part of the component.
#
#     Environment Setup                   - The makefile will setup the
#     -----------------                     environment (ie. paths to tools,
#                                           etc). This will insure that
#                                           people involved can use the
#                                           makefile without worrying
#                                           about their local environment.
#
#     Use of Inline Response Files        - The makefile will dynamically
#     ----------------------------          generate linker response files,
#                                           def files etc. to support NLS,
#                                           MMIO and other build variations.
#
# The following is a list of the order in which the makefile should be written.
#
#     Dot Directives - ie.
#        .SUFFIXES:
#        .SILENT:
#        .IGNORE:
#        .PRECIOUS:
#
#     Environment Setup
#        Conditional setup and user defined macros
#        Compiler Location w/ includes, libs and tools etc.
#        Compiler/tools Macros
#        Compiler/tools Options
#        Additional user defined macros
#
#      Rules for Compiling and assembling
#        .c.obj
#        .asm.obj
#        .exe.com
#
#      Common target information "common.mak" for dependency generation and
#      nls processing
#
#      User Target Information
#         all
#         debug
#
#      Specific Description Blocks
#
#      Description block for dynamic dependencies generation "depend.mak"
#
#      Indirect Dependencies for SOURCE "depend.mak"
#         .obj:   .c .h .inc
#
# It is very important to have the makefile in the above order to make both
# the developers job and the build departments job that much easier.
#
# ******  NOTE  ******
#
#   Please make sure that the MAKEFILE is documented. There have been many
#   occasions that someone other then people working on your component have
#   had a chance to inquire about what the dependencies are and what files
#   are created as a result.
#
#   The makefile should be a document in itself. It will discribe how to
#   to create the component. It is VERY inportant that any special
#   consideration be documented. The following is an example of a problem
#   and its documentation.
#
#        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.
#

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

.SUFFIXES:      .inc .h
.IGNORE:

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

#
# Conditional Setup Area and User Defined Macros
#

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

H=..\..\..\..\h
DISKH= ..\diskh
TOOLSPATH=..\..\..\..\tools

#
# 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);$(MAKEDIR)] || [set PATH=$(TOOLSPATH);$(DK_TOOLS)]
!endif


#
# Compiler/tools Macros
#

SED=sed
H2I=h2inc
TAB=tabify
STRUC=strucs

#
# Compiler and Linker Options
#

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

#       ADD inc files
MINC1=  iorb.inc reqpkt.inc scsi.inc scb.inc abios.inc addcalls.inc dhcalls.inc
MINC2=  misc.inc aspi.inc
MINC=   $(MINC1) $(MINC2)

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

.asm.obj:
        $(AS) $(AFLAGS) $(AINC) $< ;

.c.obj:
        $(CC) $(CFLAGS) $(CINC) $< ;

.rc.obj:
        $(RC) $(RFLAGS) $< ;

{$(DISKH)}.h.inc:
        $(H2I) -t -c $(DISKH)\$*.h -o $*.inc

#****************************************************************************
#   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
#
# Commented out "common.mak" since the INC directory is not built off any
# files that have dependencies on other files. A single H file is interpreted
# and an INC file is created.
#

#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# NOTE: The above line will include a common makefile which will look like
# the following lines. This will allow the dependency checking to be
# global for all makefiles.  It will also set up the default targets which
# will allow for incremental as well as NLS builds.
#
# !if [ if exist depchk del depchk dephold depend.mak ] || \
#     [ if not exist depend.mak touch depend.mak & $(MAKE) -a depend.mak ]
# !endif
#
# Dependency Target Section
#
#
# dep:    depend.mak
#         -del dephold
#         $(MAKE) -$(MAKEFLAGS) all $(MAKEOPTS)
#
#
# Information about makefile and different areas of important information
#
#
# info:
#         cls
#         more < .\readme
#
#
# Perform General NLS Support Tags
#
#
# nls:    dk fr gr it nl no po sp su sv
#
#
# Specific NLS Country Tags
#
#
# dk fr gr it nl no po sp su sv:
#         -del dephold
#         $(MAKE) -$(MAKEFLAGS) LANG=$@ MRI=$@ all $(MAKEOPTS)
#
# This is just for template purposes.
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#
# Should be the default tag for all general processing
#

all:    minc

#
# Specific Process Tag
#
minc:   $(MINC)

clean:  mclean

mclean:
        -del $(MINC1)
        -del $(MINC2)

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


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